Github Integration

The Frontend Robot’s Github integration allows you to:

  • Automatically trigger a test suite run for each new successful deployment
  • Attach test run results to commits and pull requests

Connecting a GitHub repository to a test suite

Connecting a Github repository to a test suite allows Frontend Robot to listen for new deployments created by other third party apps - such as Zeit Now and Heroku - and trigger the test suite run after the deployment successfully completes. You can read more about this feature on our blog.

To connect a Github repository to a test suite, navigate to the suite’s Settings tab:

Navigating to the Settings tab
Navigating to the Settings tab

Then scroll down to the Github integration section:

The Github integration section
The Github integration section

If you have not connected your Github account yet, you can do it now. Just click on the Connect Github account button to be redirected to Github to authorize the Frontend Robot app.

Once Github is connected to your account, you can browse for the repository to connect. But before you can do that you must have installed the Frontend Robot app into the Github organization. To do that click on the link under the Organization selection field:

Installing the Frontend Robot Github app
Installing the Frontend Robot Github app

Once you have selected the desired organization and repository on Github you can then insert the name of the environment that will trigger the run for the suite.

Connecting a repository
Connecting a repository

Click Connect and we are done.

Now when a third party integration will complete the deployment of a commit or pull request on Github, Frontend Robot will start the tests in the suite and attach the results to the commit or pull request that triggered the deployment.

Test results on Github
Test results on Github

Dealing with dynamic environment URLs

Some integrations, such as Zeit now, will give to each new deployment a different URL, and that may be a problem if you hardcoded the starting URL for your tests. Frontend Robot will expose a variable called _ENVIRONMENT_URL representing the URL of the new deployment, which you can use in your tests as starting URL.

TIP: If you want to have a default starting URL to use to run your tests manually from Frontend Robot (where the variable _ENVIRONMENT_URL is not defined) you can use the expression _ENVIRONMENT_URL || "https://your-default-env-url.com".

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.