gfoidl / trx2junit

Transforms XML from trx-Testresults to JUnit-Testresults / trx to JUnit XML and the other way round
MIT License
70 stars 17 forks source link

Incorrect testcase names in xml #110

Closed Ray-Barker closed 2 years ago

Ray-Barker commented 2 years ago

Summary

When converting trx results to xml testcase name field in xml shows incorrect data

Steps to reproduce

  1. Create trx files with dotnet test --logger "trx;LogFilePrefix=UnitTestResult" -r /reports
  2. Run trx2junit /reports/*

What is the current bug behavior?

When there's a dot/dots in a testcase name, only the part after the last dot ends up in xml testcase name field. For example I get this value: testcase name="5 TB")" instead of testcase name="SomeText("1.5 TB")"

What is the expected correct behavior?

Unchanged testcase name is in xml

Relevant logs and/or screenshots

Further technical details

trx2junit-version: v2.0.3 Operating system: docker

P.S.

Tried switching to v1.6.0, this version creates xml files with correct testcase names

gfoidl commented 2 years ago

Thanks for the bug-report!

I guess this bug got introduced by https://github.com/gfoidl/trx2junit/pull/103, and I'll provide a fix later today.

gfoidl commented 2 years ago

New release v2.0.4 with this fix is out.

Ray-Barker commented 2 years ago

@gfoidl Big thanks for such a quick response and the fix!