我正在考虑扩展我现有的 CI,它使用 testng 作为测试框架。我有一套测试,其性能(每次测试花费的时间)我想跟踪每个测试的性能以及每个测试随时间的变化。例如,在该套件运行 5 次后,我可以看到我的测试表现得更好或更差。
我知道 testng 默认输出包含时间属性的 xml 报告。目前,我在 testng 的文档中没有看到任何专门解决此问题的内容。
目前,我认为唯一的方法是提取相关信息(方法/类名和时间)并将其编译成单独的文件,以便稍后报告。您知道任何更好的内置解决方案吗?
<testsuite name="PerformanceTests" tests="1" failures="0" timestamp="26 Apr 2018 17:05:51 GMT" **time="356.232"** errors="0">
<testcase name="testModifyFail" time="2.127" classname="PerformanceTests"/>
<testsuite/>