-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
I've been unable to get the JUnit to CTRF Integration to generate a report with a provided env appName and buildUrl. Regardless of input from the integration config json, those values are set by the github context via enrichCurrentReportWithRunDetails()
Github yaml:
- name: Publish Github Test Report
if: success() || failure()
uses: ctrf-io/github-test-reporter@v1
with:
report-path: 'test/${{ inputs.app }}/**/*_junit.xml'
template-path: '.github/actions/run-tests/ctrf-template-job.hbs'
custom-report: true
summary: true
write-ctrf-to-file: 'test-results/${{ steps.prepare_paths.outputs.name }}/ctrf-report.json'
integrations-config: |
{
"junit-to-ctrf": {
"enabled": true,
"action": "convert",
"options": {
"output": "./test-results/${{ steps.prepare_paths.outputs.name }}/ctrf-report.json",
"toolname": "junit-to-ctrf",
"useSuiteName": false,
"env": {
"appName": "Unit: Shared",
"buildUrl": "https://github.com/<REPO>/actions/runs/<RUN_ID/job/<JOB_ID>"
}
}
}
}
Resulting CTRF report:
{
"reportFormat": "CTRF",
"specVersion": "0.0.0",
"generatedBy": "junit-to-ctrf",
"timestamp": "2025-08-22T21:51:11.791Z",
"results": {
....,
"environment": {
"buildName": "unit-tests",
"buildNumber": "1",
"buildUrl": "https://github.com/<REPO>/actions/runs/<RUN_ID>#summary",
"buildId": "<BUILD_ID>",
"branchName": "refs/pull/<PULL_ID>/merge"
}
}
}
The example in the JUnit to CTRF Integration documentation in this project includes setting appName, so I'd expect this to be possible.
It looks like this was planned but not implemented?
- The only input passed to
convertJUnitToCTRFReport()is the path to the JUnit xml file.report = await convertJUnitToCTRFReport(inputs.ctrfPath) - The config for the JUnit To CTRF integration isn't handled.
case 'junit-to-ctrf':
Metadata
Metadata
Assignees
Labels
No labels