Timings Incorrect and Embedded Attachments not present when using Cucumber 4.x
See original GitHub issueI’m submitting a …
- bug report
- feature request
- support request => Please do not submit support request here, see note at the top of this template.
What is the current behavior?
Since Cucumber 4.x events consumed by the Allure formatter plugin are not received until after the test run.
This results in the step timings showing values of 0ms and means that embedded attachments are orphaned. I believe this is because filters like like allure-rest-assured rely on the currently executing step being set in the formatter plugin.
It is possible to use a formatter that implements the ConcurrentEventListener
interface; however it may not be possible to determine the currently executing step for that thread.
I have raised a related github issue on cucumber here to add this info in the events. In doing this it may also be possible to match these up after the run in conjunction with the timestamps. https://github.com/cucumber/cucumber-jvm/issues/1491
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Will try to uplaod a demo at some point his evening.
What is the expected behavior?
Attachment should be embedded in steps. Test timings should reflect actual execution times.
What is the motivation / use case for changing the behavior?
Want to use Cucmber 4.x parallel with Allure + Embedded attachments
Please tell us about your environment:
Allure version | 2.7.0 |
---|---|
Allure-Restassured | 2.7.0 |
Cucumber | 4.0 - 4.10 |
Other information
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (6 by maintainers)
Top GitHub Comments
support for Cucumber 4 was released
@letsrokk @baev As as first attempt I cloned
AllureCucumber3Jvm
and created a newAllureCucumber4Jvm
package which implements theConcurrentEventListener
inteface. I also swapped the local variables forThreadLocals
.The good news is it appeared to work first time! 😃 I was also able to run it with one of our own Cucuimber4.x parallel test suites and could confirm the timings showed correctly along with the embedded attachments. The Steps also appeared in order.
I can throw this up on a branch if you like, but it was a small effort to change. Obviously this didn’t include any refactoring you mentioned.