GitHub Actions
Testery integrates with GitHub Actions via the Testery CLI.
You'll need to define a GitHub Actions workflow. This is done by creating a yml file in the .github/workflows
folder in your repository.
Step 1. Retrieve your Testery API Token. To retrieve your token, click Settings → Integrations → Show API Token and copy the token that is displayed. Keep this token secure as it allows access to Testery on your behalf.
Step 2. Store your Testery API Token as a GitHub Actions secret. This is referenced in your GitHub Actions workflow as follows:
jobs:
build:
...
env:
TESTERY_TOKEN: ${{ secrets.TesteryTokenProd }}
...
Step 3. Add steps to your GitHub Actions workflow to install the Testery CLI and create the test run.
Here is a sample .github/workflows/testery.yml
name: Testery Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
TESTERY_TOKEN: ${{ secrets.TesteryTokenProd }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install testery --upgrade
- name: Deploy Application
run: |
... logic to deploy your application ...
- name: Run Testery Tests
run: |
# Create test run.
testery create-test-run --api-url https://api.testery.io/api --token "$TESTERY_TOKEN" --include-tags "smoke" \
--variable "TEST_URL=${TEST_URL}" \
--git-ref "$GITHUB_SHA" --project "example-webdriverio" --environment "testery-dev" \
--wait-for-results
Last updated
Was this helpful?