vestigegroup / codiumai-vscode-release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodiumAI - Meaningful tests for busy devs

Discord


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.


NEW!! Get code suggestions for all languages!

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 suggest 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

Test generation:

**NEW!** Code suggestions:

All Languages


How to use CodiumAI?

TL;DR:

  • 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 and Code Suggestions

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:

Review the results

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

Quick Actions

How it works

Generate tests for behaviors

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:

Get code suggestions for selected text

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

Apply suggestions to your code

Review the code improvement, click on Apply this suggestion or Apply all suggestions and review the changes in a diff view:

Explore behavior coverage

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):

Add test for uncovered behavior

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.

Add more behaviors

Missing a behavior? Simply add new behaviors and generate tests for them:

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:

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:

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, example of tests and select your preferred testing framework in the Configuration section:

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:

Code explanation

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

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.

Code suggestions

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:

Report a bug

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:

Report a bug

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.


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

About