TOPdesk / dart-junitreport

An application to generate JUnit XML reports from dart test runs.
https://pub.dartlang.org/packages/junitreport
MIT License
31 stars 45 forks source link

Rename test suites and test cases #29

Closed robsonsky closed 2 years ago

robsonsky commented 3 years ago

I'd like to avoid having the classes full paths as names. Is there a way to do that?

<testsuite errors="0" failures="0" tests="4" skipped="0" name=".Users.robsonribeiro.flutter.my_app.test.bottom_navigation.tab_navigator" timestamp="2021-04-08T15:11:48">

would be:

<testsuite errors="0" failures="0" tests="4" skipped="0" name=".bottom_navigation.tab_navigator" timestamp="2021-04-08T15:11:48">

I understand that the name comes from the json file generated by flutter test --machine but still I couldn't find a way to change it.

I'd be happy to have a PR open if that's the case and if you'd point the direction to achieve such thing. Thank you!

rspilker commented 2 years ago

It is already possible by using a combination of -b "/Users/robsonribeiro/flutter." optionally followed by -p "replacement.packagename"

See tojunit -h for all command line options.