Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Apex Test Class GeneratorNew to Visual Studio Code? Get it now.
Apex Test Class Generator

Apex Test Class Generator

Gokulakannan Shokkar

|
4 installs
| (0) | Free
Automatically generate the test class and mock data for salesforce apex
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

apex-test-class-generator

I build this vscode extension for myself to automatically generates Apex test classes with clean boilerplate code.

This extension helps reduce my repetitive work by reading an existing Apex class and creating a corresponding test class ending with Test.

Features

--> Generates an Apex test class annotated with @IsTest

--> Automatically appends Test to the original Apex class name

--> Example: AccountService → AccountServiceTest

--> Creates a @TestSetup method for test data initialization

--> Detects methods in the Apex class and generates a test method for each one

--> Adds a default test method if no methods are found

--> Can be triggered using:

  Command Palette → SFDX: Generate Apex Test Class

How To Use

  1. Open an Apex class file (.cls)

  2. Right-click inside the editor or on the file in the Explorer

  3. Select SFDX: Generate Apex Test Class

  4. A new test class file will be generated in the same folder

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft