forcedotcom avatar

Platform Apex Test Generate

This generates Apex test classes following Salesforce best practices: one behavior per test method, 251+ record bulk testing to cross trigger boundaries, TestDataFactory patterns for isolated test data, and proper use of Test.startTest/stopTest pairs. It enforces the modern Assert class over legacy System.assert methods and includes disciplined test-fix loops with coverage analysis. The skill recognizes *Test.cls files and test-related workflows but deliberately hands off production Apex code to platform-apex-generate. Honest take: the one-behavior-per-method rule and mandatory separation of null versus empty input scenarios will generate more granular test classes than typical hand-rolled suites, which helps debugging but increases file count.

skills.sh installs
7.4K
GitHub stars
1.2K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

Files

Generating Apex Tests

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

Core Principles

Sponsors

Details

Repository
github.com/forcedotcom/sf-skills
Categories
Testing & QA, Debugging, Automation & Workflows
First seen
Jul 14, 2026

More from forcedotcom/sf-skills

All 158
1forcedotcom avatarplatform-apex-test-runforcedotcom/sf-skillsApex test execution, coverage analysis, and test-fix loops with 120-point scoring. Use when the user needs to run Apex tests, check code coverage, fix failing t7.2Kskills.sh installs
2pproenca avatarvitestpproenca/dot-skillsVitest testing framework patterns for test setup, async testing, mocking with vi.*, snapshots, and test performance (formerly test-vitest). This skill should be7.2Kskills.sh installs
3anthropics avatartesting-strategyanthropics/knowledge-work-pluginsDesign test strategies and test plans. Trigger with "how should we test", "test strategy for", "write tests for", "test plan", "what tests do we need", or when 6.7Kskills.sh installs
4analogjs avatarangular-testinganalogjs/angular-skillsWrite unit and integration tests for Angular v20+ applications using Vitest or Jasmine with TestBed and modern testing patterns. Use for testing components with6.6Kskills.sh installs
5affaan-m avatartdd-workflowaffaan-m/eccUse this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and6.4Kskills.sh installs
6testdino-hq avatarplaywright-skilltestdino-hq/playwright-skillBattle-tested Playwright patterns for writing, debugging, and scaling reliable test suites. Use when you need guidance for E2E, API, component, visual, accessib6.2Kskills.sh installs