forcedotcom avatar

Running Apex Tests

This is your disciplined test runner for Salesforce Apex. It handles the full cycle: scoping what to test, running sf apex run test with the right flags, parsing failures, analyzing coverage gaps, and looping back through fixes until you hit the threshold. The workflow is smart about starting narrow on single classes before widening to RunLocalTests, and it knows when to delegate actual code fixes to the generating-apex skill. The reference files give you real patterns for bulk tests with 251+ records, HttpCalloutMock templates, and DML mocking strategies. Honestly, the 120-point scoring rubric and structured output format make this feel more like a QA process than an ad-hoc test run, which is exactly what you want when coverage actually matters.

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

Install

$ npx -y skills add forcedotcom/sf-skills --skill running-apex-tests --agent claude-code

Installs into .claude/skills of the current project.

Files

This is your disciplined test runner for Salesforce Apex. It handles the full cycle: scoping what to test, running sf apex run test with the right flags, parsing failures, analyzing coverage gaps, and looping back through fixes until you hit the threshold. The workflow is smart about starting narrow on single classes before widening to RunLocalTests, and it knows when to delegate actual code fixes to the generating-apex skill. The reference files give you real patterns for bulk tests with 251+ records, HttpCalloutMock templates, and DML mocking strategies. Honestly, the 120-point scoring rubric and structured output format make this feel more like a QA process than an ad-hoc test run, which is exactly what you want when coverage actually matters.

Browse the repository on GitHub

Sponsors

Details

Repository
github.com/forcedotcom/sf-skills
Categories
Testing & QA, Documentation, AI & Agent Building, Debugging
First seen
Jun 3, 2026

More from forcedotcom/sf-skills

All 158
1nexu-io avataragent-browsernexu-io/open-designBrowser automation CLI for AI agents. Use when the user needs to inspect, test, or automate browser behavior: navigating pages, filling forms, clicking buttons,3Kskills.sh installs
2onmax avatarnuxt-modulesonmax/nuxt-skillsUse when creating Nuxt modules: (1) Published npm modules (@nuxtjs/, nuxt-), (2) Local project modules (modules/ directory), (3) Runtime extensions (components,2.9Kskills.sh installs
3phuryn avatarbrainstorm-experiments-existingphuryn/pm-skillsDesign experiments to test assumptions for an existing product — prototypes, A/B tests, spikes, and other low-effort validation methods. Use when validating ass2.9Kskills.sh installs
4phuryn avatardummy-datasetphuryn/pm-skillsGenerate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Use when creating test2.8Kskills.sh installs
5juliusbrussee avatargrill-mejuliusbrussee/skillsCalibrated grilling session for stress-testing a plan, design, idea, or decision. First assesses the user's topic knowledge, confidence, and desired pressure le2.8Kskills.sh installs
6juxt avatarpropagatejuxt/alliumGenerate tests from Allium specifications. Use when the user wants to propagate tests, generate test files from a spec, write tests for a specification, create 2.7Kskills.sh installs