【问题标题】:TestNg emailable-report is not updating?TestNg emailable-report 没有更新?
【发布时间】:2017-10-25 20:47:46
【问题描述】:

当我通过右键单击运行tesng.xml 文件时,emailable-report.html 文件显示为根据最新的测试结果,但是当通过“mvn test”从终端运行它时,测试结果是符合预期,但emailable-report.html 文件根据当前结果更新。

【问题讨论】:

  • 我认为您的问题和描述引起了冲突。你要什么不清楚
  • @Sidhartha test results are coming as per expected 那么问题出在哪里?谢谢
  • @Dev 使用“mvn test”运行时,emailable-report 没有更新当前的测试结果。
  • @Sidhartha 你能考虑向我们展示你的作品吗?谢谢

标签: selenium testng


【解决方案1】:

这是因为当您使用 maven 运行它时,您的报告可能会在目标文件夹中生成,而当您直接通过 testng.xml 运行它时,它可能会在测试输出中生成。因此,您可能希望它位于不同的位置并且您打开了错误的报告,而您的最新报告位于目标文件夹中。

【讨论】:

  • 在surefire-reports的目标文件夹中?
  • 是的,它应该在那里
  • 谢谢。我知道位置“target/surefire-reports/testng-native-results/emailable-report.html”
【解决方案2】:

我有同样的问题,但文件夹没问题。问题是 emailable-report.html 生成发生在所有执行之后,包括注释 @After.... 我所做的是使用 Reporter.getCurrentTestResult();在@AfterTest 中执行电子邮件发送操作以在正确的时间更新文件。

【讨论】:

    猜你喜欢
    • 2020-04-15
    • 1970-01-01
    • 2015-03-14
    • 2014-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多