Package com.google.jstestdriver.idea.execution.tc

Examples of com.google.jstestdriver.idea.execution.tc.TCMessage.addAttribute()


  public TCMessage createStartedMessage() {
    TCMessage message = TC.newBrowserErrorStartedMessage(this);
    ConfigNode configNode = getParent().getParent();
    String basePath = configNode.getAbsoluteBasePath();
    if (basePath != null) {
      message.addAttribute(TCAttribute.NODE_TYPE, "browserError");
      message.addAttribute(TCAttribute.NODE_ARGS, basePath);
    }
    return message;
  }
View Full Code Here


    TCMessage message = TC.newBrowserErrorStartedMessage(this);
    ConfigNode configNode = getParent().getParent();
    String basePath = configNode.getAbsoluteBasePath();
    if (basePath != null) {
      message.addAttribute(TCAttribute.NODE_TYPE, "browserError");
      message.addAttribute(TCAttribute.NODE_ARGS, basePath);
    }
    return message;
  }

  @NotNull
View Full Code Here

  @Override
  public TCMessage createStartedMessage() {
    TCMessage message = super.createStartedMessage();
    String basePath = getParent().getAbsoluteBasePath();
    if (basePath != null) {
      message.addAttribute(TCAttribute.NODE_TYPE, "browser");
      message.addAttribute(TCAttribute.NODE_ARGS, basePath);
    }
    return message;
  }
}
View Full Code Here

  public TCMessage createStartedMessage() {
    TCMessage message = super.createStartedMessage();
    String basePath = getParent().getAbsoluteBasePath();
    if (basePath != null) {
      message.addAttribute(TCAttribute.NODE_TYPE, "browser");
      message.addAttribute(TCAttribute.NODE_ARGS, basePath);
    }
    return message;
  }
}
View Full Code Here

    TestNode testNode = getOrCreateTestNode(testPath);
    testNode.detachFromParent();
    String log = testResult.getLog();
    if (log != null && !log.isEmpty()) {
      TCMessage stdOutMessage = TC.newTestStdOutMessage(testNode);
      stdOutMessage.addAttribute(TCAttribute.STDOUT, log + "\n");
      printTCMessage(stdOutMessage);
    }

    int durationMillis = (int) testResult.getTime();
    TestResult.Result status = testResult.getResult();
View Full Code Here

        stackStr = s.replaceFirst("^[\n\r]*", "");
      } else {
        stackStr = originalStack;
      }
      TCMessage testFailedMessage = TC.newTestFailedMessage(testNode);
      testFailedMessage.addAttribute(TCAttribute.EXCEPTION_MESSAGE, parsedMessage);
      testFailedMessage.addAttribute(TCAttribute.EXCEPTION_STACKTRACE, stackStr);
      if (status == TestResult.Result.error) {
        testFailedMessage.addAttribute(TCAttribute.IS_TEST_ERROR, "yes");
      }
      testFailedMessage.addIntAttribute(TCAttribute.TEST_DURATION, durationMillis);
View Full Code Here

      } else {
        stackStr = originalStack;
      }
      TCMessage testFailedMessage = TC.newTestFailedMessage(testNode);
      testFailedMessage.addAttribute(TCAttribute.EXCEPTION_MESSAGE, parsedMessage);
      testFailedMessage.addAttribute(TCAttribute.EXCEPTION_STACKTRACE, stackStr);
      if (status == TestResult.Result.error) {
        testFailedMessage.addAttribute(TCAttribute.IS_TEST_ERROR, "yes");
      }
      testFailedMessage.addIntAttribute(TCAttribute.TEST_DURATION, durationMillis);
      printTCMessage(testFailedMessage);
View Full Code Here

      }
      TCMessage testFailedMessage = TC.newTestFailedMessage(testNode);
      testFailedMessage.addAttribute(TCAttribute.EXCEPTION_MESSAGE, parsedMessage);
      testFailedMessage.addAttribute(TCAttribute.EXCEPTION_STACKTRACE, stackStr);
      if (status == TestResult.Result.error) {
        testFailedMessage.addAttribute(TCAttribute.IS_TEST_ERROR, "yes");
      }
      testFailedMessage.addIntAttribute(TCAttribute.TEST_DURATION, durationMillis);
      printTCMessage(testFailedMessage);
    }
  }
View Full Code Here

          testCount += testCaseNode.getChildren().size();
        }
      }
      if (testCount > 0) {
        TCMessage tcMessage = new TCMessage(TCCommand.TEST_COUNT);
        tcMessage.addAttribute(TCAttribute.TEST_COUNT, String.valueOf(testCount));
        printTCMessage(tcMessage);
      }
    }
  }
View Full Code Here

    for (BrowserNode browserNode : configNode.getChildren()) {
      for (TestCaseNode testCaseNode : browserNode.getChildren()) {
        for (TestNode testNode : testCaseNode.getChildren()) {
          TCMessage testFailedMessage = TC.newTestFailedMessage(testNode);
          String reason = errorMessage != null ? "JsTestDriver crash" : "unknown reason";
          testFailedMessage.addAttribute(TCAttribute.EXCEPTION_MESSAGE, "Can't execute test due to " + reason + ".");
          testFailedMessage.addAttribute(TCAttribute.IS_TEST_ERROR, "yes");
          printTCMessage(testFailedMessage);
        }
        TCMessage testCaseFinishedMessage = TC.newTestSuiteFinishedMessage(testCaseNode);
        printTCMessage(testCaseFinishedMessage);
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.