test-results-reporter / parser

Parse test results from JUnit, TestNG, xUnit and many more
https://www.testbeats.com
MIT License
12 stars 9 forks source link

include JUnit 'hostname' suite attribute in meta_data #52

Closed bryanbcook closed 7 months ago

bryanbcook commented 8 months ago

I've been working with Playwright recently and have noticed that it stores the browser type in the 'hostname' attribute.

Using the getting started guide, this simplified junit xml results file shows that the two tests are repeated in the test output, differentiated by their hostname.

<testsuites>
   <testsuite name="example.spec.ts" hostname="chromium">
     <testcase name="has title" classname="example.spec.ts" />
     <testcase name="get started link" classname="example.spec.ts" />
   </testsuite>

   <testsuite name="example.spec.ts" hostname="firefox">
     <testcase name="has title" classname="example.spec.ts" />
     <testcase name="get started link" classname="example.spec.ts" />
   </testsuite>

   <testsuite name="example.spec.ts" hostname="webkit">
     <testcase name="has title" classname="example.spec.ts" />
     <testcase name="get started link" classname="example.spec.ts" />
   </testsuite>
</testsuites>

This hostname property should be accessible in our meta_data for the suite and testcases.