Managing the Test Suite in Qodo Gen
Overview
Following the behavior analysis, Qodo Gen generates an initial list of tests based on the selected testing framework, which you can configure in the configuration file. Each test corresponds to a behavior identified in the preceding analysis and is tagged according to its type: happy path, edge case, other, or custom test.
Refining Your Tests
Qodo Gen offers several options for refining and customizing the generated tests to ensure they meet your project's requirements:
- Refinement via Chat: Beneath each test, a chat field allows you to request specific refinements in natural language. Submit your request by pressing Enter or clicking the send button, and Qodo Gen will update the test based on your instructions.
- Manual Editing: Directly edit the test code within the advanced panel for quick tweaks and adjustments.
- Regenerate Test: Use the "Regenerate" button beside each test to generate an alternative version based on the same behavior.
- Delete Test: If a test is unnecessary or irrelevant, you can remove it from the list.
- Run and Auto Fix (VSCode Only): For supported languages, this option allows you to run tests directly. If a test fails, Qodo Gen attempts to fix it automatically and re-run it. The process stops if a potential bug is detected, alerting you to the issue. Learn more about supported languages.
- Regenerate Entire Test Suite: Apply a general instruction for the entire suite via the Configuration tab, then regenerate all tests to reflect this overarching guidance.
- Request More Tests: Click "Give me more tests" to generate additional tests, covering more behaviors in one action.
Test History and Feedback
Qodo Gen maintains a history of each test's modifications, accessible through "Previous" and "Next" buttons, allowing you to track and revisit changes over time.
Provide Feedback (VSCode only)
Inside each test, you'll find "Like" or "Dislike" buttons. Your feedback helps Qodo Gen learn and improve test generation accuracy.
Finalizing Your Test Suite
When satisfied with the test suite:
-
Save to Project: Open the finalized test suite as a file and save it directly into your project, integrating your new, refined tests into your development workflow.
-
Copy tests: Alternatively, you can copy the tests and paste it into your editor.
By leveraging these tools and options, you can fine-tune your test suite to precisely match your expectations, ensuring thorough coverage and robust testing for your code.