Glitchpad

31. Testing Strategy

Testing Strategy requirements from the authoritative Glitchpad Technical Specification.

TierScopeRequired tools and evidence
Pure unitDetection weights, text profiles, Mermaid revisions and limits, metadata normalization, state transitions, path normalizationRust and TypeScript unit tests
PropertyEncoding/newline round trips, revision ordering, archive paths, bounded chunkingproptest and property-based TypeScript tests
FuzzDetection, image metadata, ICO, SVG, ZIP/XML, office relationships, save payload parsingcargo-fuzz with regression corpus
ContractEvery document host adapter and renderer against shared behaviorHost and renderer conformance suites
Fixture/goldenMarkdown HTML, standalone and embedded Mermaid, syntax modes, images, PDFs, DOCX, ODT, metadata, errorsLicensed corpus with expected semantic outputs
Shared UITabs, commands, inspector, dirty/conflict/recovery, accessibilityVitest, Testing Library, Playwright, axe-core
Native adapterDesktop paths/watch/save and Android intents/providers/grantsPlatform tests, JVM tests, instrumentation tests
Package smokeInstall, launch, association/open-with, core view/edit/save, metadata, recovery, uninstallClean OS images and physical Android devices
ManualVisual polish, assistive technology, office semantic readability, signing/store presentationVersioned 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.