All Apex Classes Should Have At Least One Test Class

< 1 min read

Impact area

Manageability

Severity

Medium

Affected element

Apex Class

Rule ID #

SF-NO-TEST-CLASS

Impact

Each Apex class must have its own test class. The name of the related Test class must be <Apex class name>Test or <Apex class name>_Test.
Unit testing can improve the quality of your codebase, making it more maintainable and less error-prone.

Remediation

Add at least an Apex test class per existing Apex class following previous name convention.

Time to fix

45 min

Updated on March 21, 2025
Table of contents
Was it helpful ?