Creating a Salesforce Lightning test
You can create tests for Salesforce Lightning applications to ensure that they function correctly.
Before you begin
You must have completed the following tasks:
- Read and completed the tasks mentioned in Prerequisites for creating tests and Configuring applications for tests if they apply to the test that you want to create.
- Read and understood the Recording a Web UI test section for recording tests in different browsers.
- Read and understood the Salesforce Lightning tests section to know about the supported elements and limitations.
Procedure
-
In the UI Test perspective, click .
Alternatively, on the toolbar, click the New Test From Recording icon
.The New Test From Recording wizard is displayed.
- Click Create a test from a new recording in the Recording Session screen.
- Select Web UI Test.
- Click Recording Encryption Level, and then select the encryption level, if you want to encrypt sensitive data in the application.
-
Click Next.
The Select Location page is displayed.
- Click to select a folder from the parent folder list.
- Type a name for the test.
-
Click Next.
The Select Client Application page is displayed.
-
Select a browser, and then click Next.
The Recorder Settings page is displayed.
- Select the recording preferences as required.
-
Click Finish.
The Welcome page is displayed with the following details:
- The version of the web browser.
- The web applications that you added for testing.
- Click the link of the configured Salesforce application to test from the Configured Application list.
- Complete the user tasks in the Salesforce application.
-
Stop the recorder by closing the Salesforce application under test or by
clicking the Stop icon
in the Recording Control view.
The Test Generation dialog is displayed. -
Click Open Test to view the test, or click
Close to close the dialog.
A confirmation message about the data correlation is displayed if you clicked the Open Test option.
- Click Yes to view the correlated data, or click No to close the dialog.