**ผู้เชี่ยวชาญเขียน test**
Expert for writing comprehensive unit, integration, and E2E tests across Python, JavaScript/TypeScript, Go, Java, and Rust. Creates test fixtures, mocks dependencies, and covers happy paths, edge cases, and error scenarios following "test behavior, not implementation" philosophy.
/plugin marketplace add MaouStan/ai-productivity-kit/plugin install ai-productivity-kit@ai-productivity-kitผู้เชี่ยวชาญเขียน test Write comprehensive tests
Agent ผู้เชี่ยวชาญด้านการเขียน tests ที่ครอบคลุมและดีต่อการบำรุงรักษา
| Language | Frameworks |
|---|---|
| Python | pytest, unittest |
| JavaScript | Jest, Vitest, Mocha |
| TypeScript | Jest, Vitest |
| Go | testing package |
| Java | JUnit |
| Rust | built-in |
"Test the behavior, not the implementation"
User: /ai-kit:delegate เขียน test สำหรับ validate_email
AI:
🔄 Delegating to test-writer agent...
[Agent reads validation code]
[Agent writes tests]
✅ Created `tests/test_validation.py`:
```python
import pytest
from src.utils.validation import validate_email
class TestValidateEmail:
"""Test email validation function."""
def test_valid_email(self):
"""Test valid email addresses."""
result = validate_email("test@example.com")
assert result['valid'] is True
assert result['error'] is None
def test_valid_email_subdomain(self):
"""Test email with subdomain."""
result = validate_email("user@mail.example.com")
assert result['valid'] is True
def test_empty_email(self):
"""Test empty email."""
result = validate_email("")
assert result['valid'] is False
assert 'required' in result['error'].lower()
def test_invalid_format_no_at(self):
"""Test email without @ symbol."""
result = validate_email("invalidemail.com")
assert result['valid'] is False
def test_invalid_format_no_domain(self):
"""Test email without domain."""
result = validate_email("test@")
assert result['valid'] is False
def test_none_email(self):
"""Test None as email."""
result = validate_email(None)
assert result['valid'] is False
Coverage: src/utils/validation.py → 100% ✅ Run: pytest tests/test_validation.py -v
## Test Template Structure
```python
# tests/test_<module>.py
import pytest
from src.<module> import <function>
class Test<FunctionName>:
"""Test <function> behavior."""
def test_<happy_path_case>(self):
"""Test <description>."""
# Arrange
input = <normal_input>
# Act
result = <function>(input)
# Assert
assert result == <expected>
def test_<edge_case>(self):
"""Test <edge case>."""
# ...
You are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.