vm-test-suite-generator
Skill detail with category, linked agents, and source metadata.
vm-test-suite-generator
Generates executable test code from a structured test case catalog. Produces language-specific test files (Python/pytest, TypeScript/Vitest, .NET/xUnit, Java/JUnit 5) for unit, integration, and E2E layers. For UI/E2E layer: generates VS Code browser test files (primary) and Playwright 8+ files (fallback/CI equivalent). Adapted from HelloWorld-AgentSkills vm-tdd-template-generator v1.0.0 with brownfield input support and browser testing generation.
Source: .github/skills/testing/vm-test-suite-generator/SKILL.md
Used By Agents
Preview
View source preview (first 3000 chars)
# VM Test Suite Generator
> Adapted from: HelloWorld-AgentSkills `vm-tdd-template-generator` v1.0.0
## Overview
Given a structured test case catalog (produced by `5 - Test & Build - Test Design Agent`), this skill generates executable test files per layer and language. It handles three layers: unit, integration, and UI/E2E. For UI/E2E, it generates both VS Code browser test files (for developer local use) and Playwright 8+ test files (for CI and complex scenarios).
## When to Use
- Test Automation Agent needs to convert a test case catalog into code
- Generating test scaffolds for a brownfield codebase based on extracted use cases
- Adding new test files after requirement gap analysis identifies untested capabilities
## When NOT to Use
- Generating tests without a structured test case catalog (invest in Test Design Agent first)
- Running or validating tests (that is CI tooling or QA Agent)
- Modifying existing test logic (make targeted edits directly)
## Unitary Function
**ONE RESPONSIBILITY:** Convert structured test case entries into executable, language-specific test file content.
**NOT RESPONSIBLE FOR:**
- Test planning or strategy design (Test Design Agent)
- Smoke/regression labeling manifests (vm-smoke-regression-packager)
- CI workflow generation (vm-ci-test-workflow-generator)
- Running or asserting test pass/fail
## Inputs
```json
{
"test_cases": [
{
"id": "TC-001",
"name": "Login with valid credentials returns authenticated session",
"type": "integration",
"layer": "api",
"use_case_id": "UC-001",
"steps": ["POST /api/auth/login with valid payload", "Assert HTTP 200", "Assert access_token in response"],
"expected_result": "JWT access/refresh token pair returned",
"preconditions": ["User exists"],
"data_entities": ["User", "Session"],
"browser_testing_approach": null
},
{
"id": "TC-003",
"name": "Login form submits and redirects on success",
"type": "e2e",
"layer": "ui",
"browser_testing_approach": "vscode_browser_primary",
"steps": ["Navigate to /login", "Fill credentials", "Submit", "Assert redirect to /dashboard"]
}
],
"language": "python|typescript|dotnet|java",
"layer": "unit|integration|e2e",
"framework_config": {
"test_framework": "pytest|vitest|xunit|junit5",
"api_framework": "fastapi|flask|django|express|nestjs|aspnetcore|springboot|none",
"ui_framework": "react|angular|vue|none",
"playwright_version": "8"
},
"output_path": "tests/"
}
```
## Browser Testing Generation Policy
For test cases with `layer: ui` or `type: e2e`:
| `browser_testing_approach` | Files Generated | Notes |
|---|---|---|
| `vscode_browser_primary` | VS Code browser test + Playwright CI equivalent | Two files: one for local VS Code use, one for CI |
| `playwright_fallback` | Playwright 8+ test only | Single file; runs in both local and CI |
| `null` / not set | Playwright 8+ test only | Default to Playw