Generate unit test plans and code for your functions and classes
The Unit Test Agent is designed to help you generate test plans and unit tests for specific functions or classes in your codebase. This agent can create initial test cases and help you refine and expand your test suite.
To use the Unit Test Agent, provide a reference to a function or class name using the @ symbol. You can then ask for test plans or specific test cases. Here are some example prompts:
“Help me plan and write a unit test for @create_document”
“Add an additional test to assert that the value returned is not null”
“Generate a test plan for the @UserAuthentication class”
Clearly specify the function or class you want to test
Provide information about expected behavior or edge cases
Iterate on the generated tests, asking for modifications or additional cases as needed
By using the Unit Test Agent, you can quickly create a comprehensive suite of unit tests for your codebase, improving code quality and reducing the likelihood of bugs in your application.