running-apex-tests

Run Apex tests in Salesforce and analyze code coverage.

Updated Jun 1, 2026
One-click install
npx skills add https://github.com/Collabalist/SFDC --skill running-apex-tests-collabalist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: running-apex-tests
Source: https://github.com/Collabalist/SFDC/tree/main/.agents/skills/running-apex-tests
Command: npx skills add https://github.com/Collabalist/SFDC --skill running-apex-tests-collabalist

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the process of running Apex tests, analyzing code coverage, and fixing failing tests, streamlining the testing workflow for Salesforce developers.

Core Features & Use Cases

  • Test Execution: Run Apex tests and analyze code coverage.
  • Coverage Analysis: Identify untested code paths and analyze coverage reports.
  • Failure Analysis: Parse failure messages and suggest fixes for common issues.
  • Agentic Test-Fix Loop: Automatically fix failing tests and re-run them.
  • Use Case: A Salesforce developer can use this Skill to automate the test process for their Apex code, reducing manual effort and ensuring comprehensive test coverage.

Quick Start

Skill: running-apex-tests Request: "Run all tests for org dev and fix failures automatically."

Frequently Asked Questions about running-apex-tests

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

FAQPage Schema
How do I automate Salesforce Apex test execution and coverage analysis?

You can automate Salesforce Apex test execution and coverage analysis by using a Skill that runs test classes, parses coverage reports, and identifies untested code paths automatically via the sf CLI.

Can I automatically fix failing Apex tests and re-run them in a loop?

Yes, an agentic test-fix loop can automatically fix failing Apex tests. The Skill parses failure messages, suggests fixes for common issues, and re-runs the tests automatically.

Do I need sf CLI to run Apex tests and analyze Salesforce code coverage?

Yes, you need the sf CLI installed and configured with Salesforce org access to run Apex tests and analyze code coverage using this automated workflow.

What is the best way to identify untested code paths in an Apex test class?

The best way to identify untested code paths in an Apex test class is to run automated coverage analysis, which parses Salesforce coverage reports to pinpoint gaps in your test execution.

Why do my Apex tests keep failing and how can I parse the failure messages?

Apex tests fail due to various issues, but you can parse failure messages automatically to diagnose them. The Skill analyzes failure messages and suggests fixes for common Apex test issues.