Action Output

You can chain GitHub actions together to create awesome workflows.

The TestDriver action outputs the following variables. You can chain mlutliple actions together to post TestDriver results as comments, send an email on failure, or upload them to 3rd party test reporting software.

Output Variable

Description

summary

Contains the TestDriver AI text summary result of the action execution.

link

markdown

Contains the markdown-formatted shareable link. This includes a screenshot of the desktop!

success

Indicates whether the action passed successfully (true or false).

Example

Here's an example of creating a comment on the PR after every execution.

name: TestDriver.ai

permissions:
  actions: read
  contents: read
  statuses: write
  pull-requests: write

on:
  pull_request:

jobs:
  test:
    name: "TestDriver"
    runs-on: ubuntu-latest
    id: run-testdriver
    steps:
      - uses: dashcamio/testdriver@main
        version: v4.0.0
        key: ${{secrets.TESTDRIVER_API_KEY}}
        with:
          prompt: |
            1. /run /Users/ec2-user/actions-runner/_work/testdriver/testdriver/.testdriver/test.yml
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          FORCE_COLOR: "3"
    - name: Create comment on PR
      if: ${{ always() }}
      uses: peter-evans/create-or-update-comment@v3
      with:
        issue-number: ${{steps.get_issue_number.outputs.result}}
        body: |
          ${{ needs.run-testdriver.outputs.summary }}
          ${{ needs.run-testdriver.outputs.markdown }}

Last updated

Was this helpful?