I need to pass a String value from one scenario to another.
Is that possible in Gauge?
Scenario 1: Login with username and password
Scenario 2: Username should be visible on the top right corner of the screen
Yes gauge has the special feature for that called "Data Store" where you can dynamically pass the values between scenarios and specs too.
Basically, gauge has 3 types of data stores.
ScenarioStore
- You can pass values between the steps inside a scenario. At the end of the scenario, that value and the data store variable will be disappear.SpecStore
- You can pass values between the scenarios inside a specification. At the end of the specification, that value and the data store variable will be disappear.SuiteStore
- You can pass values between the specifications. At the end of the test suite, that value and the data store variable will be disappear.Click here to implement data stores in your project.