Package fitnesse.testsystems

Examples of fitnesse.testsystems.TestSummary


    assertEquals(3, pageHistory.size());
    assertEquals(dateFormat.parse("20090417000000"), pageHistory.getMinDate());
    assertEquals(dateFormat.parse("20090419000000"), pageHistory.getMaxDate());
    assertEquals(1, pageHistory.getPasses());
    assertEquals(2, pageHistory.getFailures());
    assertEquals(new TestSummary(1, 0, 0, 0), pageHistory.get(dateFormat.parse("20090418000000")));
    assertEquals(new TestSummary(1, 1, 0, 0), pageHistory.get(dateFormat.parse("20090419000000")));
    assertEquals(new TestSummary(1, 0, 0, 1), pageHistory.get(dateFormat.parse("20090417000000")));
  }
View Full Code Here


  }

  private void addDummySuiteResult(File resultFile) throws Exception {
    SuiteExecutionReport report = new SuiteExecutionReport(fitNesseVersion, "SuitePage");
    report.date = DateTimeUtil.getDateFromString("12/5/1980 01:19:00");
    report.getFinalCounts().add(new TestSummary(4,5,6,7));
    TimeMeasurement timeMeasurement = mock(TimeMeasurement.class);
    when (timeMeasurement.elapsed()).thenReturn(12321L);
    report.setTotalRunTimeInMillis(timeMeasurement);
    long time = DateTimeUtil.getTimeFromString("12/5/1980 01:20:00");
    SuiteExecutionReport.PageHistoryReference r1 = new SuiteExecutionReport.PageHistoryReference("SuitePage.TestPageOne", time, 9);
View Full Code Here

    fileWriter.close();
  }

  private TestExecutionReport makeDummyTestResponse() {
    TestExecutionReport testResponse = new TestExecutionReport(fitNesseVersion, "rootPath");
    testResponse.getFinalCounts().add(new TestSummary(1, 2, 3, 4));
    TestExecutionReport.TestResult result = new TestExecutionReport.TestResult();
    testResponse.addResult(result);
    result.right = "11";
    result.wrong = "22";
    result.ignores = "33";
View Full Code Here

  }


  private TestExecutionReport makeBadDummyTestResponse() {
    TestExecutionReport testResponse = new TestExecutionReport(fitNesseVersion, "rootPath");
    testResponse.getFinalCounts().add(new TestSummary(1, 2, 3, 4));
    TestExecutionReport.TestResult result = new TestExecutionReport.TestResult();
    testResponse.addResult(result);
    result.right = "xx";
    result.wrong = "22";
    result.ignores = "33";
View Full Code Here

  @SuppressWarnings("unchecked")
  private TestSummary resizeTableAndEvaluateRows(Object returnValue) {
    List<List<Object>> tableResults = (List<List<Object>>) returnValue;
    extendTable(table, tableResults);
    TestSummary testSummary = new TestSummary();
    for (int row = 0; row < tableResults.size(); row++)
      evaluateRow(tableResults, row, testSummary);
    return testSummary;
  }
View Full Code Here

        table.updateContent(table.getColumnCountInRow(0) - 1, 0, testResult);
      } else if (tableReturn instanceof String) {
        testResult = SlimTestResult.error((String) tableReturn);
        table.updateContent(0, 0, testResult);
      } else {
        TestSummary testSummary = resizeTableAndEvaluateRows(tableReturn);
        getTestContext().increment(testSummary);
        testResult = new SlimTestResult(ExecutionResult.getExecutionResult(testSummary));
        testResult.setVariables(getSymbolsToStore());
      }
      getTestContext().increment(testResult.getExecutionResult());
View Full Code Here

    xmlChecker.assertFitPassFixtureXmlReportIsCorrect();
  }

  @Test
  public void noHistory_skipsHistoryFormatter() throws Exception{
    ensureXmlResultFileDoesNotExist(new TestSummary(2, 0, 0, 0));
    request.addInput("nohistory", "true");
    doSimpleRun(simpleSlimDecisionTable());
    assertFalse(xmlResultsFile.exists());
  }
View Full Code Here

  @Test
  public void slimXmlFormat() throws Exception {
    responder.turnOffChunking();
    request.addInput("format", "xml");
    ensureXmlResultFileDoesNotExist(new TestSummary(0, 1, 0, 0));
    doSimpleRunWithTags(slimDecisionTable(), "zoo");
    Document xmlFromFile = getXmlFromFileAndDeleteFile();
    xmlChecker.assertXmlReportOfSlimDecisionTableWithZooTagIsCorrect();
    xmlChecker.assertXmlHeaderIsCorrect(xmlFromFile);
    xmlChecker.assertXmlReportOfSlimDecisionTableWithZooTagIsCorrect();
View Full Code Here

  }

  @Test
  public void slimXmlFormatGivesErrorCountAsExitCode() throws Exception {
    request.addInput("format", "xml");
    ensureXmlResultFileDoesNotExist(new TestSummary(0, 1, 0, 0));
    doSimpleRunWithTags(slimDecisionTable(), "zoo");
    getXmlFromFileAndDeleteFile();
    assertSubString("Exit-Code: 1", results);
  }
View Full Code Here

      "|wow|wow|\n";
  }

  @Test
  public void checkHistoryForSimpleSlimTable() throws Exception {
    ensureXmlResultFileDoesNotExist(new TestSummary(1, 0, 0, 0));
    doSimpleRun(simpleSlimDecisionTable());
    Document xmlFromFile = getXmlFromFileAndDeleteFile();
    xmlChecker.assertXmlHeaderIsCorrect(xmlFromFile);
    assertHasRegexp("<td><span class=\"pass\">wow</span></td>", HtmlUtil.unescapeHTML(results));
  }
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.