【问题标题】:Exception while running testNG reports运行 testNG 报告时出现异常
【发布时间】:2015-02-26 12:28:37
【问题描述】:

我在运行我的 testNG 测试用例时遇到以下异常。

[TestNG] Reporter org.uncommons.reportng.HTMLReporter@527740a2 failed
org.uncommons.reportng.ReportNGException: Failed generating HTML report.
    at org.uncommons.reportng.HTMLReporter.generateReport(HTMLReporter.java:122)
    at org.testng.TestNG.generateReports(TestNG.java:1115)
    at org.testng.TestNG.run(TestNG.java:1074)
    at com.flipkart.cid.cs.Trigger.run(Trigger.java:98)
    at com.flipkart.cid.cs.Trigger.main(Trigger.java:135)
Caused by: java.lang.NullPointerException
    at org.uncommons.reportng.TestResultComparator.compare(TestResultComparator.java:29)
    at org.uncommons.reportng.TestResultComparator.compare(TestResultComparator.java:25)
    at java.util.Collections.indexedBinarySearch(Collections.java:332)
    at java.util.Collections.binarySearch(Collections.java:320)
    at org.uncommons.reportng.HTMLReporter.sortByTestClass(HTMLReporter.java:243)
    at org.uncommons.reportng.HTMLReporter.createResults(HTMLReporter.java:193)
    at org.uncommons.reportng.HTMLReporter.generateReport(HTMLReporter.java:114)
    ... 4 more

【问题讨论】:

    标签: testing testng reportng


    【解决方案1】:

    您使用的是什么版本的 JDK 和 reportNG?

    尝试使用 reportNG 版本 1.1.4 和 JDK 7。也照原样关注这篇文章,它应该可以解决您的问题: https://solidsoft.wordpress.com/2011/01/23/better-looking-html-test-reports-for-testng-with-reportng-maven-guide/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-09-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多