Hitting 75 percent coverage is the floor; treating it as a target is the start of test debt. Mature teams aim higher and pair coverage with assertion-quality reviews.
- Write test methods alongside production code
Every new class or trigger gets a corresponding test class. Treat tests as part of the implementation, not an afterthought.
- Use meaningful assertions
System.assertEquals, System.assertNotEquals, System.assert with explicit expected values. Tests without assertions raise coverage without raising quality.
- Run tests in CI on every change
Configure CI/CD to run Apex tests on every pull request. Block merges that drop coverage below the team's target (usually 85 to 95 percent).
- Monitor coverage over time
Query ApexCodeCoverageAggregate weekly. Build a dashboard showing trend; declining coverage is a signal to address before the production deploy gate enforces it.
- Investigate uncovered code paths
The Code Coverage page highlights uncovered lines. Investigate them; if production code is genuinely unreachable, simplify; if it is reachable, write the missing test.
- 75 percent is a floor, not a target. Tests at 75 percent without assertions provide no real quality assurance.
- Coverage that drops slowly is invisible until the deploy gate fails. Monitor trend, not just point-in-time numbers.
- Managed package classes have their own coverage; subscribers cannot improve it.
- Tests that only exercise code without asserting outcomes inflate coverage without preventing defects. Pair coverage with assertion reviews.