Documentation

Looking for something in particular?

Salesforce Lightning Testing

Automation’s test cases are designed to run equally well in Classic and the Lightning Experience.

Using Automation’s integration to Salesforce metadata, it is possible to build a test case in Classic and run it in Lightning, or build a test case in Lightning and run it in Classic. This is useful for organizations planning an upgrade path to Lightning, as running your Classic test cases in Lightning Mode and reviewing their execution can help assess your organization’s readiness for Lightning.

Look at our Lightning Testing module for a full introduction to testing in Lightning. This downloadable PDF guide is intended to teach you some techniques for testing in Lightning and introduce some of the differences you should be aware of.

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 usual using the Test Builder, automatically identifying 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 such as an If step to accommodate them within the same test case.

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

Salesforce Lightning Design System (SLDS) Support


As of Version 1.9, Provar has enhanced support for testing Visualforce pages, Custom Lightning Components, or any other Salesforce page that uses the Salesforce Lightning Design System (SLDS). This is done by providing a new By SLDS Label locator for the page fields.

The Salesforce Lightning Design System enables you to build rich enterprise experiences and custom applications with the patterns and established best practices native to Salesforce.

Salesforce provides a standard mechanism for how the elements need to be added in a form for the Lightning Design System. These apply to Visualforce or any other Salesforce page in Classic and Lightning Experience.

The ‘By Label’ in Provar has been enhanced to support this design system. When testing a Salesforce page developed within SLDS guidelines, the Test Builder will suggest the new By SLDS Label when mapping the page’s fields. These will work in both Read and Edit modes.

When added in a Page Object, it will appear as follows:

@FindByLabel(label="Input Label", labelType=LabelType.SalesforceLightningDesignSystem)

public WebElement inputElement;
Review Provar on G2
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top