Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>gtest Template GeneratorNew to Visual Studio Code? Get it now.
gtest Template Generator

gtest Template Generator

Anusha

|
1,185 installs
| (0) | Free
Generate template for gtests easily
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Gtest template Generator

Overview

Write easy unit tests using this template generator.

Features

  1. Creates gtest template with all the boiler plate code with test suite created.
  2. Generate Mocks of classes and interfaces within seconds

Usage

  1. Select the method name for which you want to generate test template

  2. Right click and select Generate Gtest Template

  3. Choose path of the folder in which the test should be created.

  4. If test file does not exist, test file is created, or just appended.

  5. If you need to create the test file in some other location, go to Settings->Location.TestFile->Edit in settings.json->Add the path of appropriate location against your test file.

  6. Select the class or interface for which you want to generate mock

  7. Right click and select Generate mock

  8. Choose path of the file in which the test should be created(Precondition, .cpp file should be created beforehand).

Screenshot

image of commands

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