4.1 KiB
name, description, argument-hint
| name | description | argument-hint |
|---|---|---|
| testlink-to-autotest | Full pipeline: fetch TestLink test case → decompose into mini-tests → write autotests → review code quality → run and fix tests. Use when: user wants end-to-end test automation from a TestLink test case number, полный цикл по тест-кейсу, сгенерируй автотесты по тест-кейсу TestLink, автоматизировать тест-кейс, full pipeline test case to autotest, КМД в автотест, TestLink в код. | TestLink test case ID (e.g. КМД-1831 or 1831) |
TestLink → Autotest Full Pipeline
Orchestrates four skills in sequence to go from a TestLink test case ID to reviewed, passing autotests — with checkpoints at each stage.
Pipeline Overview
[1] testlink-decompose → Mini-test specifications
↓
[2] autotest-writer → Test code files
↓
[3] python-review → Code quality fixes (🔴 auto-applied, 🟡🟢 proposed)
↓
[4] test-runner → Passing test suite
Procedure
Stage 1 — Decompose Test Case
Apply the full testlink-decompose skill procedure using the test case ID provided by the user.
On completion, display the mini-test table and ask:
Checkpoint 1/4 — Found {N} mini-test(s). Proceed to write autotests for all? Or specify which mini-test IDs to cover (e.g.
MT1, MT3).
Wait for confirmation. If the user selects a subset — carry only those mini-tests forward.
Stage 2 — Write Autotests
Apply the full autotest-writer skill procedure for each accepted mini-test.
Pass the mini-test structure (id, title, description, steps, expected result)
directly as the test specification — skip autotest-writer Step 1 discovery of "what to test"
since the spec is already known.
Still execute:
autotest-writerStep 2 — discover project test patternsautotest-writerStep 3 — resolve library docs via context7 if neededautotest-writerStep 4 — plan tests (one plan entry per mini-test step group)autotest-writerStep 5–7 — write, place, and collect-validate
On completion:
Checkpoint 2/4 — Written {N} test function(s) in
{filepath}. Proceeding to code review...
No confirmation needed — continue automatically.
Stage 3 — Code Review
Apply the full python-review skill procedure on the test file(s) written in Stage 2.
Auto-apply rules:
- 🔴 Must Fix — apply immediately without asking
- 🟡 Should Fix — apply immediately without asking
- 🟢 Consider — show as suggestions, do not apply
After applying 🔴🟡 fixes, display 🟢 suggestions (if any) and ask:
Checkpoint 3/4 — Review complete. Applied {N} fixes. 🟢 Suggestions: {list or "none"} Apply any suggestions before running tests? (
yes/no/ list numbers)
Wait for response, then apply selected suggestions.
Stage 4 — Run Tests
Apply the full test-runner skill procedure on the test file(s) from Stage 2.
If tests pass on first run:
Checkpoint 4/4 ✅ — All {N} tests passing.
If tests fail — follow the full test-runner diagnosis and fix loop (up to 3 iterations).
After fixing, re-run the full suite for regression check.
Final Report
Output a structured pipeline summary:
## Pipeline Complete: {ORIGINAL_ID} → Autotests
| Stage | Result |
|-------|--------|
| 1. Decompose | {N} mini-tests from {ORIGINAL_ID} |
| 2. Write | {N} test functions in {filepath} |
| 3. Review | {N} fixes applied; {N} suggestions |
| 4. Run | {passed}/{total} tests passing |
### Test Functions Written
- `test_{name_1}` — КМД-XXXX-MT1
- `test_{name_2}` — КМД-XXXX-MT2
### Remaining Issues (if any)
{description or "None"}
Error Handling
| Failure point | Action |
|---|---|
| Stage 1: test case not found | Stop, report to user, ask for correct ID |
| Stage 2: no test patterns found | Ask user to point to an existing test file as reference |
| Stage 3: mypy/ruff not installed | Skip review, warn user, continue to Stage 4 |
| Stage 4: tests fail after 3 fix attempts | Report remaining failures with diagnosis; do not loop further |