generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 249
Closed
Labels
bugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already exists
Milestone
Description
I am generating junit xml using golang and github.com/jstemmer/go-junit-report/v2@latest. Sometimes, on failure, it produces XML with an empty failure element. This produces a parse error:
Run dorny/test-reporter@v1
Action was triggered by pull_request: using SHA from head of source branch
...
Using test report parser 'java-junit'
Creating test report XXXX
Processing test results for check run XXXX
Creating check run XXXX
Creating report summary
Generating check run summary
Error: TypeError: Cannot read properties of undefined (reading 'split')
Sample XML:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="1" failures="1">
<testsuite name="my.company.com/suite/e2e/node_scale" tests="1" failures="1" errors="0" id="9"
hostname="some-hostname.com" time="341.455" timestamp="2023-03-17T21:23:52Z">
<testcase name="TestNodeScale" classname="my.company.com/e2e/node_scale" time="341.340">
<failure message="Failed"></failure>
</testcase>
</testsuite>
</testsuites>
Adding a value, eg <failure message="Failed">bla</failure
resolves this issue. I do not know if empty element is valid in junit format. If it is not valid, then I should open an issue with github.com/jstemmer/go-junit-report.
My action:
- name: Publish Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Junit Publish Test
path: junit-sample.xml
reporter: java-junit
tzachshabtay, MattF-Afterpay, viktorkholod, andreyreshetnikov-zh, richja and 1 moreThorntonMatthewD
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already exists