Closed hiddenshadow21 closed 2 years ago
@hiddenshadow21 thanks for the analysis.
Just a question: what test-framework do you use? XUnit? In the test-data I see the behavior you described. It's for XUnit, but not for NUnit and MSTest.
Will provide a fix then.
E.g. it's https://github.com/gfoidl/trx2junit/blob/50432b342c3219948ba49a0d30481c884afce80e/tests/trx2junit.Core.Tests/data/trx/nunit.trx#L21 (NUnit) vs https://github.com/gfoidl/trx2junit/blob/50432b342c3219948ba49a0d30481c884afce80e/tests/trx2junit.Core.Tests/data/trx/xunit.trx#L24 (XUnit). Look at className
and name
attributes.
So the test-runners itself write that info, trx2junit just uses these values and emits the jUnit.
Nevertheless this should be fixed up (here).
Yes, I'm using XUnit.
@hiddenshadow21 new release with that fix is out.
Thanks for reporting that issue!
Problem
Jenkins show empty build history list for tests.
Trx2Junit creates tag
<testcase/>
with attributesname=FullyQualifiedTestName
andclassname=FullyQualifiedClassName
. This leads to double usage of namespace in test result name and somehow breaks Jenkins from finding build with given test in history.Solution I found
Do not use fully qualified name in
<testcase>
name
attribute.Expected
Trx2Junit creates tag
<testcase/>
with attributesname=TestName
andclassname=FullyQualifiedClassName
.