-
Notifications
You must be signed in to change notification settings - Fork 38
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
Testsuite fatal error output not shown #89
Comments
Hmm, that's not a nice behaviour from the plugin. Let me see what I can do. Thanks for reporting this. |
I've investigated what's happening: I guess this is somewhat unexpected behaviour for JUnit tests but I have seen several StackOverflow posts suggest that as a way to abort the rest of the test suite so as to not waste when a fatal error has happened. Would it be right for gradle-test-logger-plugin to catch the VM's non-zero exit code, treat that as a failed test and show the output? Thanks. |
Interesting. Would be good to find out what Gradle would do without the test logger plugin applied and with a configuration like this:
|
Behaviour is the same for Without gradle-test-logger applied and without the above Without gradle-test-logger applied but with the above With gradle-test-logger applied the test is reported as
But with gradle-test-logger applied, even with all options set to true:
the System.out and System.err in the @BeforeClass method are not seen. |
Unfortunately, there is nothing the plugin can do about this as this is Gradle's internal behaviour. I have fixed the missing system out issue though. It was a genuine bug, thanks for reporting it and the detailed analysis 👍 |
Ah ok seeing the messages is the main thing, thanks! :-) |
With a config like this:
if the test suite run itself fails - i.e. not 'a test does not pass' but the test execution failing due to something else e.g. an
@Sql
setup script with an error in it - gradle fails and stderr says:but there's no indication as to what the problem was. If I run again with
--info
I can see that the stdout explains the problem in detail, but that disables the above testlogger filters.Could testlogger notice the suite failure and show the output please?
The text was updated successfully, but these errors were encountered: