What problem does it solve? Running Apex tests, interpreting failures, and reaching required code coverage thresholds in Salesforce orgs is slow and error-prone when done manually. This Skill automates test execution through the sf CLI, parses results and coverage reports, diagnoses root causes of failures, and drives a disciplined test-fix loop until tests pass. ## Core Features & Use Cases - Test Execution & Coverage Analysis: Run single classes, specific methods, suites, or all local tests with sf apex run test, then parse JSON results for pass/fail summaries and per-class coverage percentages. - Failure Diagnosis & Auto-Fix Loop: Classify failures (AssertException, NullPointerException, DmlException, LimitException) and delegate code fixes to sf-apex, re-running tests until passing or max iterations. - Testing Patterns & Mocking Guidance: Reference guides for HttpCalloutMock, DML mocking, StubProvider, test data factories, bulk testing with 251+ records, and performance optimization. - Use Case: A developer asks to run all local tests with coverage on a sandbox; the Skill executes the run, reports 82% coverage with two NullPointerException failures, identifies missing null checks, applies fixes, and re-runs the failing methods to confirm green results. ## Quick Start Ask the agent to run all local Apex tests with code coverage against your target org alias and report failures with suggested fixes.