0
우리는 출력 .xml 파일을 구문 분석하여 NUnit 테스트에서 자동화 된 테스트 보고서를 생성하려고합니다. 테스트 통과시에도 NUnit에서 예상 결과 및 실제 결과를 얻는 방법은 무엇입니까?
테스트가 실패하면
는, 출력은 인쇄 : 테스트를 통과<test-case id="1013" name="TestThatFails" fullname="TestThatFails" methodname="TestThatFails" classname="TestThatFails" runstate="Runnable" seed="921492075" result="Failed" start-time="2017-10-17 01:34:26Z" end-time="2017-10-17 01:34:33Z" duration="6.367749" asserts="1">
<failure>
<message><![CDATA[ Expected: 136 But was: 135 ]]>/message>
<stack-trace><![CDATA[ *stack trace here* ]]></stack-trace>
</failure>
<assertions>
<assertion result="Failed">
<message><![CDATA[ Expected: 136 But was: 135 ]]>/message>
<stack-trace><![CDATA[ *stack trace here* ]]></stack-trace>
</assertion>
</assertions>
</test-case>
그러나 경우, 예상 또는 실제 값에 대한 정보가 기록되지 않습니다 :
<test-case id="1014" name="TestThatPasses" fullname="TestThatPasses" methodname="TestThatPasses" classname="TestThatPasses" runstate="Runnable" seed="1565993596" result="Passed" start-time="2017-10-17 01:34:33Z" end-time="2017-10-17 01:34:33Z" duration="0.003047" asserts="2" />
어떤 방법에 있는가 테스트가 통과 되더라도 모든 주장을 얻으시겠습니까?
좋아요, 요청할 것입니다. 감사합니다 찰리! –