Introducing unit testing

As we will discover throughout this chapter, unit testing helps to address the preceding challenges. When used in combination with integration tests, the resulting test suite creates a much stronger and more efficient set of Apex tests for your application.

Learning about and writing unit tests can often seem difficult because it requires you to learn other concepts, some of which determine how you write your application code. Things such as separation of concerns (SOC), dependency injection, mocking, and test-driven development are concepts you will come across when googling about unit tests. We will be looking into these throughout this chapter. Of course, you are already, by now, quite familiar with SOC and how ...

Get Salesforce Lightning Platform Enterprise Architecture - Third 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.