31. Testing Strategy
Testing Strategy requirements from the authoritative Glitchpad Technical Specification.
| Tier | Scope | Required tools and evidence |
|---|---|---|
| Pure unit | Detection weights, text profiles, Mermaid revisions and limits, metadata normalization, state transitions, path normalization | Rust and TypeScript unit tests |
| Property | Encoding/newline round trips, revision ordering, archive paths, bounded chunking | proptest and property-based TypeScript tests |
| Fuzz | Detection, image metadata, ICO, SVG, ZIP/XML, office relationships, save payload parsing | cargo-fuzz with regression corpus |
| Contract | Every document host adapter and renderer against shared behavior | Host and renderer conformance suites |
| Fixture/golden | Markdown HTML, standalone and embedded Mermaid, syntax modes, images, PDFs, DOCX, ODT, metadata, errors | Licensed corpus with expected semantic outputs |
| Shared UI | Tabs, commands, inspector, dirty/conflict/recovery, accessibility | Vitest, Testing Library, Playwright, axe-core |
| Native adapter | Desktop paths/watch/save and Android intents/providers/grants | Platform tests, JVM tests, instrumentation tests |
| Package smoke | Install, launch, association/open-with, core view/edit/save, metadata, recovery, uninstall | Clean OS images and physical Android devices |
| Manual | Visual polish, assistive technology, office semantic readability, signing/store presentation | Versioned checklist with operator and evidence |
Fixture provenance is recorded in fixtures/provenance.toml with source, author, license, redistribution permission, format, feature purpose, digest, sensitivity review, and expected result. Production documents and private user data are prohibited as fixtures. Hostile fixtures remain inert outside the parser harness and carry clear warnings.
Size classes are tiny, normal, medium, boundary, over-limit, malformed, truncated, contradictory, encrypted, and adversarial. Golden updates require a reviewed explanation of why output changed. CI retries infrastructure setup, not failing assertions. A flaky test is quarantined only with an owner, issue, expiry, and replacement gate; release-critical tests cannot be quarantined.
Coverage is a diagnostic, not a success metric. Critical state, save, recovery, detection, permission, and parser-limit branches require direct tests regardless of aggregate percentage.
30. Build, Continuous Integration, and Documentation
Build, Continuous Integration, and Documentation requirements from the authoritative Glitchpad Technical Specification.
32. Packaging, Distribution, and Updates
Packaging, Distribution, and Updates requirements from the authoritative Glitchpad Technical Specification.