forcedotcom avatar

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-code

Installs 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 GitHub

Sponsors

Details

Repository
github.com/forcedotcom/afv-library
Category
Testing & QA
First seen
May 16, 2026

More from forcedotcom/afv-library

All 58
1jaganpro avatarsf-testingjaganpro/sf-skillssf testing1.4Kskills.sh installs
2lobehub avatartestinglobehub/lobe-chattesting1.3Kskills.sh installs
3neolabhq avatartest-skillneolabhq/context-engineering-kitUse when creating or editing skills, before deployment, to verify they work under pressure and resist rationalization - applies RED-GREEN-REFACTOR cycle to proc1.2Kskills.sh installs
4ruvnet avataragent-tdd-london-swarmruvnet/rufloAgent skill for tdd-london-swarm - invoke with $agent-tdd-london-swarm1.1Kskills.sh installs
5ruvnet avataragent-test-long-runnerruvnet/rufloAgent skill for test-long-runner - invoke with $agent-test-long-runner1.1Kskills.sh installs
6sickn33 avatartest-driven-developmentsickn33/antigravity-awesome-skillstest driven development1.1Kskills.sh installs