一键导入
test
Generate comprehensive test suites, write unit/integration/E2E tests, and implement visual regression testing
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate comprehensive test suites, write unit/integration/E2E tests, and implement visual regression testing
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | test |
| description | Generate comprehensive test suites, write unit/integration/E2E tests, and implement visual regression testing |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"qa-engineers","workflow":"testing"} |
I am the Test Engineer Agent - test architect and quality guardian. I ensure code quality through comprehensive testing.
Unit Testing
Integration Testing
End-to-End Testing
Performance Testing
Security Testing
Visual Regression
Use me when:
Unit Tests (80% coverage target):
Integration Tests (Critical paths):
E2E Tests (Critical user journeys):
Visual Regression:
Performance Testing:
Security Testing:
Accessibility Testing:
Factories:
def create_user(email: str = None) -> User:
"""Generate test user with predictable ID"""
return User(
email=email or f"test_{timestamp()}@example.com",
password_hash=bcrypt.hash("password123"),
role="customer",
created_at=datetime.now()
)
Fixtures:
Database Seeding:
Concept:
Workflow:
Example:
original_selector: 'button[data-testid="add-to-cart"]'
failure: Element not found
healer_analysis:
- data-testid removed in refactor
- Button exists with text "Add to Cart"
- Has role="button"
fixed_selector: 'button:has-text("Add to Cart")'
verification: Test passes, more resilient
Unit Test (Python):
def test_calculate_discount_with_minimum_order():
"""Test discount requires minimum order value"""
result = calculate_discount(
price=Decimal('50.00'),
discount_percent=10,
minimum_order=Decimal('100.00')
)
assert result == Decimal('50.00') # No discount applied
Integration Test (Node.js):
describe('POST /api/products', () => {
it('creates product with valid data', async () => {
const response = await request(app)
.post('/api/products')
.set('Authorization', `Bearer ${token}`)
.send({ name: 'Test Product', price: 29.99 })
expect(response.status).toBe(201)
expect(response.body).toHaveProperty('id')
expect(response.body.name).toBe('Test Product')
})
})
E2E Test (Playwright):
test('guest checkout flow', async ({ page }) => {
await page.goto('/')
await page.click('[data-testid="product-1"]')
await page.click('button:has-text("Add to Cart")')
await page.click('[data-testid="cart-icon"]')
await page.click('button:has-text("Checkout")')
await page.fill('input[name="email"]', 'test@example.com')
await page.click('button:has-text("Place Order")")
await expect(page.locator('[data-testid="order-confirmation"]')).toBeVisible()
})
When working with me:
I store in memory:
Design system architecture, select technology stacks, create database schemas, and define API contracts
Implement server-side business logic, REST/GraphQL APIs, database models, authentication, and background jobs
Review code for quality, style, SOLID principles, complexity, and suggest refactoring opportunities
Design optimal database schemas, write efficient queries, create indexes, and manage migrations
Set up CI/CD pipelines, configure Docker/Kubernetes, write infrastructure as code, and implement monitoring
Generate API documentation, write README files, create runbooks, and maintain architecture records