简体   繁体   English

如何将测试报告生成文件

[英]How to generate test report into file

I am currently running few terratests.我目前正在运行一些 terratests。 On console I can see the log when add -v option but How do I generate test report of pass/failed tests?在控制台上,我可以在添加 -v 选项时看到日志,但是如何生成通过/失败测试的测试报告? maybe in html or pdf format也许是 html 或 pdf 格式

go test -timeout 30m | go 测试超时 30m | tee test_output.log terratest_log_parser -testlog test_output.log -outputdir test_output tee test_output.log terratest_log_parser -testlog test_output.log -outputdir 测试输出

This will:这将:

  • Create a file TEST_NAME.log for each test it finds from the test output containing the logs corresponding to that test.为它从测试 output 中找到的每个测试创建一个文件 TEST_NAME.log,其中包含与该测试对应的日志。

  • Create avsummary.log file containing the test result lines for each test.创建包含每个测试的测试结果行的 avsummary.log 文件。

  • Create a report.xml file containing a Junit XML file of the test summary (so it can be integrated in your CI).创建一个包含测试摘要的 Junit XML 文件的 report.xml 文件(以便它可以集成到您的 CI 中)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM