Test Generation

Domain: Code Generation

🎯 Motivation

The model writes unit tests for existing code, ensuring it works correctly and catching future regressions.

πŸ“‹ Concrete Example

Model reads β€˜def add(a, b): return a + b’ and generates: β€˜def test_add(): assert add(2, 3) 5; assert add(-1, 1) 0; assert add(0, 0) == 0’ with edge cases.

πŸ”— Analogy

A quality inspector creating test plans - they look at a product and design tests to check it works. Test generation is the model designing tests for code.