
Generating Apex Test
This walks you through writing Apex test classes the right way: one behavior per test method, bulkified with 251+ records to cross trigger batch boundaries, strict TestDataFactory patterns for all setup data, and proper assertion discipline using the Assert class with exact expected values. It enforces test-fix loops with coverage analysis and knows when to hand production code issues off to the generating-apex skill. The guidance is opinionated in the best way, like banning inline test data and range assertions when values are deterministic. Useful when you're either building new test classes from scratch or debugging coverage gaps and flaky tests that need systematic cleanup.
- skills.sh installs
- 1.6K
- GitHub stars
- 705
- last updated
- Jul 14, 2026
Install
$ npx -y skills add forcedotcom/afv-library --skill generating-apex-test --agent claude-codeInstalls into .claude/skills of the current project.
Files
This walks you through writing Apex test classes the right way: one behavior per test method, bulkified with 251+ records to cross trigger batch boundaries, strict TestDataFactory patterns for all setup data, and proper assertion discipline using the Assert class with exact expected values. It enforces test-fix loops with coverage analysis and knows when to hand production code issues off to the generating-apex skill. The guidance is opinionated in the best way, like banning inline test data and range assertions when values are deterministic. Useful when you're either building new test classes from scratch or debugging coverage gaps and flaky tests that need systematic cleanup.
Browse the repository on GitHubSponsors
Details
- Repository
- github.com/forcedotcom/afv-library
- Category
- Testing & QA
- First seen
- May 16, 2026
More from forcedotcom/afv-library
All 58- Generating Custom Field1.6K
- Generating Custom Object1.6K
- Generating Flow1.6K
- Generating Permission Set1.6K
- Building Ui Bundle App1.5K
- Building Ui Bundle Frontend1.5K
- Deploying Ui Bundle1.5K
- Developing Agentforce1.5K
- Generating Custom Application1.5K
- Generating Custom Lightning Type1.5K
- Generating Custom Tab1.5K
- Generating Flexipage1.5K
- Generating Lightning App1.5K
- Generating List View1.5K
- Generating Ui Bundle Features1.5K
- Generating Ui Bundle Metadata1.5K
- Generating Ui Bundle Site1.5K
- Generating Validation Rule1.5K
- Implementing Ui Bundle Agentforce Conversation Client1.5K
- Implementing Ui Bundle File Upload1.5K
- Observing Agentforce1.5K
- Searching Media1.5K
- Switching Org1.5K
- Testing Agentforce1.5K