Examples of PhantomTestRunner


Examples of com.philmander.jstest.PhantomTestRunner

  @Test
  public void test() {

    File phantom = new File(getPhantom());

    PhantomTestRunner testRunner;
    try {
      testRunner = new PhantomTestRunner(phantom.getAbsolutePath());

      File testFile1 = new File("src/test/resources/tests/one-test.html");
      File testFile2 = new File("src/test/resources/tests/two-test.html");
      File testFile3 = new File("src/test/resources/tests/more/three-test.html");
      File testFileError = new File("src/test/resources/tests/more/error-test.html");

      String[] testFiles = { testFile1.getAbsolutePath(), testFile2.getAbsolutePath(),
          testFile3.getAbsolutePath(), testFileError.getAbsolutePath() };

      JsTestResults results = testRunner.runTests(testFiles);

      int failCount = 0;
      int passCount = 0;
      int errorCount = 0;
      for (JsTestResult result : results.getTestResults()) {
View Full Code Here

Examples of com.philmander.jstest.PhantomTestRunner

      absoluteFiles[i] = dir.getAbsolutePath() + "/" + includedFiles[i];
    }
   
    //summarize results
    try {     
      PhantomTestRunner testRunner = new PhantomTestRunner(getPhantom());
      testRunner.setLogger(this);
     
      log("Running JS Tests...");
      log("-------------------------------------------------------------------------------");

      JsTestResults results = testRunner.runTests(absoluteFiles);
     
      log("-------------------------------------------------------------------------------");
      log("Running JS Tests Completed");
     
      int passCount = results.getPassCount();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.