Tabnine Logo
Result.getIgnoreCount
Code IndexAdd Tabnine to your IDE (free)

How to use
getIgnoreCount
method
in
org.junit.runner.Result

Best Java code snippets using org.junit.runner.Result.getIgnoreCount (Showing top 20 results out of 315)

origin: jamesdbloom/mockserver

@Override
public void testRunFinished(Result result) {
  if (result != null) {
    System.out.println("testRunFinished " + String.valueOf(result)
      + " time:" + String.valueOf(result.getRunTime())
      + " R" + String.valueOf(result.getRunCount())
      + " F" + String.valueOf(result.getFailureCount())
      + " I" + String.valueOf(result.getIgnoreCount())
    );
  }
}
origin: apache/usergrid

public Result execute() {
  Preconditions.checkState( isStarted.get(), "Cannot execute a tracker that has not started!" );
  Result result = new JUnitCore().run( testClass );
  long runTime = result.getRunTime();
  // collect some statistics
  maxTime = Math.max( maxTime, runTime );
  minTime = Math.min( minTime, runTime );
  long timesRun = actualIterations.incrementAndGet();
  long totalTime = totalRunTime.addAndGet( runTime );
  totalTestsRun.addAndGet( result.getRunCount() );
  meanTime = totalTime / timesRun;
  if ( ! result.wasSuccessful() ) {
    failures.addAndGet( result.getFailureCount() );
    ignores.addAndGet( result.getIgnoreCount() );
  }
  resultsLog.write( result );
  return result;
}
origin: com.novocode/junit-interface

@Override
public void testRunFinished(Result result)
{
 debugOrInfo(c("Test run finished: ", INFO)+
  c(result.getFailureCount()+" failed", result.getFailureCount() > 0 ? ERRCOUNT : INFO)+
  c(", ", INFO)+
  c(result.getIgnoreCount()+" ignored", result.getIgnoreCount() > 0 ? IGNCOUNT : INFO)+
  c(", "+result.getRunCount()+" total, "+(result.getRunTime()/1000.0)+"s", INFO));
}
origin: org.jboss.arquillian.junit/arquillian-junit-container

  @Test
  public void should_not_execute_class_rule() throws Exception {
    // given
    TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
    executeAllLifeCycles(adaptor);

    // when
    Result result = run(adaptor, ClassWithArquillianRunnerWithRules.class);

    // then
    Assert.assertTrue(result.wasSuccessful());
    Assert.assertEquals(0, result.getFailureCount());
    Assert.assertEquals(0, result.getIgnoreCount());
    assertCycle(1, Cycle.BEFORE_RULE, Cycle.BEFORE_CLASS, Cycle.BEFORE, Cycle.TEST, Cycle.AFTER, Cycle.AFTER_CLASS,
      Cycle.AFTER_RULE);
    assertCycle(0, Cycle.BEFORE_CLASS_RULE, Cycle.AFTER_CLASS_RULE);
  }
}
origin: org.unitils/unitils-test

public int getIgnoreCount() {
  return result.getIgnoreCount();
}
 
origin: SpoonLabs/nopol

@Override
public int getIgnoreCount() {
  int total = 0;
  for (Result result : results()) {
    total += result.getIgnoreCount();
  }
  return total;
}
origin: org.eclipse.che.plugin/che-plugin-testing-junit-runtime

/**
 * Prints an information about result of the test running.
 *
 * @param out output stream
 * @param result the summary of the test run, including all the tests that failed
 */
public static void testRunFinished(PrintStream out, Result result) {
 out.printf(
   "Total tests run: %d, Failures: %d, Skips: %d",
   result.getRunCount(), result.getFailureCount(), result.getIgnoreCount());
}
origin: org.apache.sling/org.apache.sling.junit.core

@Override
public void testRunFinished(Result result) throws Exception {
  super.testRunFinished(result);
  output.println("TEST RUN FINISHED: "
      + "tests:" + result.getRunCount()
      + ", failures:" + result.getFailureCount()
      + ", ignored:" + result.getIgnoreCount()
  );
}
origin: SpoonLabs/nopol

private void logTestRunFinished(Result result) {
  Collection<String> lines = MetaList.newArrayList();
  lines.add(format("Tests run finished (%d ms)", result.getRunTime()));
  lines.add("<> Total tests run: " + result.getRunCount());
  lines.add("<> Ignored tests: " + result.getIgnoreCount());
  lines.add("<> Failed tests: " + result.getFailureCount());
  for (Failure failure : result.getFailures()) {
    lines.add("~ " + failure.getTestHeader());
    lines.add("[" + failure.getMessage() + "]");
    Throwable exception = failure.getException();
    lines.add(exception.toString());
    for (int i = 0; i <= 5; i += 1) {
      StackTraceElement element = exception.getStackTrace()[i];
      lines.add("    at " + element.toString());
    }
  }
  //logDebug(logger(), lines);
}
origin: io.tourniquet.junit/tourniquet-core

private void copyFields(final Result old, final Result result) throws NoSuchFieldException, IllegalAccessException {
  final AtomicInteger count = getAccessibleResultField(result, "count");
  count.set(old.getRunCount());
  final AtomicInteger ignoreCount = getAccessibleResultField(result, "ignoreCount");
  ignoreCount.set(old.getIgnoreCount());
  final AtomicLong runTime = getAccessibleResultField(result, "runTime");
  runTime.set(old.getRunTime());
  final AtomicLong startTime = getAccessibleResultField(result, "startTime");
  startTime.set(((AtomicLong) getAccessibleResultField(old, "startTime")).get());
}
origin: se.redmind/rmtest-core

public void setResult(Result result) {
  this.totalFail = result.getFailureCount();
  this.totalIgnored = result.getIgnoreCount();
  this.runTime = (double) result.getRunTime() / 1000;
  this.success = result.wasSuccessful();
}
origin: se.redmind/rmtest-selenium

public void setResult(Result result) {
  this.totalFail = result.getFailureCount();
  this.totalIgnored = result.getIgnoreCount();
  this.runTime = (double) result.getRunTime() / 1000;
  this.success = result.wasSuccessful();
}
origin: com.carrotsearch.randomizedtesting/junit4-ant

public void testRunFinished(Result result) throws Exception {
 debug(debug, "testRunFinished(T:" + result.getRunCount() + ";F:" + result.getFailureCount() + ";I:" + result.getIgnoreCount() + ")");
 serializer.flush();
}
origin: randomizedtesting/randomizedtesting

public void testRunFinished(Result result) throws Exception {
 debug(debug, "testRunFinished(T:" + result.getRunCount() + ";F:" + result.getFailureCount() + ";I:" + result.getIgnoreCount() + ")");
 serializer.flush();
}
origin: apache/jena

protected void printSummary(Result result)
{
  int badCount =  result.getFailureCount() ;
  int ignoredCount = result.getIgnoreCount() ;
  int goodCount = result.getRunCount() - badCount - ignoredCount ;
  
  fWriter.print("Tests = "+result.getRunCount()) ;
  fWriter.print(" : Successes = "+goodCount) ;
  if ( ignoredCount > 0 )
    fWriter.print(" : Ignored = "+ignoredCount) ;
  fWriter.print(" : Failures = "+badCount) ;
  fWriter.println() ;
  fWriter.println() ;
}

origin: io.hawt/hawtio-junit

public ResultDTO(Result result) {
  this.successful = result.wasSuccessful();
  this.ignoreCount = result.getIgnoreCount();
  this.failureCount = result.getFailureCount();
  this.runCount = result.getRunCount();
  this.runTime = result.getRunTime();
  List<Failure> failureList = result.getFailures();
  for (Failure failure : failureList) {
    failures.add(new FailureDTO(failure));
  }
}
origin: blackboard/lambda-selenium

public TestResult(Result result) {
  runCount = result.getRunCount();
  failureCount = result.getFailureCount();
  ignoreCount = result.getIgnoreCount();
  runTime = result.getRunTime();
  if (!wasSuccessful()) {
    throwable = result.getFailures().get(0).getException();
  }
}
origin: greghaskins/spectrum

private static void ignoringContextExample() throws Exception {
 class Example {
  {
   describe("a spec with", () -> {
    xcontext("an ignored context", () -> {
     it("does not run the spec", () -> {
     });
    });
   });
  }
 }
 final Result result = SpectrumHelper.run(Example.class);
 Assert.assertThat(result.getIgnoreCount(), Is.is(1));
}
origin: org.jboss.arquillian.junit/arquillian-junit-core

@Test
public void shouldWorkWithAssume() throws Exception {
  TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
  executeAllLifeCycles(adaptor);
  final List<Failure> assumptionFailure = new ArrayList<Failure>();
  Result result = run(adaptor, new RunListener() {
    @Override
    public void testAssumptionFailure(Failure failure) {
      assumptionFailure.add(failure);
    }
  }, ClassWithArquillianClassAndMethodRuleWithAssume.class);
  Assert.assertEquals(1, assumptionFailure.size());
  Assert.assertTrue(result.wasSuccessful());
  Assert.assertEquals(0, result.getFailureCount());
  Assert.assertEquals(0, result.getIgnoreCount());
  assertCycle(1, Cycle.BEFORE_CLASS, Cycle.BEFORE, Cycle.AFTER, Cycle.AFTER_CLASS);
  verify(adaptor, times(1)).beforeSuite();
  verify(adaptor, times(1)).afterSuite();
}
origin: arquillian/arquillian-core

  @Test
  public void should_not_execute_class_rule() throws Exception {
    // given
    TestRunnerAdaptor adaptor = mock(TestRunnerAdaptor.class);
    executeAllLifeCycles(adaptor);

    // when
    Result result = run(adaptor, ClassWithArquillianRunnerWithRules.class);

    // then
    Assert.assertTrue(result.wasSuccessful());
    Assert.assertEquals(0, result.getFailureCount());
    Assert.assertEquals(0, result.getIgnoreCount());
    assertCycle(1, Cycle.BEFORE_RULE, Cycle.BEFORE_CLASS, Cycle.BEFORE, Cycle.TEST, Cycle.AFTER, Cycle.AFTER_CLASS,
      Cycle.AFTER_RULE);
    assertCycle(0, Cycle.BEFORE_CLASS_RULE, Cycle.AFTER_CLASS_RULE);
  }
}
org.junit.runnerResultgetIgnoreCount

Popular methods of Result

  • getFailures
  • getFailureCount
  • wasSuccessful
  • getRunCount
  • getRunTime
  • <init>
  • createListener
    Internal use only.

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now