コード例 #1
0
  public void dumpTestSet(TestSetResult testSetResult) throws FileNotFoundException {
    sb = new StringBuilder();
    elems = new ArrayList<String>();
    indent = 0;
    visitTestSet(testSetResult);

    File outputFile =
        new File(options.getReportDir(), testSetResult.getTestElem().getName() + "-mindtest.txt");
    PrintStream ps = new PrintStream(outputFile);
    ps.print(sb.toString());
    ps.close();
  }
コード例 #2
0
 protected void visitTestSet(TestSetResult testSetResult) {
   sb.append("================================================================================\n");
   sb.append("  Test Set \"").append(testSetResult.getTestElem().getName()).append("\"\n");
   sb.append("  Tests run: ")
       .append(testSetResult.getNbTests())
       .append(", Failures: ")
       .append(testSetResult.getNbFailure())
       .append(", Skipped: ")
       .append(testSetResult.getNbSkipped());
   sb.append("  Time elapsed: ").append(testSetResult.formatExecutionTime());
   sb.append(
       "\n================================================================================\n\n");
   if (testSetResult.getState() == State.FAILURE) {
     for (TestResult testResult : testSetResult.getSubResults()) {
       if (testResult.getState() == State.FAILURE) {
         visitSet(testResult);
       }
     }
   }
 }