gherkin.formatter.model.Step Java Examples
The following examples show how to use
gherkin.formatter.model.Step.
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 |
protected void fireCanceledStep(final Step unimplementedStep) { final StepResult stepResult = new StepResult(); stepResult.setName(unimplementedStep.getName()) .setStart(System.currentTimeMillis()) .setStop(System.currentTimeMillis()) .setStatus(Status.SKIPPED) .setStatusDetails(new StatusDetails().setMessage("Unimplemented step")); lifecycle.startStep(scenario.getId(), getStepUuid(unimplementedStep), stepResult); lifecycle.stopStep(getStepUuid(unimplementedStep)); final StatusDetails statusDetails = new StatusDetails(); final TagParser tagParser = new TagParser(feature, scenario); statusDetails .setFlaky(tagParser.isFlaky()) .setMuted(tagParser.isMuted()) .setKnown(tagParser.isKnown()); lifecycle.updateTestCase(scenario.getId(), scenarioResult -> scenarioResult.setStatus(Status.SKIPPED) .setStatusDetails(statusDetails .setMessage("Unimplemented steps were found"))); }
Example #2
Source File: StepUtils.java From allure-java with Apache License 2.0 | 5 votes |
protected Step extractStep(final StepDefinitionMatch match) { try { final Field step = match.getClass().getDeclaredField("step"); step.setAccessible(true); return (Step) step.get(match); } catch (ReflectiveOperationException e) { //shouldn't ever happen LOG.error(e.getMessage(), e); throw new CucumberException(e); } }
Example #3
Source File: AllureReporter.java From allure-cucumberjvm with Apache License 2.0 | 5 votes |
private Step extractStep(StepDefinitionMatch match) { try { Field step = match.getClass().getDeclaredField("step"); step.setAccessible(true); return (Step) step.get(match); } catch (ReflectiveOperationException e) { //shouldn't ever happen LOG.error(e.getMessage(), e); throw new CucumberException(e); } }
Example #4
Source File: AllureReporter.java From allure-cucumberjvm with Apache License 2.0 | 5 votes |
private void fireCanceledStep(Step unimplementedStep) { String name = getStepName(unimplementedStep); ALLURE_LIFECYCLE.fire(new StepStartedEvent(name).withTitle(name)); ALLURE_LIFECYCLE.fire(new StepCanceledEvent()); ALLURE_LIFECYCLE.fire(new StepFinishedEvent()); //not to change FAILED status to CANCELED in the report ALLURE_LIFECYCLE.fire(new TestCasePendingEvent() { @Override protected String getMessage() { return "Unimplemented steps were found"; } }); currentStatus = SKIPPED; }
Example #5
Source File: StepUtils.java From allure-java with Apache License 2.0 | 4 votes |
protected boolean isEqualSteps(final Step step, final Step gherkinStep) { return Objects.equals(step.getLine(), gherkinStep.getLine()); }
Example #6
Source File: StepUtils.java From allure-java with Apache License 2.0 | 4 votes |
protected String getStepUuid(final Step step) { return feature.getId() + scenario.getId() + step.getName() + step.getLine(); }
Example #7
Source File: AllureCucumberJvm.java From allure-java with Apache License 2.0 | 4 votes |
public String getStepName(final Step step) { return step.getName(); }
Example #8
Source File: CucumberListener.java From AppiumTestDistribution with GNU General Public License v3.0 | 4 votes |
public void startOfScenarioLifeCycle(Scenario scenario) { createAppiumInstance(scenario); this.testSteps = new LinkedList<Step>(); System.out.println(testSteps); }
Example #9
Source File: AllureReporter.java From allure-cucumberjvm with Apache License 2.0 | 4 votes |
private boolean isEqualSteps(Step step, Step gherkinStep) { return Objects.equals(step.getLine(), gherkinStep.getLine()); }
Example #10
Source File: WrappedJSONFormatter.java From senbot with MIT License | 4 votes |
@Override public void step(Step arg0) { wrapped.step(arg0); }
Example #11
Source File: ParameterizedCucumber.java From senbot with MIT License | 4 votes |
@Override public void step(Step arg0) { getWrapped().step(arg0); }
Example #12
Source File: AllureReporter.java From allure-cucumberjvm with Apache License 2.0 | 2 votes |
public String getStepName(Step step) { return step.getKeyword() + step.getName(); }