Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Test CopilotNew to Visual Studio Code? Get it now.
Test Copilot

Test Copilot

MSNWeather

|
409 installs
| (8) | Free
Auto unit test code generation with copilot
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

UT Gen Copilot

Generate unit tests for TypeScript using GPT

Configurations

GPT configs

Option 1: Use Github Copilot (RECOMMONED)

Install and setup Github Copilot, and allow our extensions to use Github copilot.

Option 2: Use your own model

Press Ctrl+, to open the settings page, search for utcop, and set the configurations.

We suggest setting up GPT authentication using a token API. We use the token API in the extension as described here: How to configure Azure OpenAI Service with Microsoft Entra ID authentication - Azure OpenAI | Microsoft Learn.

You can also use a GPT key for authentication.

The GPT key has a higher priority than the token API. If you want to use the token API, please delete the GPT key and restart VSCode.

Common configs

saveFailed

Default to false. Save the failed generation file, e.g. “foo.failed.spec.ts” to help check the cause of the failure.

packageRegex

If you set a regex, unmatched packages will be skipped.

createIndexSpec

Default to false.

Set to true to create an empty spec file for the files that only exported constants or types.

ignoreFuncs

List of functions to ignore.

mockDependencies

A map to set mock code for dependencies.

If you want to reset to default map, open settings.json and delete utCopilot.common.mockDependencies

Rules:

  1. foo to ignore function foo
  2. Foo.bar to ignore function bar in class Foo
  3. *.foo to ignore function foo in all classes
  4. Foo.* to ignore all functions in class Foo

Check debug log

Press Ctrl+~, switch to the OUTPUT tab, find UTCopilot

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