Verification strategy for CANdb Studio - test pyramid, requirement-to-test traceability, golden/property/fuzz/differential tests, quality gates, definition of done, review checklist. Use when planning tests, reviewing coverage, or deciding if work is done.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Quality And Verification?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/afri-bit-quality-and-verification)
---
name: quality-and-verification
description: Verification strategy for CANdb Studio - test pyramid, requirement-to-test traceability, golden/property/fuzz/differential tests, quality gates, definition of done, review checklist. Use when planning tests, reviewing coverage, or deciding if work is done.
---
# Quality and verification
## Test pyramid
1. **Unit** (`test/unit/`, Mocha tdd + strict `assert`): pure logic - parsers, codec, domain, services with fakes. Fast; the bulk.
2. **Integration** (`test/integration/`, VS Code host): activation, commands, custom editor, tree, webview handler wiring.
3. **Webview**: component logic tested without the host; a11y checks; manual verification noted in the PR when no browser host was available.
4. **System / replay**: golden logs and recordings through the full pipeline.
## Techniques that matter for this product
- **Round trip**: `parse(serialize(parse(x))) == parse(x)` for a corpus of DBCs (plus idempotent serialization).
- **Golden files**: small expected outputs checked in; diffs reviewed.
- **Differential**: compare against reference tools or independent implementations (e.g. python-can/cantools in a dev-only script) on shared fixtures.
- **Property-based**: random signals/layouts: pack then unpack is identity within range; overlap detection symmetric.
- **Fuzz/negative**: truncated, oversized, random-byte inputs never crash or hang; always a typed error.
- **Boundary values**: DLC 0/8/9/15, start bit 0/63, length 1/64, signed min/max, factor 0, huge offsets, 29-bit IDs.
- **Time**: fake clocks; never sleep in tests.
## Traceability
Each OpenSpec scenario -> at least one test named or commented with its requirement (`// spec: virtual-bus-simulation/Start and stop`). A requirement with no test is a finding. Manual verifications are listed in the change's `tasks.md`.
## Definition of done
- [ ] Brief/scenarios satisfied; out-of-scope untouched
- [ ] Behaviour change has tests that fail without the change
- [ ] `npm run compile`, `npm run lint`, `npm run test:unit` green (+ integration when host touched)
- [ ] `npm run spec:validate` green when `openspec/` changed
- [ ] Docs updated (user and/or engineering) when behaviour or architecture changed
- [ ] No new `any`, empty `catch`, `console.log`, or `vscode` import in core/parsers
- [ ] Review done (`code-reviewer`; plus safety/security where required)
- [ ] Residual risks and follow-ups written down
## Reviewing tests
Would this test fail if the bug returned? Does it assert values, not just "no throw"? Is the fixture minimal and readable? Are error messages asserted? Are tests deterministic (no clock, network, ordering luck)?