Skip to content

Report test results in Github actions workflow summaries#1187

Merged
MatMoore merged 2 commits intomainfrom
DTOSS-12372-publish-test-output-xunit
Mar 17, 2026
Merged

Report test results in Github actions workflow summaries#1187
MatMoore merged 2 commits intomainfrom
DTOSS-12372-publish-test-output-xunit

Conversation

@MatMoore
Copy link
Contributor

@MatMoore MatMoore commented Mar 17, 2026

Description

For assurance purposes, we want something we can link to that shows the tests that have been run on the artefact we're deploying. But we're not sure how much this will be used in practice, so we don't want to spend a lot of time on this.

I've gone with https://github.com/dorny/test-reporter which imports xunit reports from pytest and jest.

The results show up in the summary of the workflow run.

Screenshot 2026-03-17 at 11 00 13 Screenshot 2026-03-17 at 11 00 18

Rejected alternatives

  • Allure reports. This tool looked very promising, but I had difficulty configuring it. It seems to have undergone a recent rewrite and the docs weren't great. It's features allow us to make the report more human readable, e.g. you can annotate test steps, attach screenshots, and group into an epic/feature/story hierarchy. But we'd need to host the HTML somewhere for it to be practical.
  • Pytest-BDD. This gives you readable output for given/when/then style tests, but we'd have to make some major changes to the tests themselves. The report plugin generates HTML, so again we'd have to work out a hosting solution to make it easily browsable.
  • CTRF reports. The tooling for this seems immature. Seems like a worse version of dorny/test-reporter.
  • upload-artefact action - we can attach arbitrary files to the github actions job, which could include raw XML reports, or HTML output. However, this is too awkward for somebody outside of the team, and I doubt we would ever make use of it.

Jira link

https://nhsd-jira.digital.nhs.uk/browse/DTOSS-12372

Review notes

Review checklist

  • Check database queries are correctly scoped to current_provider

@MatMoore MatMoore force-pushed the DTOSS-12372-publish-test-output-xunit branch 3 times, most recently from aad6a8d to 7ed7a19 Compare March 17, 2026 10:42
@MatMoore MatMoore changed the title [DO NOT MERGE] Report test results in Github actions (xunit output) Report test results in Github actions (xunit output) Mar 17, 2026
@MatMoore MatMoore changed the title Report test results in Github actions (xunit output) Report test results in Github actions workflow summaries Mar 17, 2026
@MatMoore MatMoore marked this pull request as ready for review March 17, 2026 11:06
@MatMoore MatMoore force-pushed the DTOSS-12372-publish-test-output-xunit branch from 7ed7a19 to 6a7ed92 Compare March 17, 2026 13:10
@sonarqubecloud
Copy link

@MatMoore MatMoore merged commit bb941bb into main Mar 17, 2026
12 checks passed
@MatMoore MatMoore deleted the DTOSS-12372-publish-test-output-xunit branch March 17, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants