What problem does it solve? Writing reliable Apex test classes is time-consuming and error-prone: developers must handle bulk data setup, governor limits, async execution, callout mocking, and coverage thresholds while avoiding brittle assertions. This Skill automates the creation of production-ready Apex test classes and runs disciplined test-fix loops until tests pass and coverage targets are met. ## Core Features & Use Cases - Test Class Generation: Creates {ClassName}Test.cls plus its .cls-meta.xml file using Given/When/Then structure, Assert class assertions, and TestDataFactory-based @TestSetup methods. - Bulk and Async Testing: Enforces 251+ record bulk tests, correct batch sizing, and proper Test.startTest()/Test.stopTest() wrapping for batch, queueable, future, and scheduled jobs. - Mocking Strategies: Provides HttpCalloutMock, SOSL fixed search results, DML injection, and System.StubProvider patterns for isolating external boundaries. - Test-Fix Loop: Runs sf apex run test commands, analyzes failures and coverage, and iterates fixes (max 3 iterations) with delegation of production code issues. - Use Case: After writing a new Apex service class, ask the AI to generate its test class — it produces the test file, metadata file, a TestDataFactory if missing, runs the tests against your org, and fixes failures until 90%+ coverage is reached. ## Quick Start Generate an Apex test class with full coverage for MyService.cls and run it against my dev org.