Run Scenario when ends another other one (JAVA)
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2021
09:33 AM
04-27-2021
09:33 AM
Run Scenario when ends another other one (JAVA)
Hello!
I'm running in parallel some scenarios, but i need run one when other ends...
I don't know if it is possible... I don't want do a so long scenario in gherkin, i want to start the second when the first was ended.
My run file:
import io.cucumber.testng.AbstractTestNGCucumberTests;
import io.cucumber.testng.CucumberOptions;
import org.testng.annotations.DataProvider;
@CucumberOptions(
features = {"src/main/resources/features"},
plugin = {
"pretty",
"json:target/cucumber-reports/cucumber.json",
"html:target/cucumber-reports/cucumber-pretty.html",
"rerun:target/cucumber-reports/rerun.txt",
"junit:target/cucumber-reports/cucumber.xml",
},
glue = {"steps"},
tags = "@a",
monochrome = true
)
//@RunWith(Cucumber.class)
public class runParallel extends AbstractTestNGCucumberTests {
@Override
@DataProvider(parallel = true)
public Object[][] scenarios() {
return super.scenarios();
}
}
Thanks for all!
Solved! Go to Solution.
Labels:
- Labels:
-
Cucumber-JVM
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2021
03:28 AM
04-28-2021
03:28 AM
It's not possible to have one scenario depend on another Scenario in Cucumber. This is a deliberate design decision since coupling scenarios relies on side-effects, and this is known to produce non-deterministic behaviour for scenarios. (They can no longer be run in isolation).
------
I'm the creator and lead developer of Cucumber Open.
I'm the creator and lead developer of Cucumber Open.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2021
04:55 AM
04-28-2021
04:55 AM
Finally i found a solution for my scenario.
With a boolean, loop wihle and wait for element i do it.
Thanks!
