freemarker - 范围报告第二次失败。无法在小项目中重现
问题描述
当范围报告因以下错误而失败时,有人可以告诉我在执行的第二次迭代中必须发生什么吗?对于第一次迭代,报表创建得非常好。当我在同一个 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]
----
在第一次执行期间没有观察到错误。我尝试了以下方法:
- 删除了所有 ExtentTest.log() 方法,以便没有通过/失败的步骤
- 将 FreeMarker jar 更新到版本 2.3.30
- 检查范围版本 4.1.5
解决方案
推荐阅读
- javascript - 如何在客户端正确下载 xlsx 文件?
- java - 如何使用响应式驱动程序连接到 Neo4J 嵌入式实例?
- html - 从右到左打开导航栏
- php - 使用 PDO 时不向客户端显示警告
- python - 找不到 >python scraper.py - 无法打开文件 'scraper.py':[Errno 2] 没有这样的文件或目录
- firefox-addon-webextensions - 使用 web-ext 进行不同的开发和构建配置
- java - Simplify unique String check in a Set
- python - Django 存根中断 Pycharm 自动完成
- mongodb - 如何在 GKE 服务的 MongoDB 中启用身份验证
- python - Count number of purchases a user has done on a pandas dataframe