Skip to content

publishtestresults-action

Actions
Publish test results to Azure DevOps Test Store
v1.0.0-beta
LatestPre-release
Star (1)

Publish Test Results GitHub Action

This action was created to upload test results either in TRX or JUNIT format to Azure DevOps from a GitHub workflow using Azure DevOps Publish Test Results task. Most of the commonly used properties in the Azure DevOps Publish Test Results task map to properties of this GitHub action. Like the Azure DevOps Publish Test Results task, this action only supports Windows but NOT Linux.

Due to the unavailability of a Test results UI, test results are displayed in the console logs of the action.

Usage

See action.yml

Example

jobs:
  my_action_job:
    runs-on: windows-latest
    name: A job to run VSTest
    steps:
      - name: Download tests binary zip
        run: powershell Invoke-WebRequest -Uri "https://localworker.blob.core.windows.net/win-x64/tests.zip" -OutFile "./tests.zip"
      - name: Unzip tests binary
        run: powershell Expand-Archive -Path tests.zip -DestinationPath ./
      - name: Run tests
        uses: microsoft-approved-actions/vstest@master
        with:
          testAssembly: CloudTest.DefaultSamples*.dll
          searchFolder: ./tests/
          runInParallel: true
      - name: Publish Test Results
        uses: rasunkar/[email protected]
        id: PublishTestResults
        with:
            testResultsFormat: 'VSTest'
            testResultsFiles: '**/*.trx'
            searchFolder: ${{ github.workspace }}
            mergeTestResults: true
            testRunTitle: "GitHub#TestResults#"
            failTaskOnFailedTests: false
            adoOrganizationName: "rasunkar"
            adoProjectName: "ADO TCM"
        env:
          ADO_ACCESS_TOKEN: ${{ secrets.ADO_ACCESS_TOKEN }}

publishtestresults-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Publish test results to Azure DevOps Test Store
v1.0.0-beta
LatestPre-release

publishtestresults-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.