Skip to main content
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 6 years 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?