ctrf-io / ctrf-io/github-test-reporter
Bug: Integration with junit-to-ctrf does not use arguments
Open
@Ma11hewThomas is already working on this.
Since Aug 23, 2025.
- Dominant language
- TypeScript
- Stars
- 376
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
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. https://github.com/ctrf-io/github-test-reporter/blob/c390e03fbec5cebcbe28cc24a9c6f7f3a4265b51/src/ctrf/report-preparation.ts#L43 - The config for the JUnit To CTRF integration isn't handled. https://github.com/ctrf-io/github-test-reporter/blob/c390e03fbec5cebcbe28cc24a9c6f7f3a4265b51/src/integrations/handler.ts#L30
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.