We use slf4j with logback, when running from the command line this still works as expected but within intellij it's different.
Running junit tests using gradle in intellij, log output is in the following xml format:
<ijLog><event type='afterSuite'><ijLogEol/>
<test id='root' parentId=''><ijLogEol/>
<descriptor name='Test Run' className='' /><ijLogEol/>
<result resultType='SUCCESS' startTime='1427264227574' endTime='1427264315052'><ijLogEol/>
<failureType>error</failureType><ijLogEol/>
</result><ijLogEol/>
</test><ijLogEol/>
</event></ijLog>
I don't want the IDE to change anything, just use the logging that we've provided. This use to work fine, but since 14.1 i'm having this issue.
A gradle refresh fixed this issue for me.
Bug in Intellij. See here: https://youtrack.jetbrains.com/issue/IDEA-151866
The gradle plugin will generate Intellij specific xml output whenever a test is run (task instance of Test), but Intellij will only interpret the test output as xml when one of the tasks is "test" (hardcoded value).
One way to work around the problem: add a tasks test
, even if that won't do anything. eg. cleanTest integTest test
to run integTest
This issue appeared to me in IntelliJ IDEA 2016.2.3 with Gradle 3.0
I was able to resolve this by gradle refresh + clean, output again started coming in normal format for integration tests.
This worked for me in IntelliJ Idea: 1) Edit your run configuration 2) From your script parameters option remove '--tests *'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With