org.testng.internal.Utils.calculateInvokedMethodCount()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.testng.internal.Utils.calculateInvokedMethodCount()方法的一些代码示例,展示了Utils.calculateInvokedMethodCount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.calculateInvokedMethodCount()方法的具体详情如下:
包路径:org.testng.internal.Utils
类名称:Utils
方法名:calculateInvokedMethodCount

Utils.calculateInvokedMethodCount介绍

暂无

代码示例

代码示例来源:origin: org.testng/testng

/**
 * Print out test summary
 */
private void logResults() {
  //
  // Log test summary
  //
  ITestNGMethod[] ft = resultsToMethods(getFailedTests());
  StringBuilder sb = new StringBuilder("\n===============================================\n");
  sb.append("    ").append(suiteName).append("\n");
  sb.append("    Tests run: ").append(Utils.calculateInvokedMethodCount(getAllTestMethods()));
  sb.append(", Failures: ").append(Utils.calculateInvokedMethodCount(ft));
  sb.append(", Skips: ").append(Utils.calculateInvokedMethodCount(resultsToMethods(getSkippedTests())));
  int confFailures = getConfigurationFailures().size();
  int confSkips = getConfigurationSkips().size();
  if (confFailures > 0 || confSkips > 0) {
    sb.append("\n").append("    Configuration Failures: ").append(confFailures);
    sb.append(", Skips: ").append(confSkips);
  }
  sb.append("\n===============================================");
  log(sb.toString());
}

代码示例来源:origin: cbeust/testng

/** Print out test summary */
private void logResults() {
 //
 // Log test summary
 //
 ITestNGMethod[] ft = resultsToMethods(getFailedTests());
 StringBuilder sb = new StringBuilder("\n===============================================\n");
 sb.append("    ").append(suiteName).append("\n");
 sb.append("    Tests run: ").append(Utils.calculateInvokedMethodCount(getAllTestMethods()));
 sb.append(", Failures: ").append(Utils.calculateInvokedMethodCount(ft));
 sb.append(", Skips: ")
   .append(Utils.calculateInvokedMethodCount(resultsToMethods(getSkippedTests())));
 int confFailures = getConfigurationFailures().size();
 int confSkips = getConfigurationSkips().size();
 if (confFailures > 0 || confSkips > 0) {
  sb.append("\n").append("    Configuration Failures: ").append(confFailures);
  sb.append(", Skips: ").append(confSkips);
 }
 sb.append("\n===============================================");
 log(sb.toString());
}

代码示例来源:origin: org.testng/testng

for (ISuiteResult sr : suiteResults.values()) {
 ITestNGMethod[] methods = sr.getTestContext().getAllTestMethods();
 methodCount += Utils.calculateInvokedMethodCount(methods);

代码示例来源:origin: cbeust/testng

for (ISuiteResult sr : suiteResults.values()) {
 ITestNGMethod[] methods = sr.getTestContext().getAllTestMethods();
 methodCount += Utils.calculateInvokedMethodCount(methods);

代码示例来源:origin: org.testng/testng

StringBuilder logBuf = new StringBuilder("\n===============================================\n");
logBuf.append("    ").append(m_testName).append("\n");
logBuf.append("    Tests run: ").append(Utils.calculateInvokedMethodCount(getAllTestMethods()))
  .append(", Failures: ").append(Utils.calculateInvokedMethodCount(ft))
  .append(", Skips: ").append(Utils.calculateInvokedMethodCount(resultsToMethods(getSkippedTests())));
int confFailures = getConfigurationFailures().size();
int confSkips = getConfigurationSkips().size();

代码示例来源:origin: cbeust/testng

logBuf
  .append("    Tests run: ")
  .append(Utils.calculateInvokedMethodCount(getAllTestMethods()))
  .append(", Failures: ")
  .append(Utils.calculateInvokedMethodCount(ft))
  .append(", Skips: ")
  .append(Utils.calculateInvokedMethodCount(resultsToMethods(skippedTests)));
if (!retriedTests.isEmpty()) {
 logBuf
   .append(", Retries: ")
   .append(Utils.calculateInvokedMethodCount(resultsToMethods(retriedTests)));

代码示例来源:origin: org.apache.brooklyn/brooklyn-utils-test-support

/**
 * Print out test summary
 */
private void logResults() {
  //
  // Log test summary
  //
  ITestNGMethod[] ft = resultsToMethods(getFailedTests());
  StringBuilder sb = new StringBuilder("\n===============================================\n");
  sb.append("    ").append(suiteName).append("\n");
  sb.append("    Tests run: ").append(Utils.calculateInvokedMethodCount(getAllTestMethods()));
  sb.append(", Failures: ").append(Utils.calculateInvokedMethodCount(ft));
  sb.append(", Skips: ").append(Utils.calculateInvokedMethodCount(resultsToMethods(getSkippedTests())));
  int confFailures = getConfigurationFailures().size();
  int confSkips = getConfigurationSkips().size();
  if (confFailures > 0 || confSkips > 0) {
    sb.append("\n").append("    Configuration Failures: ").append(confFailures);
    sb.append(", Skips: ").append(confSkips);
  }
  sb.append("\n===============================================");
  log(sb.toString());
}

代码示例来源:origin: io.brooklyn/brooklyn-utils-test-support

/**
 * Print out test summary
 */
private void logResults() {
  //
  // Log test summary
  //
  ITestNGMethod[] ft = resultsToMethods(getFailedTests());
  StringBuilder sb = new StringBuilder("\n===============================================\n");
  sb.append("    ").append(suiteName).append("\n");
  sb.append("    Tests run: ").append(Utils.calculateInvokedMethodCount(getAllTestMethods()));
  sb.append(", Failures: ").append(Utils.calculateInvokedMethodCount(ft));
  sb.append(", Skips: ").append(Utils.calculateInvokedMethodCount(resultsToMethods(getSkippedTests())));
  int confFailures = getConfigurationFailures().size();
  int confSkips = getConfigurationSkips().size();
  if (confFailures > 0 || confSkips > 0) {
    sb.append("\n").append("    Configuration Failures: ").append(confFailures);
    sb.append(", Skips: ").append(confSkips);
  }
  sb.append("\n===============================================");
  log(sb.toString());
}

相关文章