Skip to main content

UI testing in CI jobs with Gearset

How to link your Gearset UI Testing test job to a CI job

Josh Heng avatar
Written by Josh Heng
Updated this week

In Gearset, you can trigger a Gearset UI testing job to run automatically following a successful deployment job run targeting a Salesforce org.

You’ll need an Automation Platform Teams or Automation Platform Enterprise license to add any UI test provider into CI/CD.

You'll also need an Automated Testing license to create UI tests within Gearset.

How to setup Gearset UI Testing with your CI Job

This guide is specifically for linking our new, native testing solution into your CI job. If you'd like to link a third party UI testing provider instead, please see "UI testing in continuous integration jobs".

You will need at least one Test Job that runs on your desired Salesforce org. If you haven't done this yet, follow our "Running your first Test Job with Automated Testing" guide.

Run tests after a successful deployment

You can specify which Gearset UI testing job to run after your CI deployment by editing a job on your continuous integration dashboard or when you are creating a new CI job.

Select the Gearset UI Testing test provider, and then select your desired test job in the dropdown that appears.

A test job can only be linked to one CI job, and the dropdown will only show test jobs that are running on the same Salesforce org as the CI job.

After you click Save environment, the test job will be automatically triggered on a successful deployment.


Questions

How do I see the results for a test?

You can view your test results in both the UI testing dashboard and in your pipelines environment.

UI testing results will appear in the End to end tests section of your CI job in your pipeline, or in any corresponding PRs. To view more information about the results, click on the Results button.

The results page will show the individual status of each test within the job. You can also click View run to see the status and a screenshot of each step.

Can I rerun a test job?

Whilst it is possible to manually rerun a test job from the UI testing dashboard, this will not update the results in your pipeline and any associated PRs.

To update these results, you will need to fully rerun the latest deployment by clicking Run job.

If you have fixed a failing UI test and need to promote a PR that originally failed testing, you can click the Dismiss and continue button underneath the failing test.

Why are my scheduled test job results not appearing on my pipeline?

The tests results that appear in your pipeline and any associated PRs are only results that directly correspond to a successful deployment.

Whilst it is possible to run test jobs manually or on a schedule from the UI testing dashboard, these results will only appear in the UI testing dashboard.

Will my CI test runs appear in the UI testing dashboard?

Yes, your test runs that were triggered from a successful deployment will also be shown in the UI testing dashboard, both when viewing the test job and viewing a specific test.

Did this answer your question?