Skip to content
Kitbay

platform-apex-test-generate

Apache-2.0Updated on Nov 6, 20261,156GitHub stars

A Salesforce skill for writing and fixing Apex test classes.

What the skill teaches

A Salesforce skill for writing and fixing Apex test classes. The agent gathers context about the code under test, generates a test class using a test data factory, @TestSetup methods, bulk tests with 251 or more records, mocks for callouts and clear assertions, then runs the tests with sf apex run test and works through failures in a disciplined loop. It applies to code such as triggers, service classes, controllers, batch and queueable jobs, and callouts, and covers coverage analysis and common anti-patterns to avoid. Production Apex and Jest tests for Lightning Web Components are covered by other skills. It uses the sf CLI.

Capabilities

  • Generate Apex test classes with a test data factory
  • Write bulk and negative tests
  • Run Apex tests and read coverage
  • Fix failing Apex tests