generating-apex-test
generating apex test
What it does
- Resets governor limits so the test measures only the code under test
- Executes async operations synchronously (queueables, batch, future methods)
- Fires scheduled jobs immediately
- the target production class(es) under test
- existing test classes, test data factories, and setup helpers
- desired test scope (single class, specific methods, suite, or local tests)
- coverage threshold (75% minimum for deploy, 90%+ recommended)
Requirements & configuration
- 5. Repeat until all tests pass, iteration limit reached, or root cause requires design change
Configuration: WITH
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
generating-apex-test FAQ
What does the generating-apex-test skill do?
Generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking strategies, assertion best practices, and disciplined test-fix loops. Use this skill when creating new Apex test classes, improving test coverage, debugging and fixing failing Apex tests, running test execution and coverage analysis, or implementing testing patterns for triggers, services, controllers, batch jobs, queueables, and integrations. Triggers on *Test.cls, *_Test.cls files, sf apex run test workflows, coverage reports, test-fix loops. Do NOT trigger for production Apex code (use generating-apex) or Jest/LWC tests. Resets governor limits so the test measures only the code under test Executes async operations synchronously (queueables, batch, future methods)
What does generating-apex-test require?
5. Repeat until all tests pass, iteration limit reached, or root cause requires design change Configuration keys: WITH.
How do I install generating-apex-test?
Run: npx -y skills add https://github.com/forcedotcom/sf-skills --skill generating-apex-test --agent claude-code — the source lives at github.com/forcedotcom/sf-skills.
Maintain generating-apex-test?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[generating-apex-test on getagentictools](https://getagentictools.com/skills/forcedotcom-sf-skills-generating-apex-test?ref=badge) npx agentictools info skills/forcedotcom-sf-skills-generating-apex-test The second line is the CLI lookup for this page — handy in READMEs and docs.