Examples of JasmineResult


Examples of com.github.searls.jasmine.model.JasmineResult

  @Test
  public void shouldFindSpecsInResults() throws Exception {
    doNothing().when(FileUtils.class);
    FileUtils.writeStringToFile(this.file, "<xml/>", "UTF-8");

    JasmineResult result = this.subject.execute(this.resource, this.file, driver, 300, false, this.log, null);

    assertThat(result,is(not(nullValue())));
    assertThat(result.getDescription(),containsString("kaka"));
    assertThat(result.getDetails(),containsString("pants"));
    assertThat(result.didPass(),is(false));

    verifyStatic();
    FileUtils.writeStringToFile(this.file, "<xml/>", "UTF-8");
  }
View Full Code Here

Examples of com.github.searls.jasmine.model.JasmineResult

    ServerManager serverManager = this.getServerManager();
    try {
      int port = serverManager.start();
      setPortProperty(port);
      this.getLog().info("Executing Jasmine Specs");
      JasmineResult result = this.executeSpecs(new URL(this.uriScheme+"://" + this.serverHostname + ":" + port));
      this.logResults(result);
      this.throwAnySpecFailures(result);
    } finally {
      if (!keepServerAlive) {
        serverManager.stop();
View Full Code Here

Examples of com.github.searls.jasmine.model.JasmineResult

  private void setPortProperty(int port) {
    this.mavenProject.getProperties().setProperty("jasmine.serverPort", String.valueOf(port));
  }
  private JasmineResult executeSpecs(URL runner) throws Exception {
    WebDriver driver = this.createDriver();
    JasmineResult result = new SpecRunnerExecutor().execute(
        runner,
        new File(this.jasmineTargetDir,this.junitXmlReportFileName),
        driver,
        this.timeout, this.debug, this.getLog(), this.format);
    return result;
View Full Code Here

Examples of com.github.searls.jasmine.model.JasmineResult

      driver.get(runnerUrl.toString());
      this.waitForRunnerToFinish(driver, timeout, debug, log);

      this.checkForConsoleErrors(driver, log);

      JasmineResult jasmineResult = new JasmineResult();
      jasmineResult.setDetails(this.buildReport(executor,format));
      FileUtils.writeStringToFile(junitXmlReport, this.buildJunitXmlReport(executor,debug), "UTF-8");
      driver.quit();

      return jasmineResult;
    } catch (Exception e) {
View Full Code Here

Examples of com.github.searls.jasmine.model.JasmineResult

  @Mock private Log log;

  @Test
  public void shouldLogHeader() {
    JasmineResult result = new JasmineResult();

    subject.log(result);

    verify(log).info(JasmineResultLogger.HEADER);
  }
View Full Code Here

Examples of com.github.searls.jasmine.model.JasmineResult

  }

  @Test
  public void shouldLogDetails() {
    String details = "Fake Details";
    JasmineResult result = new JasmineResult();
    result.setDetails(details);

    subject.log(result);

    verify(log).info(details);
  }
View Full Code Here

Examples of com.github.searls.jasmine.model.JasmineResult

  @Test
  public void setterSetsLogger() {
    subject.setLog(log);

    subject.log(new JasmineResult());

    verify(log, atLeastOnce()).info(anyString());
  }
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.