--- title: "Integrate Autify with Jenkins | Autify Guide" slug: "jenkins-integration" description: "Set Up Autify Integration with Jenkins for Seamless Continuous Testing. Start Your 14-Day Trial Now!" updated: 2024-07-17T13:25:15Z published: 2024-07-17T13:25:15Z canonical: "help.autify.com/jenkins-integration" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Jenkins integration Autify provides [an official Jenkins plugin](https://plugins.jenkins.io/autify/) to run a test plan or test scenario easily from your Jenkins workflow. ## Getting started This document describes how to use our [Autify Jenkins plugin](https://plugins.jenkins.io/autify/) step-by-step. ### Prerequisites First, we assume you already have a Jenkins Project or Pipeline to deploy your software to somewhere e.g. staging, production. We'll add an Autify test step right after the deployment step to confirm the newly deployed software doesn't break the end-to-end experience. Secondly, you need to create a test plan or test scenario on [Autify NoCode Web](https://app.autify.com). The test scenario should be recorded against your target website where the software is deployed by your Jenkins. Please note the URL of your test plan or scenario e.g. `https://app.autify.com/projects/00/scenarios/000` and we'll use it later. You also need to [create a personal access token](https://help.autify.com/docs/integrate-with-api#issue-a-personal-access-token) of Autify for Web. Please note the generated token somewhere so that we can store the value on Jenkins Secrets later. Personal access token Since the personal access token is associated with a single user, we recommend you to create a machine user in your organization and use its personal access token for CI/CD integration. ### Install plugin Open the [Autify Plugin page](https://plugins.jenkins.io/autify/) and click "How to install" on the top right. You'll see the installation options like below: ![Screen Shot 2022-08-12 at 9.46.25 AM.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/Screen%20Shot%202022-08-12%20at%209.46.25%20AM.png?sv=2026-02-06&spr=https&st=2026-10-31T18%3A26%3A40Z&se=2026-10-31T19%3A26%3A40Z&sr=c&sp=r&sig=8ORbx%2FNY5A%2B2bs%2FK43kOU0yw6%2BCH5XFWiwCq%2FSnYoqs%3D) ### Store personal access token on Jenkins Secrets Store the personal access token you generated above on Secrets by following [Jenkins's document](https://www.jenkins.io/doc/book/using/using-credentials/). **Use "Secret text"** for "Kind" and you can name an arbitrary "ID". Assuming you named it `autifyWebAccessToken` here: ![Screen Shot 2022-08-08 at 5.05.04 PM.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/Screen%20Shot%202022-08-08%20at%205.05.04%20PM.png?sv=2026-02-06&spr=https&st=2026-10-31T18%3A26%3A40Z&se=2026-10-31T19%3A26%3A40Z&sr=c&sp=r&sig=8ORbx%2FNY5A%2B2bs%2FK43kOU0yw6%2BCH5XFWiwCq%2FSnYoqs%3D) ### Add a build step to run Autify for Web Finally, let's add a new step to your existing Jenkins Project or Pipeline. #### Jenkins Project Go to configuration of your Project and click "Add build step" under "Build" and select "Run test on Autify for Web": ![Screen Shot 2022-08-09 at 3.21.56 PM.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/Screen%20Shot%202022-08-09%20at%203.21.56%20PM.png?sv=2026-02-06&spr=https&st=2026-10-31T18%3A26%3A40Z&se=2026-10-31T19%3A26%3A40Z&sr=c&sp=r&sig=8ORbx%2FNY5A%2B2bs%2FK43kOU0yw6%2BCH5XFWiwCq%2FSnYoqs%3D) Then, select the ID of the Secret you created above e.g. `autifyWebAccessToken` from the select box of "Personal Access Token of Autify for Web" and paste the URL noted above e.g. `https://app.autify.com/projects/00/scenarios/000` to "Autify for Web test URL". See the examples below. --- Simply start a test and finish the step (no waiting for the finish of the test): ![Screen Shot 2022-08-11 at 4.42.09 PM.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/Screen%20Shot%202022-08-11%20at%204.42.09%20PM.png?sv=2026-02-06&spr=https&st=2026-10-31T18%3A26%3A40Z&se=2026-10-31T19%3A26%3A40Z&sr=c&sp=r&sig=8ORbx%2FNY5A%2B2bs%2FK43kOU0yw6%2BCH5XFWiwCq%2FSnYoqs%3D) Start a test and wait until the test finishes or timed out - Check "Wait?": ![Screen Shot 2022-08-12 at 12.06.03 AM.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/Screen%20Shot%202022-08-12%20at%2012.06.03%20AM.png?sv=2026-02-06&spr=https&st=2026-10-31T18%3A26%3A40Z&se=2026-10-31T19%3A26%3A40Z&sr=c&sp=r&sig=8ORbx%2FNY5A%2B2bs%2FK43kOU0yw6%2BCH5XFWiwCq%2FSnYoqs%3D) Use "URL replacements" to start your test plan or scenario against a different URL - Click "Advanced" and "Add" for "URL replacements": ![Screen Shot 2022-08-12 at 12.06.38 AM.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/Screen%20Shot%202022-08-12%20at%2012.06.38%20AM.png?sv=2026-02-06&spr=https&st=2026-10-31T18%3A26%3A40Z&se=2026-10-31T19%3A26%3A40Z&sr=c&sp=r&sig=8ORbx%2FNY5A%2B2bs%2FK43kOU0yw6%2BCH5XFWiwCq%2FSnYoqs%3D) *"URL replacements" is useful when you want to test your staging website using a test scenaio recorded against your production website, for example.* #### Jenkins Pipeline Open your `Jenkinsfile` or Pipeline configuration page and insert the step below right after your deployment step. --- Simply start a test and finish the step (no waiting for the finish of the test): ``` autifyWeb credentialsId: 'autifyWebAccessToken', autifyUrl: 'https://app.autify.com/projects/00/scenarios/000' ``` Start a test and wait until the test finishes or timed out: ``` autifyWeb credentialsId: 'autifyWebAccessToken', autifyUrl: 'https://app.autify.com/projects/00/scenarios/000', wait: true ``` Use `urlReplacements` to start your test plan or scenario against a different URL: ``` autifyWeb credentialsId: 'autifyWebAccessToken', autifyUrl: 'https://app.autify.com/projects/00/scenarios/000', urlReplacements: [[patternUrl: 'http://example.com', replacementUrl: 'http://example.net']] ``` *`--url-replacements` is useful when you want to test your staging website using a test scenaio recorded against your production website, for example.* ### (Not recommended) Using "Execute shell" step **If you don't want to use our Jenkins plugin or it has an issue, you can use "Execute shell" step instead.** Here is the summary of the process: 1. Install the following plugins if you don't have yet: - [Credentials](https://plugins.jenkins.io/credentials/) - [Plain Credentials](https://plugins.jenkins.io/plain-credentials/) - [Credentials Binding](https://plugins.jenkins.io/credentials-binding/) 2. Store the personal access token as described above. 3. Add "Execute shell" build step: - Jenkins Project: ``` curl https://autify-cli-assets.s3.amazonaws.com/autify-cli/channels/stable/install-cicd.bash | bash -xe ./autify/bin/autify web test run https://app.autify.com/projects/00/scenarios/000 ``` 1. Add the Secret to "Build Environment" > "Bindings" (Use `AUTIFY_WEB_ACCESS_TOKEN` as "Variable") 2. Add "Execute shell" build step e.g.: - Jenkins Pipeline: ``` withCredentials([string(credentialsId: 'autifyWebAccessToken', variable: 'AUTIFY_WEB_ACCESS_TOKEN')]) { sh ''' curl https://autify-cli-assets.s3.amazonaws.com/autify-cli/channels/stable/install-cicd.bash | bash -xe ./autify/bin/autify web test run https://app.autify.com/projects/00/scenarios/000 ''' } ``` 1. Add `sh` step surrounded by `withCredentials` e.g.: Note: You can customize the Autify CLI command in the shell step as you like. See [Autify CLI's documentation](https://help.autify.com/docs/autify-command-line-interface) for more details. ## Conclusion By using [Autify's Jenkins plugin](https://plugins.jenkins.io/autify/) (or shell step), you can automatically run a test plan or scenario after deployments so that you can detect regressions right away and take an appropriate actions without wasting time.