Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions