QA Wolf logo

QA Wolf

Run Tests on Netlify Deployment

In this tutorial, we'll set up our tests to run on Netlify deployments.

QA Wolf supports running tests on all three predefined Netlify deploy contexts: deploy-preview, branch-deploy, and production.

Production deployments happen when you deploy to your production branch (example: main).

We use the term "preview deployment" to refer to both deploy-preview and branch-deploy Netlify contexts (any deploy that isn't your production branch).

Create Trigger

Click the Triggers button in the sidebar of the dashboard.

open triggers from dashboard

Click Create Trigger.

create trigger

You can rename your trigger, or use the default name.

rename trigger

You can choose to run all your tests, or only tests with specific tags.

choose tags

If you have created any environments, choose the one to use when your tests run.

choose environment

Choose Netlify Deployment from the Run tests on dropdown.

choose Netlify Deployment

In Netlify open "Site settings > Build & deploy > Deploy notifications."

Click "Add notification" button and choose "Outgoing webhook".

Choose "Deploy succeeded" then enter the URL and JWS secret token provided in the modal.

Netlify deployment instructions

You can connect your GitHub repository to QA Wolf to see status checks on commits.

Connect GitHub Repo

A new tab will open and visit GitHub. You will be asked to choose the repo(s) you want QA Wolf to access.

Install GitHub App

Choose the repo(s) you want to test and click the green Installbutton. After the installation succeeds, the new tab will close.

Confirm the repo you want to test is now selected in the dropdown.

Confirm Selected GitHub Repo

You can run your tests on all deployments (preview and production), just preview deployments, or just production deployments.

choose deployment types

To run the tests on specific branches only, choose Select and enter a comma-separated list of branches: develop,main.

For example, at QA Wolf we have a group of tests that we run when staging is deployed. We deploy to staging automatically when we merge to the develop branch.

choose branches

Once you are done, click the Create trigger button to save your trigger.

save trigger

See Results in GitHub

When you push a commit to GitHub, your tests will run after your deployment succeeds.

See results in GitHub

QA Wolf will comment on a pull request with the most recent test suite. As your tests run, the comment is updated to report the latest results.

GitHub pull request comment

View Run History

🎉 Congratulations - now your tests will run on Netlify deployments in 100% parallel!

You can see your test runs in the Run history page of the dashboard.

Run history