Use when adding new error messages to React, or seeing "unknown error code" warnings.
npx skills add MathNj/Learn-Flow --skill "test-generator"
Install specific skill from multi-skill repository
# Description
Generate test suites for skills and applications. Use when creating unit tests, integration tests, contract tests, or E2E tests following TDD principles with pytest, vitest, or playwright.
# SKILL.md
name: test-generator
description: Generate test suites for skills and applications. Use when creating unit tests, integration tests, contract tests, or E2E tests following TDD principles with pytest, vitest, or playwright.
Test Generator
Generate comprehensive test suites following TDD principles.
Overview
Creates unit, integration, contract, and E2E tests for skills and applications with proper setup, fixtures, and assertions.
Quick Start
/test-generator --skill kafka-k8s-setup --type integration
/test-generator --service concepts-agent --type contract
/test-generator --feature learnflow-frontend --type e2e
Test Types
| Type | Purpose | Framework |
|---|---|---|
| Unit | Individual functions, classes | pytest / vitest |
| Integration | Service communication | supertest / testcontainers |
| Contract | API compliance | openapi-validator |
| E2E | User workflows | playwright / cypress |
| Performance | SLA verification | k6 / artillery |
Generated Structure
tests/
βββ unit/
β βββ deploy.test.ts
β βββ healthcheck.test.ts
βββ integration/
β βββ kafka-flow.test.ts
β βββ service-communication.test.ts
βββ contract/
β βββ api-spec.test.ts
βββ e2e/
β βββ student-journey.test.ts
βββ performance/
βββ api-latency.test.ts
Test Framework Defaults
| Language | Unit | Integration | E2E |
|---|---|---|---|
| Python | pytest | pytest-asyncio | playwright |
| TypeScript | vitest | supertest | playwright |
| Go | testing | testcontainers | none |
Test Template
def test_deploy_kafka_creates_namespace(mock_k8s):
"""Given: K8s cluster available
When: Kafka is deployed
Then: kafka namespace is created"""
result = deploy_kafka(namespace="kafka")
assert result["namespace"] == "kafka"
assert result["status"] == "created"
Scripts
Run scripts/generate.py --type <type> <target> to generate tests.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.