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:

  • Select CodeGPT as Provider and Model

    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. To learn how to do this, please refer to the following link.

  • Select the Code: Highlight the code snippet

  • Right-click on the selected code, then select CodeGPT: Unit Test CodeGPT

Example

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

CodeGPT: Unit Test CodeGPT