[
https://issues.apache.org/jira/browse/SUREFIRE-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15452292#comment-15452292
]
Tanguy Le Meur edited comment on SUREFIRE-1263 at 8/31/16 1:50 PM:
-------------------------------------------------------------------
Hi [~tibor17],
Using Jean-Luc repo and what you suggested, I tried to have a look:
My best guess is that the name parameter in
BlockJUnit4ClassRunnerWithParameters has been used and it's {{name = [p0]}} for
example (seen with the debugger). In place of a fully qualified name.
I forked it here (look for the {{Overriden Here}} text):
https://github.com/tanguylemeur/surefire-junit-tests/blob/master/src/main/java/org/junit/runners/parameterized/BlockJUnit4ClassRunnerWithParameters.java
With this, the name are well reported in the log.
It's really dirty of course, but that was the closest way I found to display
the right message.
(https://cdn-images-1.medium.com/max/455/1*snTXFElFuQLSFDnvZKJ6IA.png)
I don't know who is right: junit or surefire.
I noticed that changing junit is messing up some other tools like eclipse with
this change.
was (Author: tlemeur):
Hi [~tibor17],
Using Jean-Luc repo and what you suggested, I tried to have a look:
My best guess is that the name parameter in
BlockJUnit4ClassRunnerWithParameters has been used and it's {code}name =
[p0]{code} for example (seen with the debugger). In place of a fully qualified
name.
I forked it here (look for the {code}Overriden Here{code} text):
https://github.com/tanguylemeur/surefire-junit-tests/blob/master/src/main/java/org/junit/runners/parameterized/BlockJUnit4ClassRunnerWithParameters.java
With this, the name are well reported in the log.
It's really dirty of course, but that was the closest way I found to display
the right message.
(https://cdn-images-1.medium.com/max/455/1*snTXFElFuQLSFDnvZKJ6IA.png)
I don't know who is right: junit or surefire.
I noticed that changing junit is messing up some other tools like eclipse with
this change.
> No class name in log when running tests in parallel with parameterized tests
> ----------------------------------------------------------------------------
>
> Key: SUREFIRE-1263
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1263
> Project: Maven Surefire
> Issue Type: Bug
> Components: Junit 4.7+ (parallel) support
> Affects Versions: 2.19.1
> Reporter: Jean-Luc Derrien
> Assignee: Tibor Digana
>
> Hello,
> Using surefire and Junit, the class names are not displayed in the output log
> when the tests are run in parallel with parameterized tests.
> According to this [small
> project|https://github.com/jderrien/surefire-junit-tests/tree/simple-1], in
> parallel mode:
> {noformat}
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running [p2]
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p2] - p2 -
> sleeptime = 1 => start
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p2] - p2 -
> sleeptime = 1 => stop
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p1] - p1 -
> sleeptime = 2 => start
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p1] - p1 -
> sleeptime = 2 => stop
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p0] - p0 -
> sleeptime = 5 => start
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p0] - p0 -
> sleeptime = 5 => stop
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.006 sec -
> in [p2]
> Running [p2]
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec -
> in [p2]
> Results :
> Tests run: 12, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 7.799 s
> [INFO] Finished at: 2016-07-27T15:03:37+02:00
> [INFO] Final Memory: 18M/213M
> [INFO]
> ------------------------------------------------------------------------
> {noformat}
> Without parallel mode (we have the 'Running #classname#' in the output):
> {noformat}
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running com.appnexus.viewability.core.surefireJunitTests.ATest
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p0] - p0 -
> sleeptime = 5 => start
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p0] - p0 -
> sleeptime = 5 => stop
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p1] - p1 -
> sleeptime = 2 => start
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p1] - p1 -
> sleeptime = 2 => stop
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p2] - p2 -
> sleeptime = 1 => start
> com.appnexus.viewability.core.surefireJunitTests.ATest.methodA1[p2] - p2 -
> sleeptime = 1 => stop
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.085 sec -
> in com.appnexus.viewability.core.surefireJunitTests.ATest
> Running com.appnexus.viewability.core.surefireJunitTests.BTest
> Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec -
> in com.appnexus.viewability.core.surefireJunitTests.BTest
> Results :
> Tests run: 12, Failures: 0, Errors: 0, Skipped: 0
> {noformat}
> It would be great to have the classname displayed when running tests in
> parallel.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)