@Override public void run(final RunNotifier notifier) { EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription()); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.fireTestIgnored(); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.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(); } }
/** * 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(); } }
@Override public void run(final RunNotifier notifier) { EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription()); testNotifier.fireTestSuiteStarted(); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.addFailedAssumption(e); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.addFailure(e); } finally { testNotifier.fireTestSuiteFinished(); } }
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); } }
@Override public void run(final RunNotifier notifier) { final Description description = getDescription(); final EachTestNotifier testNotifier = new EachTestNotifier(notifier, description); final Statement statement = classBlock(notifier); try { statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.fireTestIgnored(); } catch (StoppedByUserException e) { // not retrying when user explicitly stops the test throw e; } catch (Throwable e) { // retry on any other exception retry(description, testNotifier, statement, e); } }
@Override public void run(final RunNotifier notifier) { EachTestNotifier testNotifier = new EachTestNotifier(notifier, getDescription()); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.fireTestIgnored(); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.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(); } }
@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 public void run(RunNotifier notifier) { registerRunNotifierListener(notifier); Description description = getDescription(); enableRateRunner = isRateRunnerEnabled(); EachTestNotifier testNotifier = new EachTestNotifier(notifier, description); try { Statement statement = classBlock(notifier); statement.evaluate(); } catch (AssumptionViolatedException e) { testNotifier.fireTestIgnored(); } catch (StoppedByUserException e) { throw e; } catch (Throwable e) { testNotifier.addFailure(e); } }
private EachTestNotifier makeNotifier(FrameworkMethod method, RunNotifier notifier) { Description description= describeChild(method); return new EachTestNotifier(notifier, description); }
private EachTestNotifier makeNotifier(FrameworkMethod method, RunNotifier notifier) { Description description = describeChild(method); return new EachTestNotifier(notifier, description); } }
private EachTestNotifier makeNotifier(FrameworkMethod method, RunNotifier notifier) { Description description = describeChild(method); return new EachTestNotifier(notifier, description); }
private EachTestNotifier makeNotifier(FrameworkMethod method, RunNotifier notifier) { Description description = describeChild(method); return new EachTestNotifier(notifier, description); }
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"); }
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(); }
@Override public void match(Match match) { Step runnerStep = fetchAndCheckRunnerStep(); Description description = executionUnitRunner.describeChild(runnerStep); stepNotifier = new EachTestNotifier(runNotifier, description); reporter.match(match); }
@Override public void run(RunNotifier notifier) { Description childDescription = Description.createTestDescription(getClass(), "Test"); desc.addChild(childDescription); EachTestNotifier singleNotifier = new EachTestNotifier(notifier, childDescription); singleNotifier.addFailedAssumption(new AssumptionViolatedException("Test 2")); singleNotifier.addFailedAssumption(new AssumptionViolatedException("Test 1")); singleNotifier.addFailure(new IllegalArgumentException("Test")); } };
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(); } }