Skip to content

A GitHub Action to install and configure the Testspace client used for publishing test content

License

Notifications You must be signed in to change notification settings

testspace-com/setup-testspace

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testspace Action

Testspace client Setup Action

A GitHub Action is used to install and configure the Testspace client used for publishing test results and reports to Testspace.com.

Usage

Setting up the Testspace client:

uses: testspace-com/setup-testspace@v1
with:
  domain: ${{ github.repository_owner }}  # Testspace subdomain defaults to GitHub org
  token: ${{ secrets.TESTSPACE_TOKEN }} # optional, only required for private repos

Once the client is setup for a job test results can be published to the Testspace server:

$ testspace results.xml

Input

The Testspace client action requires a domain and optionally a token for publishing test results.

  • Testspace domain is the organizational name (subdomain) used when creating the account along with .testspace.com. The .testspace.com string is optional.
  • Testspace access token is required when using a private repo.

Examples

A few usage examples:

name: CI
on:
  push:
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 50
      - uses: testspace-com/setup-testspace@v1
        with:
          domain: ${{github.repository_owner}}
      - name: Publish Results to Testspace
        run: |
          testspace results.xml
        if: always()

When using a Matrix it is recommended to use a folder to store the test results specific to each matric entry.

name: CI
on:
  push:
jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      ..
      - name: Publish Results to Testspace
        run: |
          testspace [ ${{ matrix.os }} ]results.xml   

When using the source directory to organize your test results in corresponding folders.

$ testspace results.xml{path/to/test-source}

For more information on Publishing test results refer to the help Overview on publishing.

Contributing

Contributions are encouraged following the Contribution Guide.

License

This code is released under the MIT License.