[Junit 5] Steps are missing in report in case if test failed in @BeforeAll()
See original GitHub issueI’m submitting a …
- 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 | junit5@5.6.2 |
Allure integration | allure-junit5@2.13.2 |
Other information
@BeforeAll()
@BeforeEach()
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:5 (1 by maintainers)
Top Results From Across the Web
JUnit 5 does not execute method annotated with BeforeEach
In my case the problem was that the @Test annotation was taken from wrong import. Originally it was imported from org.junit.Test .
Read more >JUnit 5 User Guide
Beginning with Java 16, @BeforeAll and @AfterAll methods can be declared as static in a @Nested test class with either test instance lifecycle ......
Read more >Migrating from JUnit 4 to JUnit 5 | The IntelliJ IDEA Blog
Manual Migration for More Complex Cases ... If the tests in the project are fairly straightforward ones, this automatic migration should take care ......
Read more >Getting @BeforeAll and @AfterAll behaviour with Cucumber ...
No standard solution in Cucumber JVM ... The execution is controlled mostly by the step implementations. There is a fixed set of supported...
Read more >Maven Surefire Plugin – Using JUnit 5 Platform
This is the only step that is required to get started - you can now create tests in your test source directory (e.g.,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, nope, I didn’t, because I did not try to search workaround.
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:I’m not sure yet if this change will break something else or not, but existing junits in allure-junit-platform module are passing.