sf-testing

Execute Salesforce CLI Apex tests and analyze failures and coverage.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/dcinzona/folios --skill sf-testing-dcinzona
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-testing
Source: https://github.com/dcinzona/folios/tree/main/.agents/skills/sf-testing
Command: npx skills add https://github.com/dcinzona/folios --skill sf-testing-dcinzona

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Provides fast, structured execution and analysis of Apex tests so developers can quickly find root causes of test failures, measure code coverage, and reduce the manual work of debugging Salesforce test regressions.

Core Features & Use Cases

  • Test Execution: Run Apex tests via the Salesforce CLI with options for single classes, specific methods, or full local test suites and capture JSON, JUnit, or human-readable output.
  • Coverage & Failure Analysis: Parse test and coverage output to highlight low-coverage classes, uncovered lines, and failing assertions with root-cause guidance.
  • Agentic Test-Fix Loop: Suggest or apply automated fixes, coordinate with sf-apex for code changes, and re-run targeted tests until passing; includes a 120-point scoring guide for test quality.
  • Use Case: Debug a failing AccountServiceTest, identify a NullPointerException root cause, generate a minimal fix, and re-run the failing test to validate the repair.

Quick Start

Run the sf-testing skill to execute a specific test class in a target org alias and return a pass/fail summary, coverage percent, root-cause analysis, and suggested next steps.

Frequently Asked Questions about sf-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug failing Apex tests and identify the root cause in a Salesforce DX project?

To debug failing Apex tests, execute specific test classes via the Salesforce CLI and parse the JSON or JUnit output. The tool analyzes failures to highlight root causes, such as a NullPointerException, and suggests minimal fixes to validate.

How do I check Apex code coverage and enforce thresholds using sf CLI?

You can check Apex code coverage by running tests and parsing the sf CLI output. The process highlights low-coverage classes and uncovered lines, allowing you to enforce coverage thresholds within your Salesforce DX project before deployment.

Can I automate fixing failing Apex test regressions in a continuous loop?

Yes, you can automate fixing Apex test regressions using an agentic test-fix loop. The process suggests or applies automated fixes, coordinates with sf-apex for code changes, and re-runs targeted tests until passing.

What is the best way to run specific Apex test methods in a target org alias?

The best way to run specific Apex test methods is by executing them through the Salesforce CLI with a target org alias. The tool captures the output in JSON, human-readable, or JUnit formats to provide a pass/fail summary and next steps.

Does Salesforce test automation work with JUnit output format for CI pipelines?

Yes, Salesforce test automation works with JUnit output format. The tool can run Apex tests and capture results in JUnit format, which can be parsed to identify failing assertions and integrate with CI pipelines.