@Override public void runStep(final String featurePath, final Step step, final Reporter reporter, final I18n i18n) { super.runStep(featurePath, step, new Reporter() { @Override public void match(final Match match) { // lazy to get the method and instance
/** } /** * This encapsulates the {@link cucumber.runtime.Runtime#runStep} method with a level of safety, and provides information back to the barrier about whether it is safe to kill the running thread. */ @Override public void runStep(String featurePath, Step step, Reporter reporter, I18n i18n) { LOGGER.trace(String.format("Running step from ZucchiniRuntime: [%s, %s, %s, %s]", featurePath.toString(), step.toString(), reporter.toString(), i18n.toString())); TestContext tc = TestContext.getCurrent(); try { tc.canKill = true; super.runStep(featurePath, step, reporter, i18n); tc.canKill = false; } catch(Throwable t) { tc.canKill = false; this.addError(t); } } }