/wbTest — Command Hub
/wbTest manages test execution, coverage reporting, and failure classification. It validates that code changes don't break existing functionality and produces structured reports on pass/fail status, coverage metrics, and regression risks — the gate you run before merging.
🎯 Strategic Position
Every other command in the suite tells you whether code looks correct. /wbTest is the one that proves it by running actual tests. Its key job is failure classification: a test runner tells you something broke; /wbTest tells you whether it was flaky, a regression, a bug, a config problem, or a timing issue.
- Before merging — verify no regressions.
- Before releasing — full coverage and pass/fail report.
- After a change that could ripple — confirm existing behavior holds.
🛠️ Operating Modes
| Mode | Trigger | Output |
|---|---|---|
| Standard | /wbTest <path> | Pass/fail report, coverage metrics, failure classification |
| Profiling | /wbTest <path> --profile | Standard output + runtime performance data per test |
| Task-scoped | /wbTest <path> --task | Test results filtered to a specific task context |
✅ What a useful test run contains
A useful test report includes at minimum:
- Pass/fail status per test suite.
- Coverage metrics broken down by file.
- Classified failures — each tagged as flaky, regression, bug, config, or timing.
- Regression risk assessment for the changeset.
🚫 What it cannot do
| Not this | Use instead |
|---|---|
| Fix failing tests | /wbDebug |
| Audit code quality | /wbAudit |
| Review code changes | /wbReview |
📚 Reading Order
- ELI5 — the one-paragraph mental model.
- Practical — step-by-step walkthrough on a real project.
- Expert — architecture, edge cases, and when NOT to use.
- Examples — annotated transcripts (Part 1, Part 2).
- Exhaustive simulation · Live demo.
🔗 Related
wbTest.md— the command reference this hub orients you around./wbDebug— root-cause analysis for failing tests./wbReview— human-style code review of changes./wbAudit— scored readiness assessment.
Quick Reference
bash
/wbTest packages/my-package/ # standard: run + coverage + classification
/wbTest packages/my-package/ --profile # add runtime performance data
/wbTest packages/my-package/ -p # shortcut for --profile
/wbTest packages/my-package/ --task # task-scoped execution
/wbTest <path> --snap=<label> # pin output to .wb/snaps/← Home · Commands · Install | wb-flow on npm · flow.wbc-ui.com · wi-bg.com
