Skip to main content

RoostGPT VS Code Plugin

The Roost GPT VS code plugin allows you to generate tests for your code using RoostGPT with just a click, straight from your VS Code workspace.

Installation:

In order to use the RoostGPT VS Code plugin, you must have VS Code ready and installed in your system, as well as any dependencies which are required to run your code, as RoostGPT will often run its generated test code in order to improve it.

You can download and install VS Code for your Operating system here.

After VS Code is Successfully installed in your system, you can go ahead and download the Roost GPT VS Code extension from the VS Code marketplace, just simply search for Roost GPT in the extension store. Alternatively, you can download and install the VS code extension from here.

image.png

Once the extension is installed, you are ready to generate tests for your code.

Configuration:

Once the extension has been successfully installed in your system, you can then proceed with configuring the extension to start generating tests. This involves providing information that is required for test generation. In order to configure the extension to use it, simply open the extension settings for Roost GPT, you can search for it in the extension store, or you can find it in the list of your installed extensions.

image.png

image.png

Once the extension settings are open, You will need to provide your Roost Token, you can get your Roost token from the profile section after logging into app.roost.ai

image.png

Don't have a Roost token, you can sign up for a free trial and try out RoostGPT for free, using your organization email here.

provide the extension with other required values according to your workspace and what kind of tests you want to generate, be sure to select the appropriate language, test type, and AI model, and provide your token for the AI model as well(your OpenAI API token or your vertex bearer token).

If you provide iteration value greater than 0 then it will run the the test case and pass the error occurred(if any) to the ai model then update the test case inside the same file and run again till the number of times of iteration and stop if it ran successfully in between.

NOTE that some values such as JIRA/Azure board details are required if you want to generate functional tests, you also need to set the board type to be the appropriate value as well. Similarly, If you want artillery tests using Swagger, then the swagger URL is required.

Test Generation:

After you have set the configuration values correctly for your workspace, you are ready to generate tests using Roost GPT, in order to generate tests for your current workspace, just simply go into the explorer badge and right-click on the directory/folder you want to generate the tests for and select "Generate tests using RoostGPT." This will generate tests for the files present in the selected workspace directory according to the extension configuration.

image.png

Note: if you right-click on a file instead of a directory and generate the tests, RoostGPT will generate tests for the file's parent directory.