Search in sources :

Example 1 with StepDefinitionReporter

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();
}
Also used : CucumberFeature(cucumber.runtime.model.CucumberFeature) Formatter(gherkin.formatter.Formatter) StepDefinitionReporter(cucumber.api.StepDefinitionReporter) Reporter(gherkin.formatter.Reporter) StepDefinitionReporter(cucumber.api.StepDefinitionReporter)

Example 2 with StepDefinitionReporter

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();
}
Also used : CucumberFeature(cucumber.runtime.model.CucumberFeature) Formatter(gherkin.formatter.Formatter) Reporter(gherkin.formatter.Reporter) StepDefinitionReporter(cucumber.api.StepDefinitionReporter) StepDefinitionReporter(cucumber.api.StepDefinitionReporter)

Aggregations

StepDefinitionReporter (cucumber.api.StepDefinitionReporter)2 CucumberFeature (cucumber.runtime.model.CucumberFeature)2 Formatter (gherkin.formatter.Formatter)2 Reporter (gherkin.formatter.Reporter)2