/** * Runs a {@link Statement} that represents a leaf (aka atomic) test. */ protected final void runLeaf(Statement statement, Description description, RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { eachNotifier.addFailure(e); } finally { eachNotifier.fireTestFinished(); } }
/** * Runs a {@link Statement} that represents a leaf (aka atomic) test. */ protected final void runLeaf(Statement statement, Description description, RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { eachNotifier.addFailure(e); } finally { eachNotifier.fireTestFinished(); } }
private void runTestUnit(final Statement statement, final Description description, final RunNotifier notifier) { final EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { retry(description, eachNotifier, statement, e); } finally { eachNotifier.fireTestFinished(); } }
@Override protected void runChild(JSONObject child, RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, describeChild(child)); eachNotifier.fireTestStarted(); try { new TestCaseRunner(child).run(); eachNotifier.fireTestFinished(); } catch (Exception | AssertionError e) { eachNotifier.addFailure(e); } }
/** * Runs a {@link Statement} that represents a leaf (aka atomic) test. */ protected final void runLeaf(Statement statement, Description description, RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { eachNotifier.addFailure(e); } finally { eachNotifier.fireTestFinished(); } }
RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate();
@Override public void runChild(final FrameworkMethod method, final RunNotifier notifier) { final Description description = describeChild(method); if (this.isIgnored(method)) { notifier.fireTestIgnored(description); } else { final EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); boolean ignored = false; try { this.methodBlock(method).evaluate(); } catch (AssumptionViolatedException ave) { eachNotifier.addFailedAssumption(ave); } catch (Throwable e) { if (validateForGraphComputer(e)) { eachNotifier.fireTestIgnored(); logger.info(e.getMessage()); ignored = true; } else eachNotifier.addFailure(e); } finally { if (!ignored) eachNotifier.fireTestFinished(); } } }
@Override protected void beforeExecution(final EachTestNotifier notifier) { notifier.fireTestStarted(); }
public void startExecutionUnit(ExecutionUnitRunner executionUnitRunner, RunNotifier runNotifier) { this.executionUnitRunner = executionUnitRunner; this.runNotifier = runNotifier; this.stepNotifier = null; this.failedStep = false; this.ignoredStep = false; executionUnitNotifier = new EachTestNotifier(runNotifier, executionUnitRunner.getDescription()); executionUnitNotifier.fireTestStarted(); }
public void startExecutionUnit(ExecutionUnitRunner executionUnitRunner, RunNotifier runNotifier) { this.executionUnitRunner = executionUnitRunner; this.runNotifier = runNotifier; this.stepNotifier = null; this.failedStep = false; this.ignoredStep = false; executionUnitNotifier = new EachTestNotifier(runNotifier, executionUnitRunner.getDescription()); executionUnitNotifier.fireTestStarted(); // PageRecorder.showMessage(executionUnitRunner.getDescription().getDisplayName(), // "info"); }
... protected final void runLeaf(Statement statement, Description description, RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate(); <-- test method execution is called from here } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { eachNotifier.addFailure(e); } finally { eachNotifier.fireTestFinished(); } }
private void addFailureOrIgnoreStep(Result result) { if (strict) { stepNotifier.fireTestStarted(); addFailure(result); stepNotifier.fireTestFinished(); } else { ignoredStep = true; stepNotifier.fireTestIgnored(); } }
private void addFailureOrIgnoreStep(Result result) { if (strict) { stepNotifier.fireTestStarted(); addFailure(result); stepNotifier.fireTestFinished(); } else { ignoredStep = true; stepNotifier.fireTestIgnored(); } }
private void runNotIgnored(FrameworkMethod method, EachTestNotifier eachNotifier) { eachNotifier.fireTestStarted(); try { Statement statement = methodBlock(method); statement.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { eachNotifier.addFailure(e); } finally { eachNotifier.fireTestFinished(); } }
private void runMethodInvoker(RunNotifier notifier, Statement methodInvoker, Description methodWithParams) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, methodWithParams); eachNotifier.fireTestStarted(); try { methodInvoker.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { eachNotifier.addFailure(e); } finally { eachNotifier.fireTestFinished(); } }
/** * Runs a {@link Statement} that represents a leaf (aka atomic) test. */ protected final void runLeaf(Statement statement, Description description, RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { eachNotifier.addFailure(e); } finally { eachNotifier.fireTestFinished(); } }
/** * Runs a {@link Statement} that represents a leaf (aka atomic) test. */ protected final void runLeaf(Statement statement, Description description, RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { eachNotifier.addFailure(e); } finally { eachNotifier.fireTestFinished(); } }
/** * Runs a {@link Statement} that represents a leaf (aka atomic) test. */ protected final void runLeaf(Statement statement, Description description, RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { eachNotifier.addFailure(e); } finally { eachNotifier.fireTestFinished(); } }
/** * Runs a {@link Statement} that represents a leaf (aka atomic) test. */ protected final void runLeaf(Statement statement, Description description, RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { eachNotifier.addFailure(e); } finally { eachNotifier.fireTestFinished(); } }
private void runTest(Statement statement, Description description, RunNotifier notifier) { EachTestNotifier eachNotifier = new EachTestNotifier(notifier, description); eachNotifier.fireTestStarted(); try { statement.evaluate(); } catch (AssumptionViolatedException e) { eachNotifier.addFailedAssumption(e); } catch (Throwable e) { LOG.warning("Retry test: " + description.getDisplayName()); retry(eachNotifier, statement, e, description); } finally { eachNotifier.fireTestFinished(); } }