首页 > 解决方案 > 范围报告第二次失败。无法在小项目中重现

问题描述

当范围报告因以下错误而失败时,有人可以告诉我在执行的第二次迭代中必须发生什么吗?对于第一次迭代,报表创建得非常好。当我在同一个 JVM 实例上创建另一个报告(在相同或另一个路径)时,会观察到这个问题:

SEVERE: An exception occurred
FreeMarker template error:
No compatible overloaded variation was found; declared parameter types and argument value types mismatch.
The FTL type of the argument values were: extended_hash+string (com.aventstack.extentreports.Status wrapped into f.e.b.StringModel).
The Java type of the argument values were: com.aventstack.extentreports.Status.
The matching overload was searched among these members:
    com.aventstack.extentreports.reporter.BasicFileReporter.containsStatus(String),
    com.aventstack.extentreports.reporter.BasicFileReporter.containsStatus(com.aventstack.extentreports.Status)

----
FTL stack trace ("~" means nesting-related):
    - Failed at: #if report.containsStatus(Status.PASS)  [in template "spark/partials/test.ftl" at line 17, column 49]
    - Reached through: #include "partials/test.ftl"  [in template "spark/spark.spa.ftl" at line 27, column 21]
----

在第一次执行期间没有观察到错误。我尝试了以下方法:

  1. 删除了所有 ExtentTest.log() 方法,以便没有通过/失败的步骤
  2. 将 FreeMarker jar 更新到版本 2.3.30
  3. 检查范围版本 4.1.5

标签: freemarkerextentreportsselenium-extent-reportextent

解决方案


推荐阅读