sf-testing

Run Apex tests via sf CLI and analyze coverage.

6|Updated Dec 20, 2023
One-click install
npx skills add https://github.com/ronitnuguru/Package-Visualizer --skill sf-testing-ronitnuguru
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sf-testing
Source: https://github.com/ronitnuguru/Package-Visualizer/tree/main/.cursor/skills/sf-testing
Command: npx skills add https://github.com/ronitnuguru/Package-Visualizer --skill sf-testing-ronitnuguru

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Salesforce teams struggle with slow, error-prone Apex test cycles, limited coverage visibility, and manual, repetitive failure fixes.

Core Features & Use Cases

  • Test Execution: run Apex tests via sf CLI with code coverage to validate behavior.
  • Coverage Analysis: parse reports to identify untested paths and guide refactoring.
  • Agentic Test-Fix Loop: automatically diagnose failures, generate fixes, and re-run tests.
  • Test Data Factories & Patterns: leverage reusable data factories to create reliable test data.
  • Bulk Testing: validate large datasets (251+ records) to reveal governor-limit risks.
  • Documentation & Best Practices: access references and templates to improve testing discipline.

Quick Start

Run Apex tests with coverage and start the agentic fix loop in your Salesforce org.

Frequently Asked Questions about sf-testing

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

FAQPage Schema
How do I automate Apex test execution and failure diagnosis in CI workflows?▼

Automated Apex test execution runs via the sf CLI to validate behavior and analyze code coverage. An agentic test-fix loop automatically diagnoses failures, generates fixes, and re-runs tests across local and CI environments.

What is the best way to identify untested Apex paths and improve code coverage?▼

Apex code coverage analysis parses test reports to identify untested paths and guide refactoring. It applies a 120-point scoring framework to evaluate coverage and direct testing improvements for Salesforce developers.

Can I use mock patterns and data factories for reliable Apex test data generation?▼

Yes, reusable test data factories and DML mocking patterns create reliable test data. These templates ensure consistent, self-improving testing discipline while validating behavior across local and CI environments.

Does Salesforce bulk testing with 251+ records reveal governor-limit risks?▼

Bulk Apex testing validates large datasets of 251+ records to reveal governor-limit risks. Running these tests via the sf CLI exposes performance bottlenecks before deployment to production environments.

Why do my Apex tests fail repeatedly and require manual fixes?▼

Apex tests often fail repeatedly due to untested paths or data inconsistencies. An agentic test-fix loop automatically diagnoses failures, generates fixes, and re-runs tests to eliminate manual, repetitive failure resolution.