Newer Version Available

This content describes an older version of this product. View Latest

Testing Components with Lightning Testing Service

Use Lightning Testing Service (LTS) to ensure your components perform as expected. LTS is a full suite of tools and services integrated with Salesforce DX to make testing easy.

Automated tests are the best way to achieve predictable, repeatable assessments of the quality of your custom code. Writing automated tests for your custom components gives you confidence that they work as designed, and allows you to evaluate the impact of changes, such as refactoring, or of new versions of Salesforce or third-party JavaScript libraries.

LTS supports testing with standard JavaScript test frameworks. It provides easy-to-use wrappers for using Jasmine and Mocha. If you prefer to use an alternative test framework, you can wrap it yourself.