sf-apex-testing
CommunityWrite reliable Apex tests and boost coverage.
Authorjiten-singh-shahi
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill helps Salesforce developers create well-structured Apex unit tests that increase code coverage, catch governor limit issues, and reduce deployment failures due to insufficient tests.
Core Features & Use Cases
- Test structure & naming: Enforces Arrange-Act-Assert patterns and standardized test method names for readability and maintainability.
- TestDataFactory & TestSetup: Promotes centralized factory classes and TestSetup usage to produce consistent data and isolated transactions across tests.
- Governor limit and async testing: Covers bulk-trigger scenarios, Queueable/@future execution, and use of Test.startTest/Test.stopTest to validate limits and asynchronous behavior.
- Mocks and stubs: Shows HttpCalloutMock, multi-callout mock patterns, and System.createStub usage for dependency injection and deterministic tests.
- Coverage strategy: Advises branch testing, use of @testFor and RunRelevantTests when available, and practical approaches to reach target coverage thresholds.
Quick Start
Ask the sf-apex-testing skill to audit a failing deployment and generate concrete test methods, factory patterns, and mock implementations to raise coverage and verify governor-limit behavior.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: sf-apex-testing Download link: https://github.com/jiten-singh-shahi/salesforce-claude-code/archive/main.zip#sf-apex-testing Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.