allure-java
allure-java copied to clipboard
[Junit 5] Steps are missing in report in case if test failed in @BeforeAll()
I'm submitting a ...
- [X] bug report
What is the current behavior?
Report is empty If test fails in method under @BeforeAll()
annotation. allure-results folder contain data, but this data is not displayed in final html report.
See screenshots below as example.
What is the expected behavior?
Methods annotated with @BeforeAll()
annotation should be processed and displayed in report the same as methods annotated with @BeforeEach()
annotation.
Please tell us about your environment:
Allure version | 2.13.2 |
---|---|
Test framework | [email protected] |
Allure integration | [email protected] |
Other information
@BeforeAll()
@BeforeEach()
@Legionivo did you find any workaround for this issue?
@Legionivo did you find any workaround for this issue?
Hello, nope, I didn't, because I did not try to search workaround.
Looks like JUnit5 not fully supported :( It's a must if you run functional regression tests.
It looks like it is happening because of missing child (container -> result) reference in test container json file.
I was able to get it working correctly by modifying io.qameta.allure.junitplatform.AllureJunitPlatform#stopTestContainer
method. I commented the following if
there:
// if (testIdentifier.isTest()) {
getTest(testIdentifier).ifPresent(children::add);
// }
I'm not sure yet if this change will break something else or not, but existing junits in allure-junit-platform module are passing.
I'm not sure yet if this change will break something else or not, but existing junits in allure-junit-platform module are passing.
Yep, also helped me: now in report saw steps&attachments when "test broken"
It looks like it is happening because of missing child (container -> result) reference in test container json file.
I was able to get it working correctly by modifying
io.qameta.allure.junitplatform.AllureJunitPlatform#stopTestContainer
method. I commented the followingif
there:// if (testIdentifier.isTest()) { getTest(testIdentifier).ifPresent(children::add); // }
I'm not sure yet if this change will break something else or not, but existing junits in allure-junit-platform module are passing.
@martinsefcik @S-Kerrigan Can you tell me how you solved the problem in more detail? I don't understand how to do it..
@korpus95 I didn't solve the problem, I just proposed what needs to be changed in allure-java library to fix it.
@Legionivo Have you found a way to solve the problem?
@Legionivo I checked, the problem is solved