Use the Salesforce Scan

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

  • Use XScan.

  • 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. 

    For detailed information on permissions, see the Salesforce documentation (opens in a new tab).

  • 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.

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 Production or Test depending on which environment you want to scan.

Enter Salesforce credentials

  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 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.

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

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.