
Description
platform-apex-test-generate is an agent skill from the Salesforce sf-skills collection, listed on skills.sh. It guides an AI agent in generating Apex test classes for Salesforce and running a disciplined loop of test fixes with coverage analysis. Its rules ask for one behaviour per test method, separate positive, negative and bulk tests, and bulk data of 251 or more records to cross the 200-record trigger batch boundary. Test data is built through a TestDataFactory class rather than inline in test setup, and assertions use the Assert class with exact expected values. External calls are mocked with HttpCalloutMock, and SOSL results with Test.setFixedSearchResults. The skill also covers wrapping the code under test in Test.startTest and Test.stopTest, and it explains how batch Apex tests need the batch size set to at least the number of test records. It is free to install and works with agents that read SKILL.md files.…
Highlights
- Generates Apex test classes with TestDataFactory
- Bulk tests with 251 or more records
- Assert class and meaningful, exact assertions
- Mocking for callouts and SOSL searches
- Coverage analysis and test-fix loops
Ratings & Reviews
No ratings yet
Be the first to rate platform-apex-test-generate.
People also visit

platform-apex-generate
Primary Apex authoring skill for class generation, refactoring, and review
platform-apex-test-generate FAQ
What does the platform-apex-test-generate skill do?
It helps an AI agent write Apex test classes, check them, and fix failing tests while analysing coverage.
How do I install it?
Run: npx skills add https://github.com/forcedotcom/sf-skills --skill platform-apex-test-generate
Does it cover bulk testing?
Yes. It asks for bulk tests with 251 or more records, and explains the batch size rule for Batch Apex tests.
Which assertion style does it use?
The Assert class only, such as Assert.areEqual and Assert.isTrue, and not the legacy System.assert methods.
Is it free?
Yes. The listing shows it as free.
Has it been checked for security?
skills.sh lists three audits: Gen Agent Trust Hub Pass, Socket Pass and Snyk Pass.
What are the best platform-apex-test-generate alternatives?
Popular alternatives to platform-apex-test-generate include generating-apex-test, platform-apex-test-run and running-apex-tests. See all platform-apex-test-generate alternatives



