Netlify Integration

Frontend Robot can integrate with Netlify thanks to smart triggers. You can automatically run a test suite just after a successful deployment and if your code is stored on Github, you can see the test results beside the commit or PR that triggered the deployment.

Calling the smart trigger from Netlify

To automatically run a test suite after a deployment, we need to add Frontend Robot’s smart trigger as an outgoing webhook on Netlify.

First, go to your project’s Site Settings on Netlify.

Netlify site settings
Netlify site settings

Then click on Build and Deploy on the menu and scroll down to the Deploy Notifications sections.

Navigating to the
Navigating to the "Build and Deploy" settings

Now, let’s add a new outgoing webhook. Click on Add Notification and select Outgoing Webook from the menu.

Adding a new outgoing webhook
Adding a new outgoing webhook

In the modal that opens, select Deploy succeeded for the Event to listen for field. In the URL to notify field, copy/paste the smart trigger URL for the test suite you want to run after each deploy. Follow the instructions in the smart trigger documentation to obtain the URL for a test suite. You can leave the JWT Secret Token field empty. Click Save and we are done!

Defining a new outgoing webhook
Defining a new outgoing webhook

Now each time Netlify will complete the deployment of your project, Frontend Robot will run the test suite linked to the smart trigger.

TIP: in your tests instead of hardcoding your deployment’s URL, you can use the built-in variable ${_ENVIRONMENT_URL}, which is passed to the test suite every time the smart trigger is invoked from Netlify. If you still want to run the test suite manually, you can specify a default deployment url by using the expression ${_ENVIRONMENT_URL || "https://your-default-env-url.com"}

Displaying the test results on Github

If Netlify is deploying your project from Github, you can attach the results of your Frontend Robot tests to the commit or PR that originated the deploy.

Frontend Robot results on Github
Frontend Robot results on Github

To enable the feature, all you have to do is connecting the Github organization of the repo to your Frontend Robot organization. Go to the organization’s settings on Frontend Robot and then click on the Integrations tab.

Connecting a Github Organization
Connecting a Github Organization

Click on Connect Organization and follow the instructions. For convenience we recommend to allow access to all the repositories on the organization.

Questions?

We're always happy to help with test creation or other questions you might have! Search our documentation, contact support by email or on chat, or connect with our sales team.