platform-apex-test-generate

Generate and validate Apex test classes with Salesforce best practices.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the complexity and time-consuming nature of writing Apex test classes manually. It automates the creation and structuring of Apex test classes following Salesforce's best practices and standards.

Core Features & Use Cases

  • Automated Test Class Generation: Generates test classes with proper structure, naming conventions, and patterns.
  • Best Practices Implementation: Ensures the test classes follow best practices for bulk testing, mocking strategies, and assertion best practices.
  • Use Case: When you need to create a new Apex test class or improve test coverage for a complex Apex class.

Quick Start

Use the platform-apex-test-generate skill to generate a test class for your Apex class 'MyService' with generate_test_class MyService.

Frequently Asked Questions about platform-apex-test-generate

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

FAQPage Schema
What are the best practices for Apex test class generation in Salesforce?

Apex test class generation best practices include using TestDataFactory patterns, implementing bulk testing, applying mocking strategies, and following assertion best practices. This Skill automates structuring test classes to meet these Salesforce development standards.

How do I generate an Apex test class for a complex Apex service?

You can generate an Apex test class for a complex Apex service by invoking the generation command with your target class name. The Skill automates the creation of properly structured test classes with naming conventions, mocking, and bulk testing patterns.

How does bulk testing work when validating Apex test classes?

Bulk testing in Apex validates that your code handles multiple records efficiently without hitting governor limits. The Skill generates test classes incorporating bulk testing patterns to ensure your Apex code processes large data volumes correctly.

Can I use mocking strategies in Apex test class generation for external callouts?

Yes, the Skill generates test classes that implement mocking strategies for external callouts. It automates the inclusion of mocking patterns alongside assertion best practices to ensure comprehensive test coverage for complex Apex logic.

What's the best way to improve Salesforce Apex test coverage for existing classes?

The best way to improve Apex test coverage is to automate test class creation using disciplined test-fix loops. This Skill generates structured test classes following Salesforce best practices, including TestDataFactory patterns and assertions, to increase coverage efficiently.

Does automated Apex test generation work without manual assertion implementation?

Automated Apex test generation includes assertion best practices automatically. The Skill structures the generated test classes with proper assertions and mocking strategies, reducing manual implementation effort while maintaining Salesforce testing standards.