This GitHub Action installs and configures the Testspace client, so a workflow can publish its test results, code coverage and static analysis to Testspace with one command.
- Reads JUnit XML (which most test frameworks write, some with a reporter), NUnit, xUnit.net and Visual Studio TRX, plus coverage and static analysis files.
- Runs on Linux and macOS runners (x86-64 and arm64) and Windows runners.
See the results of a real workflow in the live demo. It needs no account.
steps:
- uses: actions/checkout@v4
- uses: testspace-com/setup-testspace@v1
with:
domain: ${{ github.repository_owner }}
token: ${{ secrets.TESTSPACE_TOKEN }} # private repositories only
# ... build and run your tests ...
- name: Publish results to Testspace
run: testspace "test-results/*.xml" coverage.xml
if: always()if: always() publishes the results when tests fail, which is when they matter most.
| Input | Required | Description |
|---|---|---|
domain |
yes | Your Testspace Organization's name, the subdomain you signed up with (.testspace.com is optional). |
token |
private repositories | An access token or a Project's push token, stored as a repository secret. Public repositories don't need one. |
config-args |
no | Extra arguments for the client's config command (see the client reference). |
To pin the client's version, set the TESTSPACE_CLIENT_VER environment variable. On pull requests, Testspace reads the pull request's number with jq, which GitHub's hosted runners include; on a self-hosted runner without it, the action shows a warning.
Each job pushes its own files, and Testspace combines everything published for the same commit into one result. Give each job's results their own folder so they stay apart:
- run: testspace "[${{ matrix.os }}]test-results/*.xml"
if: always()See Matrix and the GitHub Actions setup in the help, and what can be published.
- Failure Tracking: every failing test is tracked from one run to the next, marked New, Flaky or Consistent, until it passes again.
- Health: each result is Healthy or Unhealthy against the checks you set, posted as a status check on the commit and pull request.
- Every branch and pull request gets its own results, with each test's history across them.
- Trends: a monthly view of whether quality is getting better, with what needs attention.
More: Automated test results · Visualizing GitHub Actions test results · Publishing overview
Contributions are welcome; see the Contribution Guide.
Released under the MIT License.
