Skip to content

Latest commit

 

History

History
166 lines (96 loc) · 7.95 KB

README.md

File metadata and controls

166 lines (96 loc) · 7.95 KB

CodiumAI - Meaningful tests for busy devs


CodiumAI analyzes your code and generates meaningful tests to catch bugs before you ship. With CodiumAI, you can easily and quickly create comprehensive test suites that help you ensure the reliability and correctness of your software. Supports Python, Javascript and Typescript.


How it works

Beta Version - Supported in VSCode version 1.70.0 and above

Features

🤖 Generates unit tests suite automatically

🔬 Analyzes your code

💡 Suggests code modifications to improve the performance and correctness of your code

💫 Finds potential bugs in your code and suggests ways to fix them

🚀 Helps you improve code quality

By creating comprehensive test suites, our tool helps you catch and fix bugs early, and ensures that your code is reliable and maintainable.


Supported languages


How to use CodiumAI?

Generate tests

Generate tests for a function or a class, using the Generate tests button above a function/class name, or using CodiumAI panel and choose the desired function/class:

Generate tests for code snippet, by selecting the code you want to test, right-click on it and choose CodiumAI - Generate Tests option:

Review the results

CodiumAI tab will present the test results - review the test names, objectives, types, and the test code:

Modify tests

Want to modify a single test code? Simply type the change you want inside the Suggest changes.. field, and TestGPT will modify the code based on your request:

Want to modify the objective of a single test? Edit the name or the objective of a single test, and click regenerate:

You can also just click the Reflect & Regenerate button, without changing the test description, and get an alternative code for this test:

You can manually edit the test within the paenl:

Want more tests? Click on Give me more tests at the bottom of the test suite:

Want to remove a test from your test suite? Click on the delete button on each test:

Run your tests and find possible bugs in your code

You can run the generated tests directly from the CodiumAI panel. Simply click Run All Tests button to run all the test, or Run button on each single test:

The test failed? See the log by clicking the failed button, and easily fix the test by clickeing Fix Test button:

When TestGPT identifies possible bug in your code, it alerts you and gives you relevant information on the bug and possible fix, click on Possible Code Bug to see the data:

Click Fix Code to get a possible fix to your bug:

After analyzing, click Review Fix button to see the code diff:

Review the suggested fix, and if you approve it, click Apply to my Code button merge it to your code:

Change test suite configurations

Improve and personalize your test suite by giving general instructions, examples of input and tests and select your preferred testing framework in the Configuration section:

Add your own test

Want to add a custom test that was not automatically generated? Click on New custom test button and write the test name and objective, and TestGPT model will generate the test code for you, based on your preferences:

Code analysis

Read your code analysis written by our TestGPT model, you can use it for documentation and to make sure your code is doing what it should. Click on the Code Analysis tab and find out:

Code suggestions

Our TestGPT model can find some insights about your code and suggests some modifications that you can apply to your code (to improve performance, correctness, and more). Click on the Code Suggestions tab and find out:

Choose the suggestion you want to apply, and merge them to your code:

Save your test suite

When you're happy with your generated test suite, you can click on Copy tests and copy the test suite code, or simply click on Open as a file and we will create a test file for you:


Tip 1: If you can't see the Generate Tests button you might have to set "editor.codeLens": true, in your VSCode configuration file.

Tip 2: You can show and hide CodiumAI panel in the extension settings or from the command palette.


How to uninstall

  1. Select "CodiumAI" button in the bottom status bar.
  2. Hover over the authentication notification, select the settings icon and "Manage Extension" option from the dropdown.
  3. CodiumAI Extension will open in a new tab. Select Uninstall and Reload VSCode.

Links

Join our Discord community

Terms of use