Cucumber java
My feature file looks like
Feature Scenario1:.... Generate a unique number
Scenario2:.... Do some validations on the unique number generated
Using spring for dependency injection, the unique number generated @ Scenario1 is assigned to a String, the same need to be used across the Scenario2 as well.
But I'm getting a String value as null @Scenario2. I think the dependency injection @ scenario2 is creatin a new object and is getting the default value as null.
Please help me on to resolve this issue. Need to know how java objects can be passed across different scenarios in a single feature..