-1

for workflow orchestra application where i say product is created and goes through continuous approval/workflow in which i would be creating product id which will be used across all the scenarios inside feature. The product id created in first scenarios to be used in other scenarios.

How to share the unique product id across scenraios for single feature file in step defination

Rajar R
  • 127
  • 1
  • 1
  • 10

1 Answers1

0

I hope you have organized your workflow dependent scenarios in single feature files in such a way that execution happens in the flow as per order in your feature file. In such case, yes, you can create a static variable and share among scenarios. If you intend to share multiple scenario id for parallel runs, then go for static hashmap approach, see my code sample : How to get scenario name from a scenario outline in cucumber using java

Bhuvanesh Mani
  • 1,394
  • 14
  • 23