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.
Beta Version - Supported in VSCode version 1.70.0 and above
By creating comprehensive test suites, our tool helps you catch and fix bugs early and ensures that your code is reliable and maintainable.
Test generation:
**NEW!** Code suggestions:
- Click on the
Generate Tests
button above a function/class/method name- Use CodiumAI quick actions left panel to generate tests for behaviors and to get inline code suggestions
- Use CodiumAI's keybinding shortcut - mac:
cmd+ctrl+c
| linux:alt+shift+c
| windows:ctrl+win+z
- Select code -> right click -> Choose
CodiumAI - Generate Tests
- Or just use the command palette and select
CodiumAI - Generate Tests
Generate tests for a function, a class, or a method using the Test this class/function/method
button above a function/class/method name:
Generate tests for code snippets by selecting the code you want to test, right-clicking on it and choosing the CodiumAI - Generate Tests
option:
Watch tutorial -> https://youtu.be/BxFuKFX_KSA
CodiumAI tab will present the test results - review the test names, objectives, types, and the test code:
Quickly generate tests from behaviors using Quick Actions - Click on the CodiumAI panel on the left, choose the behavior you want to generate tests for, and get the generated test inside your editor.
Get code suggestions, enhance your code, get code explanation and docstring - FOR ALL LANGUAGES - NEW!!
Quickly get inline code suggestions, code enhancement, docstring, and code explanations for your code in any language! Click on the CodiumAI panel on the left, and choose the desired command:
You can also get code and text suggestions for any code or text - simply select the code or the text you want to get suggestions for, and click on
Get code suggestion for the selected text
option in the left panel
Review the code improvement, click on Apply this suggestion
or Apply all suggestions
and review the changes in a diff view:
CodiumAI generates a behavior list of your code and marks each behavior as covered or not covered based on the generated test. The number of covered behaviors calculates the coverage percentages. You can refresh the coverage when you modify your test suite (add, remove, or modify tests):
For behaviors that are not covered by tests, you can click on the Generate test
button next to it, and CodiumAI will generate a test
for this behavior.
Missing a behavior? Simply add new behaviors and generate tests for them:
Watch tutorial -> https://youtu.be/xHwIvCjvQDI
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:
You can also just click the Regenerate
button and get an alternative code for this test:
You can manually edit the test within the panel:
Want more tests? Click on Give me more tests
at the bottom of the test suite:
You can focus on code changes from your uncommitted changes, read the code explanation of your changes and generate tests for them:
Want to remove a test from your test suite? Click on the delete
button on each test:
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:
Watch tutorial -> https://youtu.be/l_ITy2_KDZ0
Improve and personalize your test suite by giving general instructions, example of tests and select your preferred testing framework in the Configuration
section:
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:
Read your code explanation written by our TestGPT model. You can use it for documentation, see usage examples, and ensure your code does what it should. You can generate docstring and merge them directly to your code, and also enhance your code quickly with the enhance code
option. Click on the Code Explanation
tab and find out:
Generate Docstring to your code quickly by clicking the "Generate Docstring" button inside the Code Analysis tab. Review the generated comments and merge them into your code.
Our TestGPT model can find some insights about your code and suggests some modifications 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 into your code:
Watch tutorial -> https://youtu.be/yK713au2MJk
Had a bug with CodiumAI? Report us via email (support@codium.ai), Discord or open a GitHub issue, and provide us with your request ID. You can copy it from the CodiumAI panel:
Had a bug with CodiumAI? Report us via email (support@codium.ai), Discord or open a GitHub issue, and provide us with your request ID. You can copy it from the CodiumAI panel:
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.
- Select "CodiumAI" button in the bottom status bar.
- Hover over the authentication notification, select the settings icon and "Manage Extension" option from the dropdown.
- CodiumAI Extension will open in a new tab. Select Uninstall and Reload VSCode.
- Discord community: https://discord.gg/kG35uSHDBc
- CodiumAI site: https://codium.ai
- Blog: https://www.codium.ai/blog/
- Troubleshooting: https://www.codium.ai/blog/technical-faq-and-troubleshooting/
- Support: support@codium.ai
- Terms of use: https://www.codium.ai/terms
- Privacy policy: https://www.codium.ai/privacy-policy
- Please notice - similar to other popular generative-AI tools (such as copilot), we also transmit code snippets to our servers.