Skip to main content

How to Edit the Minimum Number of Assertions in Code Reviews

Too few assertions weaken tests, risking undetected logic flaws later.

Written by David Martin
Updated this week

Overview

This rule flags Apex test methods that contain too few assertions. Tests should include not only assertions, but assertions that meaningfully validate behavior.

Code Reviews allow you to configure the required number of assertions to suit your team’s standards.

To modify the threshold that triggers this rule, open the Resilient Policy, select the pencil icon, locate the Insufficient number of Assertions rule, and select the pencil icon again to update the minimum required number of assertions.

Did this answer your question?