Skip to main content

Unit Test

The Unit Test CodeGPT feature empowers you to generate unit tests for your code quickly. Selecting specific code segments can prompt CodeGPT to create a corresponding unit test, enhancing code reliability and quality.

How to Use:

CodeGPT: Unit Test CodeGPT

To use this feature, log in with your CodeGPT account, and you will have limited daily free interactions. You can subscribe to one of our plans to get many more interactions and access the selected AI models without worrying about creating API keys or accounts with each provider (we make it easy for you!). In case you want to use CodeGPT for free, you must add your own API key from the desired provider (e.g., Anthropic, OpenAI) and you will pay for the consumption directly to them.

  • Select the Code: Highlight the code snippet
  • Write the / slash and, select Unit Test, press Enter to send the request

Example

Select the code, right-click, then select Unit Test CodeGPT

CodeGPT: Unit Test CodeGPT