allure-java
allure-java copied to clipboard
Empty test name when more than 900 tests are run
Describe the bug
I am currently using Allure in conjunction with JBehave and it is working great except for one thing.
When I am running more than 900 tests , one of the tests is randomly set with an empty name which is displayed as "component.tree.unknown" , it does not affect the pass rate but it doesn't allow me to easily identify the test.
The current implementation of the JBheave setup is like the following:
protected StoryReporterBuilder buildStoryReporterBuilder() { return new StoryReporterBuilder() .withFormats(new ContextOutput(jBehaveContext), Format.HTML, Format.XML) .withReporters(new AllureJbehave(), new CompanyStoryReporter()) .withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass())) .withFailureTrace(true) .withFailureTraceCompression(true); } ... }
with the CompanyStoryReporter being:
` public class CompanyStoryReporter extends NullStoryReporter { private static final Logger logger = LoggerFactory.getLogger(CompanyStoryReporter.class);
@Override public void successful(String step) { logger.info(">>Successful Step: " + step); }
@Override public void pending(String step) { logger.warn(">>>Pending Step: " + step); }
@Override public void failed(String step, Throwable cause) { IntegrationFailureException transformedException = IntegrationFailureException.getInstance(cause); logger.error(">>Failed Step: " + step + "\nReason: " + transformedException.toString()); } `
To Reproduce Steps to reproduce the behavior:
- Implement a Jbehave integration like set above
- Run a set of 900+ tests using JBehave
- Check the allure results
Expected behavior The allure results should display the following for all the tests that are properly setup {"name":"test name","status":"passed","stage":"finished","description":"test description"...}
Screenshots The following output is set in the test results: {"name":"","status":"passed","stage":"finished","description":""...}
Environment (please complete the following information):
Allure version | 2.10.0 |
---|---|
Test framework | [email protected] |
Allure adaptor | [email protected] |
Generate report using | [email protected] |
Could you please provide a repository with reproducible project example?
You can detect the scenario with a missed name by looking at fullName
or nameless result. It will lead you to the story file containing the scenario without the name provided.