-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
SummaryGeneratingListener delivered in getSummary() the double result in sum by failed and successful tests to found tests. #3365
Comments
Are there any dynamic tests involved? https://junit.org/junit5/docs/current/user-guide/#writing-tests-dynamic-tests If yes, then the number of non-dynamic tests - that is the number "static" tests as discovered by the engines before the actual test run - is expected to be lower (or equal) of the number of started tests. |
@sormuras No, i have no dynamic tests, only regular The effect happens with double counters if i add this Listener: launcher.registerTestExecutionListeners(summaryGeneratingListener, new TestListener()); If comment out this line, all counter are correct. I think, something runs wrong in the Result with Result without |
I've edited the issue's description and your comments to improve the formatting. You might want to check out this Mastering Markdown guide for future reference. |
@mourav2222, please refrain from posting screenshots of text. |
I cannot reproduce the claimed duplicate behavior. If you would like for us to assist you, please provide a minimal sample application that reproduces the problem -- preferably a project that we can download and run (such as a public Git repository or a ZIP file). |
no problem, this is my project where it happened. Start configuration: 'Tester - smoketest -chrome' My Result:
|
Thanks for sharing the project. The
That's why you see all counters doubled. public void executeTestPlan(String browser) {
logger.info("Browser (executeTestPlan): {}", browser);
SummaryGeneratingListener summaryGeneratingListener = new SummaryGeneratingListener();
launcher.registerTestExecutionListeners(summaryGeneratingListener, new TestListener());
LauncherDiscoveryRequest request = LauncherDiscoveryRequestBuilder
.request()
.configurationParameter(TestLauncherConfig.BROWSER.getParameter(), browser)
.selectors(DiscoverySelectors.selectPackage("ru.heisenbug.tests"))
.filters(includeClassNamePatterns("ru\\.heisenbug\\.tests\\.Google.*"))
// .filters(includeClassNamePatterns("ru\\.heisenbug\\.tests\\.XXGoogle.*"))
// .filters(includeClassNamePatterns("ru\\.heisenbug\\.tests\\..*"))
.build();
launcher.execute(request, summaryGeneratingListener); I am therefore closing this issue. |
thanks for tips, it works corrtectly. |
Other project has a same problem:
The text was updated successfully, but these errors were encountered: