Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show started-events for tests? #100

Open
tony19 opened this issue Nov 14, 2018 · 6 comments
Open

How to show started-events for tests? #100

tony19 opened this issue Nov 14, 2018 · 6 comments

Comments

@tony19
Copy link

tony19 commented Nov 14, 2018

It seems the plugin only prints the result of a test after it has completed. Is there a way to include the start event in the output? This is possible outside of gradle-test-logger-plugin with:

tasks.withType(Test) {
    testLogging {
        events "started"
    }
}

but this config doesn't have an effect with the plugin. What are my options?

@radarsh
Copy link
Owner

radarsh commented Nov 14, 2018

Unfortunately the plugin needs to know the test result before printing the logs in order to apply filtering. Before the filtering logic was implemented, the plugin used to print it.

What exactly is your scenario? Why do you need the started events? In fact, Gradle already displays which test is being run in its progress indicator.

image

@tony19
Copy link
Author

tony19 commented Nov 14, 2018

Some of my test suites have hanging tests, and the default Gradle output you mentioned only indicates the classname of the test suite (and not the test name itself).

@radarsh
Copy link
Owner

radarsh commented Oct 3, 2019

I might be able to do something about this by leveraging Gradle's progress logging. Unless there is a lot of demand for this feature, I would like to push back on it as Gradle progress logging is an internal API.

@pingerino
Copy link

Is it possible to disable filtering completely and get output immediately in builds? We're having similar issues where it's very hard in jenkins output to see which test has hung.

@ewatbwat
Copy link

I would love this feature. Googling "gradle show when test starts" is exactly what led me to find your plugin, actually, even though it doesn't do that. :)

This plugin is beautiful! But it won't help me figure out which test is hanging, so I'll hack my own gradle stuff for now.

@Alex-Vol-Amz
Copy link

Instead of the plugin doing the work to identify hanging tests as an observer (harder to know) using the test framework facilities might be a better option. Most test frameworks support the notion of test timeouts, the timeouts usually have a matching exception thrown by the framework with the hanging test name or other useful metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants