-
-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run scenario outline multiple time for list of data #1458
Comments
Cucumber doesn't support dynamic example lists. It would be more usual just to have multiple examples tables in the same feature file, e.g. Examples: USA Examples: India |
Thanks for reply. But size of list isn’t fixed so i think multi examples will not work here.. |
You could do it easily enough in Screenplay by making a dynamic list of tasks or consequences. If you are trying to do it with Cucumber, you are probably using the wrong tool - what you are doing is test scripting, and Cucumber is not a test scripting tool. |
thanks @wakaleo for reply could you please share some examples of screenplay. Thanks in advance. |
Can I refer "https://github.com/serenity-bdd/serenity-screenplay-train-demo" for screenplay functionality? |
Hi @wakaleo
I know it's not a right platform to ask questions.
I want to run my scenario outline examples with different set of data and data is dynamic for examples.
For eg:
I am having java List say L which contains values of country like USA, INDIA UK and so on.(which will generated dynamically) and I want to run my examples with set of data for eg:
Examples:
|Country| State| Region|
|USA | ABC | DEF |
|USA | GHI | JKL |
|USA | MNO | PQR |
Now I want above examples will run for first USA and then for INDIA and so on(as per data in list)
I tried to make it run by using following
public class ABC {
@test
public void run() throws Throwable {
for(String s: L){
net.serenitybdd.cucumber.cli.Main.main(new String[] { "-g", "Path of Step Defs","Path of feature file" });
}
}
}
and running above class as "clean verify -Dit.test=Abc.java"
It is running fine for first data from list and report generated successfully, but it is not running for rest of data. Please suggest how can I achieve above part.
Thanks in advance.
The text was updated successfully, but these errors were encountered: