Package com.google.jstestdriver

Examples of com.google.jstestdriver.TestRunResult


    // right now it can be called multiple times. :P
    if (!finished.getAndSet(true)) {
      printSummary(out);
      boolean noTestsFound = false;
      for (Map.Entry<String, TestRunResult> entry : browsersRunData.entrySet()) {
        TestRunResult data = entry.getValue();
       
 
        printBrowserSummary(out, entry.getKey(), data);
 
        for (Problem problem : data.getProblems()) {
          problem.print(out, verbose);
        }
      }
     
    }
View Full Code Here


    return max;
  }

  public void onTestComplete(TestResult testResult) {
    String browser = testResult.getBrowserInfo().toString();
    TestRunResult runData = currentRunData(browser);
    TestResult.Result result = testResult.getResult();
    String log = testResult.getLog();

    runData.addTime(testResult.getTime());
    if (result == TestResult.Result.passed) {
      if (!verbose) {
        out.print('.');
        if (log.length() > 0) {
          runData.addProblem(new TestResultProblem(testResult));
        }
      } else {
        printInProgress(browser, "[PASSED] ", testResult, log);
      }
      runData.addPass();
      totalPasses.incrementAndGet();
    } else if (result == TestResult.Result.failed) {
      if (!verbose) {
        out.print('F');
      } else {
        printInProgress(browser, "[FAILED] ", testResult, log);
      }
      runData.addFail();
      runData.addProblem(new TestResultProblem(testResult));
      totalFails.incrementAndGet();
    } else if (result == TestResult.Result.error) {
      if (!verbose) {
        out.print('E');
      } else {
        printInProgress(browser, "[ERROR] ", testResult, log);
      }
      runData.addError();
      runData.addProblem(new TestResultProblem(testResult));
      totalErrors.incrementAndGet();
    } else {
      out.print("<" + result + ">");
      if (verbose) {
        out.println(" " + testResult.getTestCaseName() + "." + testResult.getTestName());
        if (log.length() > 0) {
          String[] logLines = log.split("\n");

          for (String line : logLines) {
            out.println("  " + line);
          }
        }
      }
      runData.addProblem(new TestResultProblem(testResult));
    }
    if (lineColumn.incrementAndGet() == lineLength) {
      out.println();
      lineColumn.set(0);
    }
View Full Code Here

      }
    }
  }

  private synchronized TestRunResult currentRunData(String browser) {
    TestRunResult runData = browsersRunData.get(browser);

    if (runData == null) {
      runData = new TestRunResult();
      browsersRunData.put(browser, runData);
    }
    return runData;
  }
View Full Code Here

      if (verbose) {
        out.println(browser + " loaded " + fileResult.getFileSource().getFileSrc());
      }
      return;
    }
    TestRunResult runData = currentRunData(browser.toString());
    runData.addError();
    runData.addProblem(new FileLoadProblem(fileResult));
    if (verbose) {
      out.println("[ERROR] " + fileResult.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of com.google.jstestdriver.TestRunResult

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.