public String getResultStatus() { if (result != null) { return result.getStatus(); } return "skipped"; }
/** * Gets the total number of passed tests. */ @Override public int getPassCount() { return CucumberUtils.PASSED_TEST_STRING.equals(result.getStatus()) ? 1 : 0; }
/** * Gets the total number of passed tests. */ public int getPassCount() { return CucumberUtils.PASSED_TEST_STRING.equals(result.getStatus()) ? 1 : 0; }
@Override public void result(Result result) { if (result.getStatus().equals(Result.FAILED)) { progress.addFailedScenario(); } }
private void handleHook(Result result) { if (result.getStatus().equals(Result.FAILED)) { fireFailure(result); } }
public static RESULT_TYPE typeFromResult(Result r) { return RESULT_TYPE.valueOf(r.getStatus().toUpperCase(Locale.UK)); } }
@Override protected void hookFinished(Match match, Result result, Boolean isBefore) { reportResult(result, (isBefore ? "Before" : "After") + " hook: " + match.getLocation()); if (result.getStatus().equals("failed")) { hookStatus = Statuses.FAILED; } }
@Override protected void afterStep(Result result) { reportResult(result, decorateMessage("STEP " + result.getStatus().toUpperCase())); }
public void before(Match match, Result result) { if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, "rep before match: " + match.getLocation()); LOG.log(Level.FINE, "rep result : " + "(passed) " + Result.PASSED.equals(result.getStatus())); LOG.log(Level.FINE, "rep result : " + result.getDuration()); LOG.log(Level.FINE, "rep result : " + result.getErrorMessage()); LOG.log(Level.FINE, "rep result : " + result.getError()); } currentScenarioResult.addBeforeResult(new BeforeAfterResult(match, result)); }
public void after(Match match, Result result) { if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, "rep after match : " + match.getLocation()); LOG.log(Level.FINE, "rep result : " + "(passed) " + Result.PASSED.equals(result.getStatus())); LOG.log(Level.FINE, "rep result : " + result.getDuration()); LOG.log(Level.FINE, "rep result : " + result.getErrorMessage()); LOG.log(Level.FINE, "rep result : " + result.getError()); } currentScenarioResult.addAfterResult(new BeforeAfterResult(match, result)); }
@Override public void result( Result result ) { super.result( result ); if( result.getStatus().equals( Result.FAILED ) && BooleanUtils.toBoolean( System.getProperty( PROPERTY_PAUSE_ON_ERROR )) ){ JFrame jf = new JFrame(); JOptionPane.showMessageDialog( jf, result.getErrorMessage(), "Exception occurred!", JOptionPane.INFORMATION_MESSAGE ); jf.toFront(); jf.repaint(); } }
public ResultExec convertResult(Result result) { return new ResultExec( result.getStatus(), result.getError(), result.getErrorMessage(), result.getDuration()); }
@Override protected void afterStep(Result result) { reportResult(result, null); Utils.finishTestItem(RP.get(), currentStepId, Utils.mapStatus(result.getStatus())); currentStepId = null; }
private void handleHook(Result result) { if (result.getStatus().equals(Result.FAILED) || (strict && isPending(result.getError()))) { executionUnitNotifier.addFailure(result.getError()); } else if (isPending(result.getError())) { ignoredStep = true; } }
private void handleHook(Result result) { if (result.getStatus().equals(Result.FAILED) || (strict && isPending(result.getError()))) { executionUnitNotifier.addFailure(result.getError()); } else if (isPending(result.getError())) { ignoredStep = true; } }