Search in sources :

Example 6 with StepDefinitionMatch

use of cucumber.runtime.StepDefinitionMatch in project allure-cucumberjvm by allure-framework.

the class AllureReporter method match.

@Override
public void match(Match match) {
    if (match instanceof StepDefinitionMatch) {
        this.match = (StepDefinitionMatch) match;
        Step step = extractStep(this.match);
        synchronized (gherkinSteps) {
            while (gherkinSteps.peek() != null && !isEqualSteps(step, gherkinSteps.peek())) {
                fireCanceledStep(gherkinSteps.remove());
            }
            if (isEqualSteps(step, gherkinSteps.peek())) {
                gherkinSteps.remove();
            }
        }
        String name = this.getStepName(step);
        ALLURE_LIFECYCLE.fire(new StepStartedEvent(name).withTitle(name));
        createDataTableAttachment(step.getRows());
    }
}
Also used : StepDefinitionMatch(cucumber.runtime.StepDefinitionMatch) Step(gherkin.formatter.model.Step)

Aggregations

StepDefinitionMatch (cucumber.runtime.StepDefinitionMatch)6 Result (gherkin.formatter.model.Result)3 List (java.util.List)3 Test (org.junit.Test)3 Step (gherkin.formatter.model.Step)2 StepDefinition (cucumber.runtime.StepDefinition)1 StubStepDefinition (cucumber.runtime.StubStepDefinition)1 LocalizedXStreams (cucumber.runtime.xstream.LocalizedXStreams)1 I18n (gherkin.I18n)1