Question
Is it possible to iterate through a variable inside a scenario like a scenario outline? I have a scenario like this where i used to
Is it possible to iterate through a variable inside a scenario like a scenario outline?
I have a scenario like this where i used to save the operator abbreviations in a variable (once i retrieve the operator abbr , i will have a list of strings in that operatorAbbr variable). the count of the size of the operator abbr cant be predicted. for everyday that will be different, so list size is not available
Scenario: Scenario1 Given I set the test environment to "$env$" And I retrieve the details for the operator(s) from the database and save in variable "$operatorAbbr$" | DAYKEY | $DAYKEY$ | | MODE | $MODE$ |
This is the scenario i created to retrieve the information from the database is working fine.
Now i want to operate on each operator abbreviations (list i saved) . Is there a way to operate over this variable $operatorAbbr$ using a foreach loop or like an Scenario Outline with an example avoiding the step
And I retrieve the details for the operator(s) from the database and save in variable "$operatorAbbr$"
I am expecting something like this
Scenario Outline: Scenario1 Given I set the test environment to "$env$" And I retrieve the details for the operator(s) from the database and save in variable "$operatorAbbr$" | DAYKEY | $DAYKEY$ | | MODE | $MODE$ | | ENV | $env$ |
Examples:
|ForEach($operatorAbbr$)|
Please help.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started