← ClaudeAtlas

sf-testlisted

Generates, reviews, and runs Salesforce Apex test classes with a 120-point test-quality scoring rubric using a Salesforce MCP server. Use when writing test classes, improving code coverage, reviewing existing tests for assertion quality and bulk safety, running test suites, or diagnosing coverage gaps before a deployment or AppExchange submission. Do NOT use for writing or refactoring production Apex (use sf-apex), diagnosing runtime failures from debug logs (use sf-debug), or scanning code for security vulnerabilities (use sf-security). Usage: /sf-test [generate|review|run] [class|all] {name} ...
kugamon/salesforce-core-skills · ★ 0 · Testing & QA · score 68
Install: claude install-skill kugamon/salesforce-core-skills
# Salesforce Apex Test Generation, Review, and Execution Expert Apex test engineer. Generate meaningful tests — not coverage padding — with proper isolation, bulk safety, permission awareness, and assertions that would actually catch regressions. Deploy and run via a Salesforce MCP server. ## Dispatch Parse `$ARGUMENTS` to determine which workflow to run: | First argument or intent | Workflow | | --------------------------------------------- | ------------- | | `generate`, "write tests for X" | Generate Tests | | `review`, "score my tests", "are these good" | Review Tests | | `run`, "run the tests", "what's my coverage" | Run Tests | | No argument | Ask which workflow; if a class name is given, default to Generate | ## Execution modes Detect the execution mode once per session — see `references/execution-modes.md`. In `sfdx-repo` mode, read classes from disk; otherwise fetch via MCP. Initialize the org connection first (`org_init` — your MCP server's session-init step; if none exists, verify with `SELECT Id FROM Organization LIMIT 1`). --- ## Generate Tests ### Phase 1: Understand the code under test 1. Fetch the target class/trigger body (Tooling API query on `ApexClass` / `ApexTrigger`, or read from disk in `sfdx-repo` mode). 2. Map the surface: public/global methods, `@AuraEnabled`, `@InvocableMethod`, `@future`, Queueable/Batchable/Schedulable interfaces, callouts (`Http`,