13

Unit Testing

Unit testing is a key technique used by developers to maintain a healthy and robust code base. This approach allows developers to write smaller tests that invoke more varied permutations of a given method or a unit of code. Treating each method as a distinct testable piece of code means that not only is the current usage of that method safe from regression but also future usage is protected. This frees the developer to focus on other permutations, such as error scenarios and parameter values beyond those currently in use.

Unit testing is different from integration testing, where many method invocations are tested as a part of an overall business process. Both have a place on the Lightning Platform. In this chapter, we will explore ...

Get Salesforce Platform Enterprise Architecture - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.