apex-test-class
Installation
SKILL.md
Apex Test Class Skill
Core Principles
- Bulkify tests - Always test with 200+ records to catch governor limit issues
- Isolate test data - Use
@TestSetupand TestDataFactory; never rely on org data - Assert meaningfully - Test behavior, not just coverage; include failure messages
- Mock external dependencies - Use
HttpCalloutMock,Test.setMock()for integrations - Test negative paths - Validate error handling, not just happy paths
Test Class Structure
@IsTest
private class MyServiceTest {