mikepenz/action-junit-report

invalid path created when a scenario fails

Open

#1324 aperta il 17 mar 2025

Vedi su GitHub
 (4 commenti) (1 reazione) (0 assegnatari)TypeScript (156 fork)github user discovery
help wanted

Metriche repository

Star
 (418 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

We have a structure like:

features
|-target_1
|\
  - Test1.feature
  - Test2.feature
|-target_2
|\
  - Test1.feature
  - Test2.feature

We've just noticed a failure on target_2/Test1.feature:

<testcase classname="Test1" name="Test1.11 Title Goes Here" time="9.180492">
  <failure message="failed Test1.11 Title Goes Here" type="failed">
    <![CDATA[ Scenario: Test1.11 Title Goes Here Given]]>
    features/target_2/Test1.feature:278:in `step name' ]]>
  </failure>
  <system-out>
    <![CDATA[ ]]>
  </system-out>
  <system-err>
    <![CDATA[ ]]>
  </system-err>
</testcase>

However, the report made by this action-junit-report reads as follows:

JUnit Test Report - 16 tests run, 15 passed, 0 skipped, 1 failed.
     🧪 - [root path redacted]\features\target_1\Test1.feature | failed failed Test1.11 Title Goes Here"
  ℹ️ - JUnit Test Report - Creating check (Annotations: 0)

As you might have noticed, it changed target_2 to target_1 (and changed//added the root path)

Is this a limitation from the action? Or does it actually parse something incorrect?

Guida contributor