cancel
Showing results for 
Search instead for 
Did you mean: 

Cucumber parallel execution - example status

KaranRaju
New Contributor

Cucumber parallel execution - example status

Hi Team,

 

We are trying to execute parallel execution using cucumber. But in our feature files we have multiple examples under a scenario. So when we are running tests in parallel one example failure is printing all the other examples as failure. How to extract test status from an example instead of scenario.getstatus. please help me

Tags (2)
5 REPLIES 5

Re: Cucumber parallel execution - example status

Hello,

 

Could you please give us more details for us to be able to reproduce your scenario?

 

Which cucumber are you using? Which version?

 

 

KaranRaju
New Contributor

Re: Cucumber parallel execution - example status

Hi Reeves,

I am using cucumber 6.8.0 version.
Whenever I am executing in parallel threads using core.cli.main if an example under a scenario fails. All the examples in that scenario are treated as failed. Which is wrong. I am using scenario.getstatus(). Is there any way to determine each example status when running cucumber tests in parallel

Re: Cucumber parallel execution - example status

Do you confirm you are using cucumber-jvm (cucumber for java)?

 

Did you try updating to cucumber-jvm to the latest - at the moment 6.10.2? 

 

If it is still happening, I would suggest to open an issue on cucumber-jvm issue tracker: https://github.com/cucumber/cucumber-jvm/issues

KaranRaju
New Contributor

Re: Cucumber parallel execution - example status

I just wanted to know whether there is any method to determine individual example status instead of scenario status.

Re: Cucumber parallel execution - example status

Ok, thanks for the clarification.

 

This is actually not supported by Cucumber.

 

Would you need that for altering the state while your test is executing? Or for reporting purpose?

 

If you want to alter the state of your test execution, this is actually a bad idea. It is good testing practices to start from a clean state for each and every executed test.

 

If this is for reporting purpose, hooks are not the good tools for that. As you can see there: https://github.com/cucumber/cucumber-jvm/blob/a64adbe2264dab2d4a5ee0f2d92d1b193b800a18/java/src/main... a custom formatter using the plugin system would be a better choice.

 

New Here?
Join us and watch the welcome video:
Announcements