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;
- Provar Automation
- System Requirements
- Browser and Driver Recommendations
- Installing Provar Automation
- Updating Provar Automation
- Licensing Provar
- Granting Org Permissions to Provar Automation
- Optimizing Org and Connection Metadata Processing in Provar
- Using Provar Automation
- API Testing
- Behavior-Driven Development
- Consolidating Multiple Test Execution Reports
- Creating and Importing Projects
- Creating Test Cases
- Custom Table Mapping
- Functions
- Debugging Tests
- Defining a Namespace Prefix on a Connection
- Defining Proxy Settings
- Environment Management
- Exporting Test Cases into a PDF
- Exporting Test Projects
- Japanese Language Support
- Override Auto-Retry for Test Step
- Mapping and Executing the Lightning Article Editor in Provar
- Managing Test Steps
- Namespace Org Testing
- NitroX
- Provar Automation
- Provar Test Builder
- ProvarDX
- Refresh and Recompile
- Reintroduction of CLI License Check
- Reload Org Cache
- Reporting
- Running Tests
- Searching Provar with Find Usages
- Secrets Management and Encryption
- Setup and Teardown Test Cases
- Tags and Service Level Agreements (SLAs)
- Test Cycles
- Test Plans
- Testing Browser Options
- Tooltip Testing
- Using the Test Palette
- Using Custom APIs
- Callable Tests
- Data-Driven Testing
- Page Objects
- Block Locator Strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript Locator Support
- Label Locator Strategies
- Maintaining Page Objects
- Mapping Non-Salesforce fields
- Page Object Operations
- ProvarX™
- Refresh and Reselect Field Locators in Test Builder
- Using Java Method Annotations for Custom Objects
- Applications Testing
- Provar Manager
- How to Use Provar Manager
- Provar Manager Setup
- Provar Manager Integrations
- Release Management
- Test Management
- Test Operations
- Provar Manager and Provar Automation
- Setting Up a Connection to Provar Manager
- Object Mapping Between Automation and Manager
- How to Upload Test Plans, Test Plan Folders, Test Plan Instances, and Test Cases
- Provar Manager Filters
- Uploading Callable Test Cases in Provar Manager
- Uploading Test Steps in Provar Manager
- How to Know if a File in Automation is Linked in Test Manager
- Test Execution Reporting
- Metadata Coverage with Manager
- Provar Grid
- DevOps
- Introduction to Provar DevOps
- Introduction to Test Scheduling
- Apache Ant
- Configuration for Sending Emails via the Automation Command Line Interface
- Continuous Integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Automation secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset
- GitHub Actions
- Integrating GitHub Actions CI to Run Automation CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Version Control
- Masking Provar Credentials on CI
- Salesforce Testing
- Best Practices
- Salesforce Connection Best Practices
- Improve Your Metadata Performance
- Testing Best Practices
- Automation Planning
- Supported Testing Phases
- Provar Naming Standards
- Test Case Design
- Create records via API
- Avoid using static values
- Abort Unused Test Sessions/Runs
- Avoid Metadata performance issues
- Increase auto-retry waits for steps using a global variable
- Create different page objects for different pages
- The Best Ways to Change Callable Test Case Locations
- Working with the .testProject file and .secrets file
- Best practices for the .provarCaches folder
- Best practices for .pageObject files
- Troubleshooting
- How to Use Keytool Command for Importing Certificates
- Browsers
- Configurations and Permissions
- Connections
- DevOps
- Error Messages
- Provar Manager 3.0 Install Error Resolution
- Provar Manager Test Case Upload Resolution
- Administrator has Blocked Access to Client
- JavascriptException: Javascript Error
- macOS Big Sur Upgrade
- Resolving Failed to Create ChromeDriver Error
- Resolving Jenkins License Missing Error
- Resolving Metadata Timeout Errors
- Test Execution Fails – Firefox Not Installed
- Selenium 4 Upgrade
- Licensing, Installation and Firewalls
- Memory
- Test Builder and Test Cases
- Release Notes