From 991c583eb92ef27663b63ceefa6a880b83db6e16 Mon Sep 17 00:00:00 2001 From: pjay Date: Tue, 9 Jun 2026 20:13:54 +0530 Subject: [PATCH] docs update with case study (#63) * docs(manual): add introduction page * docs(manual): rewrite getting started as guided first run * docs(manual): rewrite writing specs as a folio tutorial * docs(manual): document missing spec API in reference * docs(manual): plain-language rewrite of runs page * docs: real introductions on index pages and README * fix(docs): sibling links from directory-style pages need ../ * fix(docs): correct sampling and restart-cost claims to match implementation * docs: nav lists Introduction and Case study; roadmap points to milestone * docs(manual): make getting started target the reader's own app, not Folio * docs(manual): add Folio case study page * docs: point manual navigation at the case study * docs(readme): lead with the case study, fix roadmap link * docs: roadmap links to milestone, sync clear-data default and cross-links --- README.md | 31 +++- docs/_template/page.html | 5 +- docs/development/index.md | 2 +- docs/index.md | 21 ++- docs/manual/case-study.md | 144 +++++++++++++++++ docs/manual/cli.md | 4 +- docs/manual/getting-started.md | 113 ++++--------- docs/manual/index.md | 12 +- docs/manual/introduction.md | 90 +++++++++++ docs/manual/replay.md | 2 +- docs/manual/runs.md | 49 +++--- docs/manual/spec-language.md | 64 ++++++-- docs/manual/writing-specs.md | 283 --------------------------------- 13 files changed, 396 insertions(+), 424 deletions(-) create mode 100644 docs/manual/case-study.md create mode 100644 docs/manual/introduction.md delete mode 100644 docs/manual/writing-specs.md diff --git a/README.md b/README.md index c3bd0c6..87418d9 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,36 @@ Autonomous property-based testing for mobile and web apps. +You write rules that must always hold about your app. sanderling explores the app on its own for minutes or hours, performing thousands of taps, swipes, and inputs, and records every step where a rule breaks. No scripted test paths. One TypeScript spec runs against Android, iOS, and web builds of the same app. + +```ts +import { extract, always } from "@sanderling/spec"; +import { defaultActions } from "@sanderling/spec/defaults"; +import { noUncaughtExceptions } from "@sanderling/spec/defaults/properties"; + +const balance = extract("balance", s => + parseInt(s.ax.find({ testTag: "Balance" })?.text ?? "0", 10)); + +export const properties = { + noUncaughtExceptions, + balanceNeverNegative: always(() => balance.current >= 0), +}; + +export const actionsRoot = defaultActions; +``` + +Every run produces a trace: one JSON line and one screenshot per step. `sanderling replay` opens it in a web UI for stepping through actions, screenshots, property timelines, and violations. + > Alpha. Android, iOS, and web (Chrome driver only). Full scope in the [v0.1.0 roadmap](https://github.com/priyanshujain/sanderling/milestone/1). ## Docs -- [Getting started](https://priyanshujain.github.io/sanderling/manual/getting-started.html) -- [Writing specs](https://priyanshujain.github.io/sanderling/manual/writing-specs.html) -- [`sanderling replay` UI](https://priyanshujain.github.io/sanderling/manual/replay.html) +- [Introduction](https://priyanshujain.github.io/sanderling/manual/introduction/): what property-based testing is and how sanderling works +- [Case study: Folio](https://priyanshujain.github.io/sanderling/manual/case-study/): sanderling finding a real bug in a mobile app +- [Getting started](https://priyanshujain.github.io/sanderling/manual/getting-started/): install the CLI and run it against Folio +- [Spec language reference](https://priyanshujain.github.io/sanderling/manual/spec-language/) - Examples: [folio](https://github.com/priyanshujain/sanderling/tree/master/examples/folio) (KMP, Android/iOS/web), [folio-web](https://github.com/priyanshujain/sanderling/tree/master/examples/folio-web) (React + Vite) -- [Architecture](https://priyanshujain.github.io/sanderling/development/architecture.html) - -After a `sanderling test` run, browse traces locally with `sanderling replay`. It opens a web UI for stepping through actions, screenshots, snapshots, residual formulas, and exceptions. +- [Architecture](https://priyanshujain.github.io/sanderling/development/architecture/) for contributors --- diff --git a/docs/_template/page.html b/docs/_template/page.html index ea9ef96..29d20e9 100644 --- a/docs/_template/page.html +++ b/docs/_template/page.html @@ -32,8 +32,9 @@