# test-generation - Author: M763468 - Repository: M763468/ai-dev-workflow-template - Version: 20260201020159 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/M763468/ai-dev-workflow-template - Web: https://mule.run/skillshub/@@M763468/ai-dev-workflow-template~test-generation:20260201020159 --- # Test Generation ## Purpose To generate and expand test code using pytest. ## Input - Source code file path - Function/method name to be tested ## Output - A new or updated test file with pytest test cases. - A summary of the generated tests. ## Steps 1. Analyze the specified source code file to understand its structure and dependencies. 2. Identify the logic, branches, and potential edge cases of the function/method to be tested. 3. Generate comprehensive test cases, including positive, negative, and boundary scenarios. 4. Write test code using the `pytest` framework, including necessary assertions. 5. Place the generated test code in the appropriate test file, or create a new one if it doesn't exist. 6. Ensure the generated code is syntactically correct and follows common testing conventions. ## Running Generated Tests The following commands can be used to run the tests generated by this skill: - `pytest` - `pytest tests/` - `pytest tests/test_module.py::test_function`