Skip to main content
UI testing with Eggplant

How to set up UI testing with Eggplant in Gearset

Ollie Day avatar
Written by Ollie Day
Updated over a year ago

UI testing helps you check that changes in your Salesforce orgs work as expected at the user interface level. One popular option for automating UI tests for Salesforce is with Eggplant. In Gearset, you can trigger Eggplant jobs to run automatically following a successful deployment job run targeting a Salesforce org.

You’ll need an Automation Platform Teams or Automation Platform Teams Enterprise license to set up and use UI testing with Eggplant.

How to set up UI testing Eggplant

Add a connection to Eggplant

A team owner needs to complete this step.

On the Source control and services page, click the Connect to Eggplant link.

Gearset will open a dialog for you to enter the required information.

  • Realm - The ID of your Eggplant realm

  • Token URI - The token_url from the downloaded .csv file

  • Base URI - The base URL of the Eggplant instance. For example: http://localhost:8000

  • Client ID - The client_id from the downloaded .csv file

  • Client Secret - The client_secret from the downloaded .csv file

To create an API client in Eggplant:

  1. Navigate to System > API Access

  2. Click Add New.

  3. Add a name and description for your credentials.

  4. Click Create.

  5. A prompt appears asking you to download a file. Click Download and store the credentials .csv file in a safe place.

You can now use the client_id, client_secret, and token_url from your credentials file in the Gearset Add Eggplant connection dialog.

Run tests after a successful deployment

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

You’ll need to select Eggplant as your provider and specify the Eggplant model ID under the “Automated UI tests” section.

To find the model ID in Eggplant:

  1. Navigate to Designer > Models.

  2. Find the model you want and click the menu icon in the top-right.

  3. Click Export.

  4. A prompt appears asking you to download a file. Click Download and store the model .json file in a safe place.

You can now use the modeluuid from your model file in the Gearset CI deployment job configuration dialog.

On the next successful run of the CI deployment job the UI tests will be triggered in Eggplant.

Questions

How do I see the results of the tests run in Eggplant?

Currently, Gearset does not track the result of the Eggplant test runs, so you’ll need to use the Eggplant website to check if the Eggplant job was successful or not.

Did this answer your question?