Test Generation
Last updated
Was this helpful?
Last updated
Was this helpful?
Qodo Gen leverages advanced AI technology to generate comprehensive tests for any programming language.Test generation boosts productivity, enhances code quality and simplifies the development process, helping you deliver reliable, high-performance software with ease.
Open a file: Open the file in your project that you want to create tests for.
Activate Qodo Gen: Click the Qodo Gen logo in the Plugins or Extensions bar.
Select focus: Select the component that you’d like to test from the bar underneath the chatbox.
Start Test Generation: Type /test in the chatbox and hit the send key or click the arrow button. Qodo Gen will start leading you through the Test Generation process.
Determine the Test Location: You will be prompted to decide where the new tests should be placed. There are two options:
Create a New File: This option will generate a new test file for the new tests.
Add to an Existing File: This option allows you to append the new tests to an already existing test file.
Select the Testing Framework: Choose your preferred testing framework from the list presented. Make sure that the framework you select is compatible with your existing setup.
Select Behaviors to Test: Review the behaviors list presented and select the behaviors that you want the tests to cover. This step allows you to focus on specific functionalities that are critical to your application or those that need thorough testing.
Review: Once you have made your selections, a summarized message will be generated. This message will detail what actions are about to be taken, including the framework selected and the behaviors chosen for testing. Take a moment to review this summary before proceeding.
Chat: Choose a test and ask for any changes using Qodo Gen Chat. You can also open the Behaviors panel to generate more tests covering certain behaviors, create new behaviors or alter existing ones. Qodo Gen Chat will update your test code on the spot. For example, you can ask to generate more tests like a specific test, or expand a certain behavior.
Add More Behaviors: After reviewing the generated tests, you have the option to select additional behaviors. Use the menu below the summary to choose more behaviors that you want to include in the tests. You can continue generating more tests as needed, ensuring that all critical aspects of your application are covered.