Package net.sf.sahi.test

Examples of net.sf.sahi.test.TestRunner


    }

    private void startServer() {
        String status = "FAILURE";
        try {
          TestRunner testRunner;
          if (this.browserType != null) {
            testRunner = new TestRunner(suite, browserType, baseURL, sahiHost, sahiPort, threads, listReport, createIssue);
          } else {
              testRunner = new TestRunner(suite, browser, baseURL,
                      sahiHost, sahiPort, threads, browserOption, browserProcessName, listReport, createIssue);
          }
          testRunner.setIsSingleSession("true".equals(singleSession));
            status = testRunner.execute();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("STATUS:" + status);
        if (!"SUCCESS".equals(status)) {
View Full Code Here


        return value;
    }

    public Scheduler(Properties properties) {
        this.properties = properties;
        this.runner = new TestRunner(g("suite_path"), g("browser_exe"), g("base_url"), g("sahi_host"), g("sahi_port"), g("threads"), g("browser_option"), g("browser_process_name"));
        this.repeatCount = i("retry_count_on_failure");
        this.successiveFailureCount = i("successive_failures");
        this.repeatInterval = i("repeat_interval_in_minutes") * 60000;
        this.failureRepeatInterval = i("repeat_interval_on_failure_in_seconds") * 1000;
    }
View Full Code Here

    String initJS = "$user='test';$pwd='secret';";
    String logDir = "D:/Dev/sahi/sahi_993/userdata/logs/junit/";
   
   
    TestRunner testRunner =
      new TestRunner(suiteName, browserType, base, threads);
   
    testRunner.addReport(new Report("junit", logDir));
    testRunner.setInitJS(initJS);
    String status = testRunner.execute();
    System.out.println(status);
    assertEquals("SUCCESS", status);
  }
View Full Code Here

    String threads = "1";
    String browserOption = "-profile D:/sahi/sf/sahi_993/userdata/browser/ff/profiles/sahi$threadNo -no-remote";
    String browserProcessName = "firefox.exe";
    String logDir = "D:/temp/logs/"; // relative paths will be resolved relative to userdata dir.
   
    TestRunner testRunner = new TestRunner(suiteName, browser, base, sahiHost,
          port, threads, browserOption, browserProcessName);
    testRunner.addReport(new Report("html", logDir));
        String status = testRunner.execute();
        System.out.println(status);
        assertEquals("SUCCESS", status);
  }
View Full Code Here

    String port = "9999";
    String threads = "1";
    String logDir = "D:/temp/logs/"; // relative paths will be resolved relative to userdata dir.
    String suiteName = "scripts/demo/integration.sah";

    TestRunner testRunner = new TestRunner(suiteName, browserType, base, sahiHost, port, threads);
    HashMap<String, Object> variableHashMap = new HashMap<String, Object>();
    variableHashMap.put("$user", "test");
    variableHashMap.put("$pwd", "secret");
    testRunner.setInitJS(variableHashMap);
    testRunner.addReport(new Report("tm6", logDir));
        String status = testRunner.execute();
        System.out.println(status);
        assertEquals("SUCCESS", status);
       
       
        System.out.println(Utils.readFileAsString("D:/temp/logs/integration.xml"));
View Full Code Here

TOP

Related Classes of net.sf.sahi.test.TestRunner

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.