thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Business Platforms & EA · Foundational

Apex Test Class

Class annotated @isTest containing test methods that verify Apex behavior and provide code coverage.

Definition

Test classes create their own data, run in isolation from org data by default, and roll back changes. Assertions validate outcomes. Test classes do not count against the org's Apex code size limit.

Example

@isTest static void createsInvoice() { ... Assert.areEqual(1, [SELECT COUNT() FROM Invoice__c]); }

Exam tip

Tests should assert results; coverage without assertions is poor practice and often the wrong answer.

Related terms