Use of @IsTest annotation

Keep your test cleaner using the @IsTest annotation, instead of using the deprecated testMethod keyword.

Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Rationale

The use of the testMethod keyword has been deprecated by Salesforce. Annotating test methods with @IsTest is the recommended approach.

Scope

  • Apex test classes

  • Apex test methods

Did this answer your question?