All Apex classes should have at least one test class

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

What's here


Related content

PMD - Lightning rules




Last modified on Jan 26, 2023