Open D0tNet4Fun opened 1 week ago
I've done some digging and found out that the data I need is available on the TestResultInfo
, although as internal property:
XunitXmlSerializer.CreateTestElement(TestResultInfo result)
result.DisplayName = "Login to web site"
result.TestCaseDisplayName = "Login to web site"
result.TestResultDisplayName = "[1/6] [Precondition] 1. The web site must be deployed on the web server"
I modified this code (in a way that is not worthy of a PR) and got this beautiful test report:
<test name="[1/6] [Precondition] 1. The web site must be deployed on the web server" type="Automation.TestFramework.Tests.DemoTestCase" method="LoginToWebsite" time="0.0009317" result="Pass">
<traits />
</test>
<test name="[2/6] [Precondition] 2. The web site must be accessible via HTTPS" type="Automation.TestFramework.Tests.DemoTestCase" method="LoginToWebsite" time="0.0000170" result="Pass">
<traits />
</test>
...
Hello,
I found an issue with the Xunit logger when using it with my Xunit-based custom test framework. Let me give you a bit of context:
The issue I found is that the test report contains the
7
test results as expected, but they all have the same name "Login to web site":By contrast, the
trx
test report contains the correct names as provided by my framework:The
trx
logger makes this difference between the test case name and the test result name, whereas thexunit
logger does not.Could you update the logger to use the test result name in this case, please?