CircleCI integration
  • 04 Oct 2022
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

CircleCI integration

  • Dark
    Light

Article Summary

Autify provides the official CircleCI Orb to run a test plan or test scenario easily from your CircleCI workflow.

Getting started

This document describes how to use our CircleCI integrations with your Git repository step-by-step.

Prerequisites

First, we assume you already have CircleCI workflow to deploy your software to somewhere e.g. staging, production. We'll add an Autify test job right after the deployment job 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 for Web. The test scenario should be recorded against your target website where the software is deployed by your CircleCI workflow. 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 of Autify for Web. Please note the generated token somewhere so that we can store the value on Environment Variables later.

Note: 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.

Store personal access token on Environment Variables

Store the personal access token you generated above on Environment Variables by following CircleCI's document. You can use an arbitrary name for the Environment Variable but if you name AUTIFY_WEB_ACCESS_TOKEN, you don't have to specify the name later because this is the default name. Assuming you named so here.

Add CircleCI job to run Autify for Web

Finally, let's add a new job to your existing CircleCI workflow. See the examples below. The autify-test-url value should be the URL you noted above.

See also more details of parameters on CircleCI Orb page: https://circleci.com/developer/orbs/orb/autify/autify-web


Simply start a test and finish the step (no waiting for the finish of the test):

orbs:
  autify-web: autify/autify-web@3
workflows:
  test-run:
    jobs:
      - autify-web/test-run:
          autify-test-url: 'https://app.autify.com/projects/00/scenarios/000'

Start a test and wait until the test finishes or timed out:

orbs:
  autify-web: autify/autify-web@3
workflows:
  test-run:
    jobs:
      - autify-web/test-run:
          autify-test-url: 'https://app.autify.com/projects/00/scenarios/000'
          wait: true
          timeout: 300

CAVEAT: This will consume your CircleCI build minutes while waiting. Be careful when extending the timeout value.

Use url-replacements to start your test plan or scenario against a different URL:

orbs:
  autify-web: autify/autify-web@3
workflows:
  test-run:
    jobs:
      - autify-web/test-run:
          autify-test-url: 'https://app.autify.com/projects/00/scenarios/000'
          url-replacements: http://example.com=http://example.net

url-replacements is useful when you want to test your staging website by a test scenaio recorded against your production website, for example.

Conclusion

By using Autify's CircleCI Orb, 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.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.