This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Dev build. If you pass <forkCount>2</> in Surefire config (2.14+) and run two tests (e.g. multiselect in Projects: -Dtest=p.FirstTest,p.SecondTest), the Test Results window will display results from only one of them.
is this related to issue https://jira.codehaus.org/browse/SUREFIRE-968?
Possibly. Not sure how the mapping from Maven console output to the JUnit listener works internally. Seems pretty fragile; perhaps it would be better to watch target/surefire-reports/TEST-*.xml for new or modified files (with a timestamp later than the build start and a closing </testsuite> tag)? For Ant <junit> we listen for verbose messages that announce significant events, but there is no equivalent for forked Maven builds, unless NetBeans adds a build agent (#194090). By the way another issue not related to parallelism is that no progress is shown for test cases within a suite, which is relevant when one suite with a dozen tests takes a couple minutes to run. Unfortunately I know of no way to fix this given Surefire’s current behavior. target/surefire-reports/*-output.txt is updated “live” which is helpful in case your tests print lots to stdio, though there is no standard header announcing that a new test case is starting or has completed.
As of https://github.com/jenkinsci/jenkins/commit/3238d6328db4f7a5377cf088e5b0e9a3ba5ca740 I get output like this: Running jenkins.scm.SCMCheckoutStrategyTest Running jenkins.ExtensionFilterTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.712 sec - in jenkins.ExtensionFilterTest Running jenkins.model.JenkinsTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 76.628 sec - in jenkins.scm.SCMCheckoutStrategyTest Running jenkins.model.ExtensionTypeHierarchyTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.317 sec - in jenkins.model.ExtensionTypeHierarchyTest Running jenkins.model.JenkinsLocationConfigurationTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.474 sec - in jenkins.model.JenkinsLocationConfigurationTest Running jenkins.model.PeepholePermalinkTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.596 sec - in jenkins.model.PeepholePermalinkTest Running jenkins.model.BuildDiscarderTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.72 sec - in jenkins.model.BuildDiscarderTest Running jenkins.security.RekeySecretAdminMonitorTest Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 83.658 sec - in jenkins.model.JenkinsTest Running jenkins.security.ApiTokenPropertyTest … (concurrency 2×) which is fine. But the Test Results window only shows half of the test suites. Not sure whether this should be considered P2. There is a workaround, but it is to set concurrency to 1× and so make tests run more slowly.
Created attachment 139348 [details] proposed patch attached is a proposed patch. There's one problem with it however. When the "Tests ... - in <test>" line is printed, it's not 100% that the relevant xml file is already created. Adding thread.sleep(200) "fixed" the problem on my computer but it's fairly non-deterministic. I was not able to find a more deterministic solution, that's why I would prefer not to include in 7.4
Bug in Surefire perhaps? I would expect the XML to be created first, then the summary printed. Will you file it?
I've filed https://jira.codehaus.org/browse/SUREFIRE-1025
(In reply to Jesse Glick from comment #5) > Bug in Surefire perhaps? I would expect the XML to be created first, then > the summary printed. Will you file it? This was the root problem in bug 224442. The summary was printed but while trying to create the test in Test Results Window from the xml files I found out that it was not created yet. This was totally un-deterministic though. If surefire gets fixed it would help I guess. The idea in fixing 224442 was to wait for all the logging to finish and then try to iterate through all the tested classes and "hope" that the xml files would be already created and so their timestamp would be greater from the timestamp of the build start. With that fix I am always getting all the results in the TRW when running in parallel. I could be wrong though. Jesse could you try a latest build and see if it helps? Thanks
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss