apex-test-class

Official

Automate robust Apex tests with bulk data and mocks.

Authorforcedotcom
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Apex test class scaffolding and patterns provide a standardized approach to writing thorough unit tests, enabling teams to generate bulk test data, isolate tests from org data, and validate behavior across triggers, services, controllers, batches, and integrations.

Core Features & Use Cases

  • Bulk test generation: use TestDataFactory patterns to create 200+ records for realistic governor-limit testing.
  • Data isolation and setup: leverage @TestSetup and TestDataFactory to keep tests deterministic.
  • Robust assertions & coverage: enforce meaningful assertions and test negative paths.
  • Mocking and async support: integrate HttpCalloutMock/Test.setMock and Test.startTest/Test.stopTest for callouts and asynchronous code.
  • Use Case: apply this skill when adding new tests, refactoring, or improving test patterns for triggers, services, controllers, batch jobs, queueables, and integrations.

Quick Start

Create a new Apex test class using the TestDataFactory patterns to bulk-generate 200+ records, then run tests to verify coverage and assertions.

Dependency Matrix

Required Modules

None required

Components

references

💻 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: apex-test-class
Download link: https://github.com/forcedotcom/afv-library/archive/main.zip#apex-test-class

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.