Skip to main content

Unit Test

Description

The Unit Test CodeGPT feature empowers you to quickly generate unit tests for your code. By selecting specific code segments, you 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

    If you lack API Key access to a provider other than CodeGPT, you can create an account and synchronize it with the extension. To learn how to do this, please refer to the following link. Keep in mind that having a CodeGPT account not only grants you access to certain OpenAI models but also provides access to CodeGPT Plus, an advanced generative AI model.

  • 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