gherkin.formatter.model.Match Java Examples

The following examples show how to use gherkin.formatter.model.Match. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StepUtils.java    From allure-java with Apache License 2.0 6 votes vote down vote up
protected void fireFixtureStep(final Match match, final Result result, final boolean isBefore) {
    final String uuid = md5(match.getLocation());
    final StepResult stepResult = new StepResult()
            .setName(match.getLocation())
            .setStatus(Status.fromValue(result.getStatus()))
            .setStart(System.currentTimeMillis() - result.getDuration())
            .setStop(System.currentTimeMillis());
    if (FAILED.equals(result.getStatus())) {
        final StatusDetails statusDetails = ResultsUtils.getStatusDetails(result.getError()).get();
        stepResult.setStatusDetails(statusDetails);
        if (isBefore) {
            final TagParser tagParser = new TagParser(feature, scenario);
            statusDetails
                    .setMessage("Before is failed: " + result.getError().getLocalizedMessage())
                    .setFlaky(tagParser.isFlaky())
                    .setMuted(tagParser.isMuted())
                    .setKnown(tagParser.isKnown());
            lifecycle.updateTestCase(scenario.getId(), scenarioResult ->
                    scenarioResult.setStatus(Status.SKIPPED)
                            .setStatusDetails(statusDetails));
        }
    }
    lifecycle.startStep(scenario.getId(), uuid, stepResult);
    lifecycle.stopStep(uuid);
}
 
Example #2
Source File: ParameterizedCucumber.java    From senbot with MIT License 5 votes vote down vote up
@Override
public void match(Match arg0) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.match(arg0);
	}
	
}
 
Example #3
Source File: ParameterizedCucumber.java    From senbot with MIT License 5 votes vote down vote up
@Override
public void before(Match arg0, Result arg1) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.before(arg0, arg1);
	}
	
}
 
Example #4
Source File: ParameterizedCucumber.java    From senbot with MIT License 5 votes vote down vote up
@Override
public void after(Match arg0, Result arg1) {
	Reporter wrappedReporter = getWrappedReporter();
	if(wrappedReporter != null) {
		wrappedReporter.after(arg0, arg1);
	}
}
 
Example #5
Source File: CukesHooks.java    From Decision with Apache License 2.0 4 votes vote down vote up
@Override
public void after(Match match, Result result) {
    // TODO Auto-generated method stub
}
 
Example #6
Source File: ParameterizedCucumber.java    From senbot with MIT License 4 votes vote down vote up
@Override
public void after(Match arg0, Result arg1) {
	getWrapped().after(arg0, arg1);
	
}
 
Example #7
Source File: ParameterizedCucumber.java    From senbot with MIT License 4 votes vote down vote up
@Override
public void before(Match arg0, Result arg1) {
	getWrapped().before(arg0, arg1);
}
 
Example #8
Source File: ParameterizedCucumber.java    From senbot with MIT License 4 votes vote down vote up
@Override
public void match(Match arg0) {
	getWrapped().match(arg0);
}
 
Example #9
Source File: WrappedJSONFormatter.java    From senbot with MIT License 4 votes vote down vote up
@Override
public void match(Match arg0) {
	wrapped.match(arg0);
}
 
Example #10
Source File: WrappedJSONFormatter.java    From senbot with MIT License 4 votes vote down vote up
@Override
public void before(Match arg0, Result arg1) {
	wrapped.before(arg0, arg1);
}
 
Example #11
Source File: WrappedJSONFormatter.java    From senbot with MIT License 4 votes vote down vote up
@Override
public void after(Match arg0, Result arg1) {
	wrapped.after(arg0, arg1);
}
 
Example #12
Source File: CukesHooks.java    From Decision with Apache License 2.0 4 votes vote down vote up
@Override
public void before(Match match, Result result) {
    // TODO Auto-generated method stub

}
 
Example #13
Source File: AllureReporter.java    From allure-cucumberjvm with Apache License 2.0 4 votes vote down vote up
@Override
public void after(Match match, Result result) {
    //Nothing to do with Allure
}
 
Example #14
Source File: AllureReporter.java    From allure-cucumberjvm with Apache License 2.0 4 votes vote down vote up
@Override
public void before(Match match, Result result) {
    //Nothing to do with Allure
}
 
Example #15
Source File: HtmlFormatter.java    From scott with MIT License 4 votes vote down vote up
@Override
public void after(Match match, Result result) {
    jsFunctionCall("after", result);
}
 
Example #16
Source File: HtmlFormatter.java    From scott with MIT License 4 votes vote down vote up
@Override
public void before(Match match, Result result) {
    jsFunctionCall("before", result);
}
 
Example #17
Source File: CucumberListener.java    From AppiumTestDistribution with GNU General Public License v3.0 4 votes vote down vote up
public void before(Match match, Result result) {
}
 
Example #18
Source File: AllureCucumberJvm.java    From allure-java with Apache License 2.0 4 votes vote down vote up
@Override
public void after(final Match match, final Result result) {
    new StepUtils(currentFeature, currentScenario).fireFixtureStep(match, result, false);
}
 
Example #19
Source File: AllureCucumberJvm.java    From allure-java with Apache License 2.0 4 votes vote down vote up
@Override
public void before(final Match match, final Result result) {
    new StepUtils(currentFeature, currentScenario).fireFixtureStep(match, result, true);
}
 
Example #20
Source File: CucumberListener.java    From AppiumTestDistribution with GNU General Public License v3.0 2 votes vote down vote up
public void after(Match match, Result result) {

    }