Testim Documentation

Welcome to the Testim documentation. You'll find comprehensive guides to help you get started quickly, example code snippets, and tips for being more productive. You will also find details about advanced features that allow you to customize Testim to fit your environment or special testing conditions. Don't worry, we'll support you if you get stuck. Let's jump right in!

Guides    Changelog

Getting Started with Testim for Salesforce

Creating a Test – Tutorial Case

The Creating a test with Testim for Salesforce tutorial demonstrates the basic functionality of creating a test for a Salesforce application. The process involves logging in to the relevant Salesforce account and recording the series of actions that you would like to test. Later you will be able to edit the properties for each of the steps and add Salesforce APEX action steps and validations.

For this tutorial we will be logging into Salesforce with a Salesforce auto-login step and creating a new account in Salesforce. We will then run a test of the login procedure and account creation.

Adding a Salesforce auto-login Step

The Salesforce auto-login step allows the test to login to the Salesforce environment (or sandbox) from a single predefined step, without the need to actually record your login actions. After you add the login step and enter the details of the environment you are testing, you can start recording your test.

📘

If your Salesforce environment is protected with 2-factor authentication, we recommend that your organization’s Salesforce administrator whitelist the IP for the machine from which you are running your tests.

To create a new test and add a Salesforce auto-login step:

  1. Click on + New Test.

A new test opens with a Setup step in the Editor. This is where you record the test, add validations and edit the test steps.

  1. Hover over the Setup step and click on the Show Properties () icon.

The Properties panel opens on the right-hand side.

  1. In the Base URL field, enter the URL of your Salesforce login page.
  1. In the Editor, hover over the (arrow symbol) where you want to add the Salesforce auto-login step.

The action items are displayed.

  1. Click on the “M” (Testim predefined steps).
    The Predefined steps menu opens.
  1. Click on Salesforce.
    The Salesforce menu expands.
  1. Scroll down through the menu and select Salesforce auto-login.

📘

Alternatively, you can use the search box at the top of the menu to search for Salesforce auto-login.

The Add Step window is shown.

  1. In the Name the new step field, enter a (meaningful) name for this step.
  2. If this is a shared step to be made available to reuse in this or other tests, keep the box next to Shared step selected (default), and choose a folder from the Select shared step folder list where you want this step stored. Otherwise, deselect the checkbox.
    For more information about shared steps, see Groups.
  3. Click Create Step.
    The step is added in the Editor, and the Properties panel opens on the right-hand side.
  1. In the Properties panel, in the Description field, optionally edit the description of this step. The default description is “Run shared Salesforce Autologin”.
  2. Enter the connection properties for your Salesforce environment.
    You can enter strings (surrounded by single or double quotes) or parameters (not surrounded by quotes). For more information on using parameters, see Using Parameters (below).
  • In the URL field, enter the URL of your Salesforce environment.
  • In the Username field, enter your username.
  • In the Password field, enter your password.
  1. Optionally fill in the following Properties:
  • When this step fails – Specify what to do if this step fails.
  • When to run step – Specify conditions for when to run the step. For more information, see Conditions.
  • Override timeout – Allows you to override the default time lapse setting which causes Testim to register a fail for a test step, and specify a different time lapse value (in milliseconds).
    The Salesforce auto-login step is configured.
  1. In order to be able to record your test in your Salesforce UI, you need to run the Salesforce auto-login step and log into your Salesforce account.
    On the Editor screen, click the Play button in the toolbar.

A new browser opens and runs the Salesforce auto-login step. This is the Application Under Test (AUT) window. When the test is completed, you are logged into your Salesforce account, and a pop-up window indicates the test was successful. You are now ready to record test steps.

Using parameters

You can use parameters, which were defined in the test or suite level, in the config file, or in another step, to enter your connection properties for your Salesforce environment.

To use parameters to enter your connection properties:

  1. Define parameters in one of the following ways:
  1. In your Salesforce auto-login step, add the parameters to the URL, Username, and Password fields.

Recording a Test in Salesforce

To record test steps in your Salesforce environment:

  1. After running your test to log into your Salesforce environment, hover over the plus symbol to the right of your Salesforce auto-login step, and click on the Record button.

Your Salesforce environment is shown in the Application Under Test (AUT) window.

The series of actions that you take in this window are recorded and saved as a test in Testim for Salesforce.

  1. In the AUT browser, create a new account as you normally would in Salesforce.
    For each action you take, the number in the recording icon increases by one.
  2. Click the Stop Recording button.

You are returned to the Visual Editor browser.
The procedure that you recorded on the Salesforce website is shown as a series of actions in the test window. Each box represents a step in the test procedure. An icon at the top left of the box indicates the type of action (click, enter text, scroll, etc.) that was performed.

  1. Click Save.

The Save Test window is shown.

📘

Whenever you create a new test or make changes to an existing test, make sure to save the test. If you close the browser without first saving the test, your work will be lost.

  1. In the Name field, enter a meaningful name.
  2. In the Description field, optionally enter a description of this test.
  3. Click OK.
    The test is saved, and you have created your first test in Testim for Salesforce!

Running a Test

📘

Supported version

It is possible to run the test in Chrome in "Extension mode" only ("mode selenium" is not supported).

To run your test locally:

  1. On the Editor screen, click the Play button in the toolbar.

A new browser opens and runs the test actions. When the test is completed, a pop-up window indicates whether the test was successful.

  1. Click on Go back to the editor link to return to the Editor to view the results.

Viewing Test Results

On the test Editor screen, you can view the test results. Overall run data is shown at the top of the screen. In addition, the colored icons at the top of each step indicate whether or not that action was successful.

If you would like to view detailed results for a specific action, double-click on the step. The action results screen is displayed for that action.

In case of a test failure, detailed information is shown about the cause of the failure. (In the following example, the test failed to login to the Salesforce website due to a wrong URL parameter definition.)

Support

We are here for you! Click the chat button in the lower-right corner of the screen, and a Testim representative will help you.

Updated 21 days ago

Getting Started with Testim for Salesforce


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.