Create Apex Test Class
sf_create_apex_test_classCreate and deploy Apex test classes with @isTest annotation. Optionally run tests immediately to verify coverage and support production deployments.
Instructions
Creates and deploys an Apex Test Class (annotated with @isTest). Provide the full test class source code. Optionally run the tests immediately after deployment. Test classes are required for Salesforce deployments to production (minimum 75% code coverage). Use for unit testing Apex classes, triggers, and business logic.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| classBody | Yes | Full test class source code including @isTest annotation and class declaration | |
| className | Yes | Test class name, e.g. 'AccountServiceTest' | |
| apiVersion | No | API version for this test class | 66.0 |
| runAfterDeploy | No | Immediately run the tests after deploying |