Skip to content
forcedotcom avatar

Platform Apex Test Generate

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.

CCM score
73 of 100
skills.sh installs
7.7K
GitHub stars
1.2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • 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 platform-apex-generate) or Jest/LWC tests

Install

$ npx -y skills add forcedotcom/sf-skills --skill platform-apex-test-generate -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Generating Apex Tests

Generate production-ready Apex test classes and run disciplined test-fix loops with coverage analysis.

Core Principles

Details

Repository
github.com/forcedotcom/sf-skills
Category
Testing & QA
First seen
Jul 14, 2026

Questions

What does the platform-apex-test-generate skill do?

It generates and validates Apex test classes using TestDataFactory patterns, bulk testing with 251 or more records, mocking, and assertions. It also runs disciplined test-fix loops and coverage analysis for triggers, services, controllers, batch jobs and queueables. Use it when creating, fixing or improving Apex tests.

How do I install the platform-apex-test-generate skill?

Run npx -y skills add forcedotcom/sf-skills --skill platform-apex-test-generate -y in your project. That installs the skill so your agent can generate and fix Apex tests in the project.

Which category is platform-apex-test-generate in, and what sets it apart?

It sits in the Testing and QA category and ranks in the top 100 there. It covers Apex-specific test generation, while it does not handle production Apex code or Jest and LWC tests.

Does platform-apex-test-generate create test files for me?

Yes, for each test class it creates a Test.cls file and a matching cls-meta.xml file, and it adds a TestDataFactory class if the project has none. It follows Given/When/Then structure and the Assert class rules.

More from forcedotcom/sf-skills

All 78

Similar to Platform Apex Test Generate

More Testing & QA