question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timings Incorrect and Embedded Attachments not present when using Cucumber 4.x

See original GitHub issue

I’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

See: https://github.com/cucumber/cucumber-jvm/issues/1491

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
baevcommented, Jan 14, 2019

support for Cucumber 4 was released

0reactions
james-bjsscommented, Oct 26, 2018

@letsrokk @baev As as first attempt I cloned AllureCucumber3Jvm and created a new AllureCucumber4Jvm package which implements theConcurrentEventListener inteface. I also swapped the local variables for ThreadLocals.

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.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cucumber-Ruby 4.0.0 has been released
Solved: This is the first stable Cucumber release of the 4.x series. It's the first stable release for 2 years. Upgrading from 3.x...
Read more >
Cucumber embed for screenshots not linking to screenshot
I have experimented with a number of methods of saving screenshots, but settled on the method that is built into watir-webdriver. No matter...
Read more >
Cucumber Report | Taking Screenshot & Embedding Inside
We have solved our Problem statement and now we are able to capture screen shot and embeded within cucumber report in case of...
Read more >
Import Execution Results - Xray Documentation
External execution results from either automated and manual Tests can be imported to Jira. This operation may be done in one of two...
Read more >
SOAP Attachments and Files | SoapUI
CONTENT (an inline file attachment); UNKNOWN ( attachments, not assigned to any specific message part). This value depends on the message part with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found