Use the Salesforce Scan

You can scan your Salesforce applications in one of the following ways:

  • Use the Salesforce Scan.

The Salesforce Scan connects to your Salesforce instance and automatically creates Modules from all controls that can be accessed. For more information about the Modules created with the Salesforce Scan, see chapter "Find the parameters of Salesforce Scan Modules".

You can customize the scan result via optional settings Scanner include classic objects and Scanner include lightning objects.

If you want to record custom layout pages with the Salesforce Scan, you need a customization tailored to this. Please contact your respective Tricentis sales person for more information on customizations.

Prerequisites

To use the Salesforce Scan, you must fulfill the following requirements:

  • You must have valid Salesforce credentials.

  • You must have Administrative Permissions to read and access metadata API calls from the Salesforce SOAP API.

    We recommend that you set API Enabled and Modify All Data. If this isn't possible, use API Enabled, View Roles and Role Hierarchy, and View Setup and Configuration. This ensures support for ApiKeys when you scan your Salesforce application with Salesforce Scan or XScan or run your tests.

  • We recommend that you enable Customize Application - this helps Salesforce Scan fetching customized Modules.

  • The computer on which you run Tricentis Tosca must be within the trusted IP range. If it isn't, you need a valid Salesforce security token.

For the best results, Tricentis recommends that you use an administrator profile for the Salesforce Scan. An administrator profile provides the following advantages:

  • Gives you the access to a superset of Modules that you need to start building your tests.

  • Allows you to verify data security across Profile and Permission set subsets, for example, you can validate that a user cannot see a field.

  • Ensures a high level of Module reusability across the Org.

If you use a non-administrator profile, you can only retrieve Modules that you have access to. This can result in missing fields and tabs that are necessary to complete the test cases.

If you've enabled WebDriver, you can only scan your Salesforce application with XScan.

Scan Salesforce applications with the Salesforce Scan

To perform the scan, follow the steps below:

  1. In Tosca Commander, go to the Modules menu and click Scan->More->Salesforce Scan.

    Alternatively, right-click the Modules folder and select Scan->More->Salesforce Scan from the context menu or press Ctrl + Shift + S.

  1. In the Salesforce Credentials window, enter the following information:

Field

Description

User

Enter your Salesforce username.

Password

Enter your Salesforce password.

Security token (optional)

Enter your Salesforce security token.

This parameter is optional if your computer is within the trusted IP range.

Environment

Select one of these values depending on which environment you want to scan:

  • Production: scan live production applications.

  • Sandbox: use for testing and development purposes.

  • Custom Domain: scan a domain you've set up. Note that this environment is available only if you've previously configured a custom domain.

Enter Salesforce credentials

Alternatively, you can use the keyboard shortcuts to navigate and select options in the Salesforce Credentials and Select Modules windows.

  1. Click OK.

  2. In the Select Modules window, select the Salesforce objects that you want to include in your scan.

Select Modules to scan

  1. Click Scan.

The Salesforce Engine 3.0 performs the following actions:

  • It connects to your Salesforce application via the Salesforce SOAP API.

  • It scans your applications and builds the layout for the Module structures.

  • It creates Modules for all Salesforce controls that can be accessed via the API.

  • It saves the newly created Modules in the Modules folder.

As a result, you can use these Modules in your TestCases.

If you want to automatically sign into your Salesforce instance during testing, create a TestStep from the Login I Salesforce Module (use this Module to log in to your Salesforce site).

If you want to navigate your Salesforce instance during testing, create a TestStep from the Navigation I Salesforce->App Launcher I Lightning Modules.

If you want to easily navigate to pages and screens in your Salesforce instance without clicking, create a TestStep from the Navigation I Salesforce->Rapid Navigation Module.

If you want to automatically sign out of your Salesforce instance during testing, create a TestStep from the Logout I Salesforce Module. This feature is only available for Salesforce Lightning Experience.

Keyboard shortcuts

You can use the following keyboard shortcuts to find your way around active Salesforce Scan windows more quickly and easily:

Action

Shortcut

Close active window

Esc

Navigate between controls

Tab

Navigate within a control

Arrow keys

Open tooltip

Enter

Select checkbox

Space

Scan customized layouts in Salesforce applications

If you scan a customized layout in your Salesforce application with Salesforce Scan, such as Related Record in the Details page, the Container property of Related Record results in a custom value. Custom values don't allow to uniquely identify Salesforce controls. This means the Modules you create from this scan may cause your test executions to fail.

Consequently, we recommend you use XScan to uniquely identify the controls.

ApiKey and Container property of a customized layout in the Salesforce application

If you choose to scan your customized layouts with Salesforce Scan anyway, ensure you follow these steps before you start testing:

  1. Navigate to the Modules tab in Tosca and create a new folder.

  2. Add to the new folder all the modules you need for testing.

  3. Change the Container property value to match the name of the Module.

    If you are using the ApiKey property to uniquely identify your Salesforce controls, you can remove the Container property.

Container property of a customized layout in the Salesforce application

Navigate between pages and screens in Salesforce applications

The Module Rapid Navigation allows you to easily switch between pages and screens in your Salesforce application—without having to click through. This saves you time and effort and enables you creating more simple tests and having faster test results.

To create the Module, make sure to select Navigation Items from the Select Modules window during the Salesforce Scan. The scan then adds the Module under Navigation I Salesforce->Rapid Navigation.

The Rapid Navigation Module has the following ModuleAttributes:

ModuleAttribute

Description

Switch to Layout

Enables switching between Salesforce Lightning and Salesforce Classic layout. This ModuleAttribute is optional. If you leave the value empty, Tricentis Tosca uses the Salesforce Lightning layout. You can also enter the value manually.

Switch to App

Enables switching between pages. Select the name of the page. This ModuleAttribute is optional. You can also enter the value manually.

Switch to Tab

Enables switching between tabs. Select the name of the tab. This ModuleAttribute is optional. You can also enter the value manually.

When using the Rapid Navigation Module, keep the following things in mind:

  • If you use the ModuleAttribute Switch to Tab, in case you scan the Value Range in one language and switch to another language for test execution, the tab is not found as the value doesn't exist in the Value Range. You can still insert the name of the tab manually.

  • If you use the ModuleAttribute Switch to App, you need to rescan your Module every time a new application is added to your Salesforce instance to fetch the app name and app ID for the Value column.

With this example TestCase, you perform the following actions:

  • Switch to the layout Lightning.

  • Switch to the page Sales Console.

  • Switch to the tab Accounts.

TestCase with the Rapid Navigation Module

Salesforce Scan: Special controls

You can use all Salesforce Engine 3.0 controls with Salesforce Scan.

Link type controls in the read only Details view appear as both links and labels for compatibility reasons. Tricentis recommends that you use the labels to navigate the links. To do so, use the click operation {CLICK} on the labels.

Salesforce Modules

Unlike for standard link type controls, the AssociatedLabel value of custom links is the link itself, not the label.