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
Base URI - The base URL of the Eggplant instance. For example: http://localhost:8000
Client ID - The client_id from the downloaded
Client Secret - The client_secret from the downloaded
To create an API client in Eggplant:
Navigate to System > API Access
Click Add New.
Add a name and description for your credentials.
A prompt appears asking you to download a file. Click Download and store the credentials
.csvfile 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:
Navigate to Designer > Models.
Find the model you want and click the menu icon in the top-right.
A prompt appears asking you to download a file. Click Download and store the model
.jsonfile 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.
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.