← Back to my portfolio

> riverbound / quality engineering

How I test Riverbound.
From one function to a real phone.

Riverbound is my book tracker and book club app for iPhone and Android. AI writes much of the code, so the tests are what I trust.

850+unit and logic tests across 100+ files
350+component tests that render real screens
~600database access-rule checks over 130+ migrations
6end-to-end flows on an Android emulator

As of November 2026.

01 — ./strategy

A test pyramid, with a database layer

Many fast tests, a few slow ones on a device. The database gets its own layer because it decides who sees what.

  • Unit & logicReading progress, ISBN checksums, search, dates, and the server functions behind the API.
  • ComponentsWhat each screen shows and allows.
  • Database rulesWho can and can't touch every table and function.
  • End-to-endSign in, join a club read, report and resolve content.

02 — ./quality-gates

What has to pass, and when

One pipeline runs on every pull request. The other runs on the exact commit that ships.

Pull request checks

on: pull_request · ~15 min limit
  1. Installnpm ci from the lockfile
  2. TypecheckBroken links fail
  3. LintRules for past bugs
  4. Unit tests
  5. Component tests
  6. Import tests
  7. Database testsWhen the diff touches data code

Release check (Android)

on: release-check-* tag or manual run
  1. All PR checksDatabase tests always
  2. Build release APKSame build testers get, on the dev database
  3. Boot emulatorPixel 6, API 35
  4. Run Maestro flowsTagged release, one retry
  5. Scrub secretsNo clean logs, no upload
  6. Publish resultsReports and screenshots per attempt
blocking checkruns when relevanton a device

Tags, not file lists

A flow tagged release runs in the release check. No pipeline edits to forget.

Honest retries

Each attempt keeps its own report, so a test that passed on retry still shows as flaky.

03 — ./layers

Each layer, in code

Excerpts from the real suites.

Boundaries and bad input

Estimated page counts, pages past the end, 100% shown too early. Each edge case gets a test named after its rule.

  • node:test
  • Boundary values
  • Negative tests
library/progress.test.mjs
test('percent labels round down, so only the end shows 100%', () => {
  assert.equal(formatProgressPercent(99.7, 'en'), '99%');
  assert.equal(formatProgressPercent(100, 'en'), '100%');
});

test('a page beyond an estimated length never shows more than 100%', () => {
  assert.equal(getProgressPercent({ page: 420, totalPages: 400 }), 100);
});

test('pages must be whole numbers within the limit', () => {
  for (const bad of ['', 'abc', '12.5', '-3', String(MAX_PAGES + 1)]) {
    assert.deepEqual(parseProgressInput('page', bad, '400'),
      { ok: false, error: 'invalidPage' }, bad);
  }
});

04 — ./data-quality

Data in, data out, still correct

Three places move data. Each is tested for accuracy and partial failure.

Library imports

CSV export→match→shelves
  • Source-to-target matching: normalized for case, accents and punctuation
  • Bad ISBNs: fall back to title search
  • Outages: rows wait instead of failing
  • Limits: runs stop cleanly

Catalog loads

reviewed batch→dry run→commit
  • Schema checks: bad fields and duplicates rejected
  • Dry run: reports conflicts, never guesses
  • Reconciliation: stale plans refused
  • Data integrity: atomic, never half-applied

Live chat updates

Postgres change→realtime event→app cache
  • Change data capture: inserts, edits and deletes stream in
  • Consistent: edits reach unloaded pages
  • No phantom rows: removed messages leave cleanly
  • Durable: saved writes survive failed refreshes

05 — ./test-data

Test data and environments

Real testers use production, so tests never do.

Dev and prod never mix

PR checks never touch a hosted database. The release check uses dev only. The import tool refuses production.

Secrets stay secret

The test password is scrubbed from every result file. If any copy remains, nothing is uploaded and the job fails.

Reusable flows

Shared subflows for sign-in, deep links and the keyboard. New tests are built from them, not copied.

Stable selectors

Flows use test IDs, not labels. Component tests confirm the IDs reach the screen.

06 — ./bugs-caught

Bugs that shaped the process

Each one changed how Riverbound is tested.

// release-only crash

Worked on web, crashed on phones

found
A club card crashed the release app. Web and unit tests passed.
cause
Hermes lacks some date formatting APIs.
changed
Release check runs a real Hermes build. A lint rule flags the APIs.

// environment gap

Passes locally, refused in the cloud

found
Hosted Postgres rejects a delete with no where. Local allows it.
risk
Green tests, failed deploy.
changed
Now a coding rule, checked in review.

// flaky infrastructure

The emulator, not the app

found
A system popup covered the app mid-run.
cause
A busy CI machine.
changed
Popups off, more cores, separate retry reports.

Want to see the app itself?

A book tracker and book club with spoiler-free buddy reads. Coming to iPhone and Android.