Salesforce Lightning Testing

Introduction

Provar is capable of building and running Test Cases in the new Lightning UI as well as in the Classic UI. The same Test Cases can be reused across both UIs, reducing complexity and maintenance requirements.

Refer to our Features page for an introduction to Provar’s Lightning features.

Setup

To execute Test Cases in Lightning, specify this against the Test Connection or an individual Test Case. After this, UI fields can be mapped as normal using the Test Builder, which will automatically identify fields the same way in Lightning UI as in the Classic UI. Page Objects are not required.

If functional behavior differs between Lightning and Classic, you can use logical conditions to accommodate them within the same Test Case.

Setting Lightning as the Default UI

If you want to set Lightning as the default UI for a given Connection, specify this against the Connection. While adding a Connection, tick the checkbox ‘Enable Lightning Mode’ under Basic Settings:

This should be left unticked if Classic should instead be the default.

Note: If you already have a Connection that does not have this option ticked, you can edit the existing Connection to enable this option. Once this change is saved, there will be a pause while the metadata is refreshed. It is recommended to wait for this to complete before starting work on Test Cases.

Running an individual Test Case in Lightning

You can set an individual Test Case to run in Lighting even if Lightning is not enabled for a Connection.

To do this, open your Test Case and click into the Salesforce Connect Test Step. Locate the ‘Lightning Mode Override’ dropdown within Advanced Settings, and set this to ‘Enable’:

Using ‘Enable’ will launch this Test Case in Lightning mode regardless of the mode specified on the Connection.

Conversely, if a Connection is enabled for Lightning, but you want to run a Test Case in Classic mode, set the ‘Lightning Mode Override’ option to ‘Disable’:

Then save the Test Case.

2017-05-12T11:34:51+00:00

Leave A Comment