Package org.junit.experimental.max

Examples of org.junit.experimental.max.MaxCore


    @Test
    public void rememberOldRuns() {
        fMax.run(TwoUnEqualTests.class);

        MaxCore reincarnation = MaxCore.storedLocally(fMaxFile);
        List<Failure> failures = reincarnation.run(TwoUnEqualTests.class)
                .getFailures();
        assertEquals("fast", failures.get(0).getDescription().getMethodName());
        assertEquals("slow", failures.get(1).getDescription().getMethodName());
    }
View Full Code Here


  @Test
  public void showMaxCore() throws Exception {
    // Define a file to store tests run history
    File maxCoreFile = new File("junit-maxcore-history.max");
    // Load previous test runs informations
    MaxCore maxCoreTestPrevisousRun = MaxCore.storedLocally(maxCoreFile);
    // Display previous tests run informations
    System.out.println("**** PREVIOUS RUN INFOS ****");
    for (Map.Entry<String, Long> testData : maxCoreTestPrevisousRun.fHistory.fDurations.entrySet()) {
      System.out.printf("=> Test '%s' - Duration '%s' ms\n", testData.getKey(), testData.getValue());
    }
    // Run tests using the MaxCore in order to obtains tests run history
    // informations saved to the file
    System.out.println("**** NEW RUN ****");
    Result result = maxCoreTestPrevisousRun.run(TestProcessingBean.class);
    System.out.println("**** NEW RUN INFOS ****");
    System.out.printf("%s Test executed in %s ms\n", result.getRunCount(), result.getRunTime());
    System.out.printf("%s Test ignored\n", result.getIgnoreCount());
    System.out.printf("%s Test failed\n", result.getFailureCount());
    maxCoreTestPrevisousRun.fHistory.save();
View Full Code Here

  @Test
  public void rememberOldRuns() {
    fMax.run(TwoUnEqualTests.class);

    MaxCore reincarnation= MaxCore.storedLocally(fMaxFile);
    List<Failure> failures= reincarnation.run(TwoUnEqualTests.class)
        .getFailures();
    assertEquals("fast", failures.get(0).getDescription().getMethodName());
    assertEquals("slow", failures.get(1).getDescription().getMethodName());
  }
View Full Code Here

TOP

Related Classes of org.junit.experimental.max.MaxCore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.