Package fitnesse.testsystems

Examples of fitnesse.testsystems.TestSummary


    }
   
    @Test
    public void testTestComplete() throws Exception {
      TestPage test = new TestPage(new WikiPageDummy());
        TestSummary testSummary = new TestSummary();
        TimeMeasurement timeMeasurement = new TimeMeasurement();
     
      delegatingListener.testComplete(test, testSummary, timeMeasurement);
     
      for(int i = 0 ; i < DELEGATE_COUNT ; i++) {
View Full Code Here


    this.resultListener = resultListener;
  }

  public TestSummary run(final int port, final Launch... launches)
      throws Exception {
    final TestSummary global = new TestSummary();
    for (final Launch launch : launches) {
      global.add(run(launch, port));
    }
    return global;
  }
View Full Code Here

                new PrintTestListener(), new JUnitXMLTestListener( this.resultsDir.getAbsolutePath()));
        final TestHelper helper = new TestHelper(this.workingDir, this.reportsDir.getAbsolutePath(), resultsListener);
    helper.setDebugMode(true);

    try {
      final TestSummary summary = helper.run(this.port, launches);
        getLog().info(summary.toString());
            final RunResult result = new RunResult(summary.right, summary.exceptions, summary.wrong, summary.ignores);
      return result;
    } catch (Exception e) {
      throw new MojoExecutionException("Exception running FitNesse tests", e);
    }
View Full Code Here

  public void shouldRememberTestSummariesInReferences() throws Exception {
    performTest(13);
    List<PageHistoryReference> references = formatter.getPageHistoryReferences();
    assertEquals(1, references.size());
    PageHistoryReference pageHistoryReference = references.get(0);
    assertEquals(new TestSummary(1, 2, 3, 4), pageHistoryReference.getTestSummary());
    assertEquals(13, pageHistoryReference.getRunTimeInMillis());
  }
View Full Code Here

  private void performTest(long elapsedTime) throws Exception {
    formatter.testSystemStarted(null);
    formatter.testStarted(testPage);
    clock.elapse(elapsedTime);
    formatter.testComplete(testPage, new TestSummary(1, 2, 3, 4));
    formatter.close();
  }
View Full Code Here

    Clock.restoreDefaultClock();
  }

  @Test
  public void makeFileName() throws Exception {
    TestSummary summary = new TestSummary(1, 2, 3, 4);
    assertEquals(
      "20090413152143_1_2_3_4.xml",
      SuiteResponder.makeResultFileName(summary, clock.currentClockTimeInMillis()));
  }
View Full Code Here

    formatter.testStarted(page);

    clock.elapse(27);

    TestSummary summary = new TestSummary(9,8,7,6);
    formatter.testComplete(page, summary);
    assertThat(formatter.testResponse.getFinalCounts(), equalTo(new TestSummary(0,1,0,0)));
    assertThat(formatter.testResponse.getResults().size(), is(1));
    assertThat(formatter.testResponse.getResults().get(0), is(testResult));
    assertThat(testResult.startTime, is(startTime));
    assertThat(testResult.content, is("outputChunk"));
    assertThat(testResult.right, is("9"));
View Full Code Here

  @Test
  public void canMakeSuiteExecutionReport() throws Exception {
    SuiteExecutionReport original = new SuiteExecutionReport(new FitNesseVersion("version"), "rootPath");
    original.date = DateTimeUtil.getDateFromString("12/31/1969 18:00:00");
    original.getFinalCounts().add(new TestSummary(1, 2, 3, 4));
    original.setTotalRunTimeInMillis(totalTimeMeasurementWithElapsedMillis(41));
    long time = DateTimeUtil.getTimeFromString("12/31/1969 18:00:00");
    SuiteExecutionReport.PageHistoryReference reference = new SuiteExecutionReport.PageHistoryReference("dah", time, 3L);
    reference.setTestSummary(new TestSummary(0, 99, 0, 0));
    original.addPageHistoryReference(reference);
    StringWriter writer = new StringWriter();
    original.toXml(writer, context.pageFactory.getVelocityEngine());
    ExecutionReport report = ExecutionReport.makeReport(writer.toString());
    assertTrue(report instanceof SuiteExecutionReport);
View Full Code Here

  @Test
  public void shouldBeEqualIfReferencesAreTheSame() throws Exception {
    PageHistoryReference r1 = new PageHistoryReference("TestPage", 1111, 8);
    PageHistoryReference r2 = new PageHistoryReference("TestPage", 1111, 8);
    r1.setTestSummary(new TestSummary(3, 0, 0, 0));
    r2.setTestSummary(new TestSummary(3, 0, 0, 0));
    report1.addPageHistoryReference(r1);
    report2.addPageHistoryReference(r2);
    assertEquals(report1, report2);
  }
View Full Code Here

    Template template = velocityEngine.getTemplate("testResults.vm");
    template.merge(velocityContext, writer);
  }

  public TestSummary getAssertionCounts() {
    TestSummary assertionCounts = new TestSummary();
    for (TestResult result : results) {
      assertionCounts.add(result.getTestSummary());
    }
    return assertionCounts;
  }
View Full Code Here

TOP

Related Classes of fitnesse.testsystems.TestSummary

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.