use of cucumber.api.StepDefinitionReporter in project cucumber-jvm by cucumber.
the class Runtime method run.
/**
* This is the main entry point. Used from CLI, but not from JUnit.
*/
public void run() throws IOException {
// Make sure all features parse before initialising any reporters/formatters
List<CucumberFeature> features = runtimeOptions.cucumberFeatures(resourceLoader);
// TODO: This is duplicated in cucumber.api.android.CucumberInstrumentationCore - refactor or keep uptodate
Formatter formatter = runtimeOptions.formatter(classLoader);
Reporter reporter = runtimeOptions.reporter(classLoader);
StepDefinitionReporter stepDefinitionReporter = runtimeOptions.stepDefinitionReporter(classLoader);
glue.reportStepDefinitions(stepDefinitionReporter);
for (CucumberFeature cucumberFeature : features) {
cucumberFeature.run(formatter, reporter, this);
}
formatter.done();
formatter.close();
printSummary();
}
use of cucumber.api.StepDefinitionReporter in project cucumber-jvm by cucumber.
the class CucumberExecutor method execute.
/**
* Runs the cucumber scenarios with the specified arguments.
*/
public void execute() {
runtimeOptions.addPlugin(new AndroidInstrumentationReporter(runtime, instrumentation, getNumberOfConcreteScenarios()));
runtimeOptions.addPlugin(new AndroidLogcatReporter(runtime, TAG));
// TODO: This is duplicated in info.cucumber.Runtime.
final Reporter reporter = runtimeOptions.reporter(classLoader);
final Formatter formatter = runtimeOptions.formatter(classLoader);
final StepDefinitionReporter stepDefinitionReporter = runtimeOptions.stepDefinitionReporter(classLoader);
runtime.getGlue().reportStepDefinitions(stepDefinitionReporter);
for (final CucumberFeature cucumberFeature : cucumberFeatures) {
cucumberFeature.run(formatter, reporter, runtime);
}
formatter.done();
formatter.close();
}
Aggregations