【问题标题】:How to generate test report into file如何将测试报告生成到文件中
【发布时间】:2022-05-10 13:56:35
【问题描述】:

我目前正在运行几个 terratests。在控制台上,我可以在添加 -v 选项时看到日志,但是如何生成通过/失败测试的测试报告?可能是 html 或 pdf 格式

【问题讨论】:

  • 您是否尝试采用相同的方法来测试 GO 应用程序?

标签: terratest


【解决方案1】:

去测试-timeout 30m | tee test_output.log terratest_log_parser -testlog test_output.log -outputdir test_output

这将:

  • 为它从包含与该测试对应的日志的测试输出中找到的每个测试创建一个文件 TEST_NAME.log。

  • 创建包含每个测试的测试结果行的 avsummary.log 文件。

  • 创建一个包含测试的Junit XML 文件的report.xml 文件 摘要(因此可以集成到您的 CI 中)。

【讨论】:

    猜你喜欢
    • 2021-09-27
    • 2021-11-08
    • 2014-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多