我有一个很有吸引力的xml,如下所示
<test-case start="1456329345978" stop="1456329352078" status="failed">
<name>SYSTEM_ASSERT_ERRORS</name>
<title>Assert that there are no critical errors</title>
<description type="text">Assert that there are no critical errors </description>
<failure>
<message>AssertionError: FAIL: 3 out of 4 test steps failed</message>
<stack-trace>java.lang.AssertionError: FAIL: 3 out of 4 test steps failed: Not true that <3> is equal to <0>
</stack-trace>
</failure>
<steps>
<step start="1456329346636" stop="1456329351963" status="passed">
<name>verifyLogs[JSchException]</name>
<title>verifyLogs: [JSchException]</title>
</step>
<step start="1456329346636" stop="1456329351965" status="failed">
<name>verifyLogs["Error code"]</name>
<title>verifyLogs: ["Error code"]</title>
</step>
</steps>
<attachments>
<attachment title="log.txt" source="1be56864-2031-4e82-bfdd-ce5152a5bbc2-attachment.txt" type="text/plain"/>
</attachments>
在将其转换为html时,失败显示在测试用例窗格的顶部,也显示在第一个失败步骤的下方?
我看不出有什么理由要在里面再展示一次?有什么原因吗?
发布于 2016-02-25 19:26:15
原因可能是使失败的测试步骤可见。此外,如果您有许多测试步骤,您可以检查失败步骤的堆栈跟踪,而无需在最顶部滚动。
如果你在你的测试中捕捉到异常或者映射它们,那么测试步骤抛出的真正异常可能不同于Allure报告的异常。这被认为是糟糕的实践(以及在测试中管理线程),并且不受Allure、AFAIK的支持。
所以,我现在看不出这里有什么问题。
https://stackoverflow.com/questions/35608537
复制相似问题