Search in sources :

Example 1 with ParentRunner

use of org.junit.runners.ParentRunner in project cucumber-jvm by cucumber.

the class FeatureRunner method buildFeatureElementRunners.

private void buildFeatureElementRunners() {
    for (CucumberTagStatement cucumberTagStatement : cucumberFeature.getFeatureElements()) {
        try {
            ParentRunner featureElementRunner;
            if (cucumberTagStatement instanceof CucumberScenario) {
                featureElementRunner = new ExecutionUnitRunner(runtime, (CucumberScenario) cucumberTagStatement, jUnitReporter);
            } else {
                featureElementRunner = new ScenarioOutlineRunner(runtime, (CucumberScenarioOutline) cucumberTagStatement, jUnitReporter);
            }
            children.add(featureElementRunner);
        } catch (InitializationError e) {
            throw new CucumberException("Failed to create scenario runner", e);
        }
    }
}
Also used : CucumberScenarioOutline(cucumber.runtime.model.CucumberScenarioOutline) InitializationError(org.junit.runners.model.InitializationError) CucumberScenario(cucumber.runtime.model.CucumberScenario) CucumberTagStatement(cucumber.runtime.model.CucumberTagStatement) CucumberException(cucumber.runtime.CucumberException) ParentRunner(org.junit.runners.ParentRunner)

Aggregations

CucumberException (cucumber.runtime.CucumberException)1 CucumberScenario (cucumber.runtime.model.CucumberScenario)1 CucumberScenarioOutline (cucumber.runtime.model.CucumberScenarioOutline)1 CucumberTagStatement (cucumber.runtime.model.CucumberTagStatement)1 ParentRunner (org.junit.runners.ParentRunner)1 InitializationError (org.junit.runners.model.InitializationError)1