platform-apex-test-run

Run Apex tests via Salesforce CLI with coverage and failure analysis.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/padjei/SF_Agents --skill platform-apex-test-run-padjei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: platform-apex-test-run
Source: https://github.com/padjei/SF_Agents/tree/main/.claude/skills/platform-apex-test-run
Command: npx skills add https://github.com/padjei/SF_Agents --skill platform-apex-test-run-padjei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sf-cli, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the execution of Apex tests, provides code coverage analysis, and includes an agentic test-fix loop to automatically fix failing tests, saving time and improving code quality.

Core Features & Use Cases

  • Test Execution: Run Apex tests via sf CLI with coverage analysis.
  • Coverage Analysis: Identify untested code paths and analyze test coverage.
  • Failure Analysis: Parse failures, identify root causes, and suggest fixes.
  • Test-Fix Loop: Automatically fix failing tests and re-run them until all tests pass.
  • Use Case: Ideal for developers and QA engineers who need to ensure their Apex code is thoroughly tested and maintainable.

Quick Start

Run tests and show coverage report for org 'dev' with:

Skill: platform-apex-test-run
Request: "Run all tests and show coverage report for org dev"

Frequently Asked Questions about platform-apex-test-run

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

FAQPage Schema
How do I run Apex tests and check code coverage using sf CLI?

You can run Apex tests and check code coverage by executing test suites via sf CLI to generate a detailed coverage report. This automates test execution and identifies untested code paths for Salesforce development workflows.

Can I automatically fix failing Apex tests during execution?

Yes, you can automatically fix failing Apex tests using an agentic test-fix loop. It parses test failures, identifies root causes, applies fixes, and re-runs the tests until all tests pass successfully.

Do I need Salesforce CLI to run Apex test execution and coverage analysis?

Yes, you need Salesforce CLI installed and target org access to run Apex test execution and coverage analysis. These prerequisites are required to execute tests and validate code paths within your Salesforce environment.

What is an agentic test-fix loop for Salesforce code?

An agentic test-fix loop for Salesforce code automatically resolves failing Apex tests by parsing failures, identifying root causes, and applying fixes. It iteratively re-runs tests until coverage and execution pass.

Why are my Apex tests failing and how do I analyze the root cause?

If your Apex tests are failing, you can analyze the root cause by parsing failure outputs from the test execution. This identifies specific failure points and suggests fixes to resolve issues in your Salesforce code.