用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Wan-ZL/AptByBART --skill test-full命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Quick unit + property-based test run with AI auto-fix loop
Lighthouse performance/SEO/a11y/best-practices optimization with AI self-loop to push all scores to 90+
Unit + property tests verified by mutation testing with AI self-improvement loop
基于 SOC 职业分类
正在显示 SKILL.md
| name | test-full |
| description | Complete test suite — unit, property, integration, e2e, mutation, and coverage audit |
| user-invocable | true |
You are running the full quality gate for the Elenvo project. This is the most thorough test pass, intended to run before PRs or merges. It includes a coverage debt audit, all test types, mutation testing, and a final dashboard report.
Total budget: ~10 test command runs max across all stages. If everything passes on first try, report success quickly — don't loop unnecessarily.
Critical rule: You may only modify test files — NEVER modify source code. If source code has a real bug, report it to the user.
vitest.config.tse2e/ directory, webServer auto-starts dev) — config in playwright.config.tsstryker.config.json__tests__/ (unit, components, property), e2e/ (Playwright)@/* → project rootRun each stage independently. Failure in one stage does NOT skip others. Aggregate all results for the final report.
This step catches untested code from previous changes — not just the current diff. This is the unique value of /test-full.
npx vitest run --coverage 2>&1% Stmts, % Branch, % Funcs, % Lines)lib/, app/api/), (ii) have 0% or very low coverage
c. Read the top 5 lowest-covered source files to understand what they do
d. Write tests for those files in the appropriate __tests__/ subdirectory
e. Re-run: npx vitest run --coverage 2>&1
f. If still < 80%, do ONE more round (max 2 audit rounds total)npx vitest run 2>&1npx vitest run 2>&1
d. Max 2 fix attempts, then move onfast-check imports in __tests__/property/ or similar)
__tests__/integration/ directory*.integration.test.ts or *.integration.test.tsxnpx playwright test 2>&1
webServer configured to auto-start npm run devtest-results/ or playwright-report/
b. Read the failing test files and analyze:
npx playwright test 2>&1
d. Max 2 fix attempts, then move onDetermine which source files have changed:
git diff --name-only HEAD~5 -- 'lib/**/*.ts' 'app/api/**/*.ts' 'app/**/*.tsx' 'components/**/*.tsx' | head -20
Run mutation testing scoped to changed files:
npx stryker run --mutate "<file1>,<file2>,..." 2>&1
npx stryker run 2>&1 (uses config defaults)Parse the mutation score from output
If mutation score >= 80% → Record and move to Step 5
If mutation score < 80%: a. Read the Stryker report to find which mutants survived b. Identify the source files with the most surviving mutants c. Read those source files and their corresponding test files d. Write additional test cases that would kill the surviving mutants (focus on: boundary conditions, negation, operator replacement, early returns) e. Re-run mutation testing f. Max 3 iterations total for this step
Record final mutation score
npx vitest run --coverage 2>&1git diff --name-only HEAD~5 -- '*.ts' '*.tsx' | grep -v '__tests__\|\.test\.\|\.spec\.\|e2e/'
Cross-reference these files against the coverage report outputGenerate a dashboard-style summary. Use this exact format:
## 🧪 Test Suite Report — /test-full
| Stage | Status | Details |
|-------|--------|---------|
| Unit Tests | ✅/❌ | X/Y pass |
| Property Tests | ✅/⏭️ | X/Y pass (or "skipped — none found") |
| Integration Tests | ✅/⏭️ | X/Y pass (or "skipped — none found") |
| E2E Tests | ✅/❌ | X/Y pass |
| Mutation Score | ✅/❌ | XX% (target: 80%) |
| Changed Files Coverage | ✅/❌ | XX% (target: 80%) |
| Overall Coverage | ✅/❌ | XX% (target: 80%) |
| Stretch: Overall Coverage | ⭐/➖ | XX% (target: 90%) |
| Stretch: Mutation Score | ⭐/➖ | XX% (target: 90%) |
### Auto-fixed by AI
- [list each test file modified and what was changed, or "None — all tests passed on first run"]
### ⚠️ Needs User Attention
- [list any real bugs found, source code issues, infra problems, or "None — all clear"]
### Verdict: ALL PASS ✅ / PARTIAL PASS ⚠️ / NEEDS ATTENTION ❌
Verdict logic:
webServer to auto-start dev server. If port 3000 is occupied, note it.stryker run takes more than 10 minutes, consider narrowing the mutate scope.2>&1 to capture both stdout and stderr for analysis.