Unit tests
Automated checks of one function or class in isolation.
Mandatory for 18 of 46 product types. Usually run by a developer.
What it catches
- wrong calculations
- edge cases in logic
- regressions in pure code
What it misses
- integration faults
- UI
- configuration
- performance
Which product types need it and why
| Product type | Status | Reason or condition |
|---|---|---|
| accounting and invoicing SaaS | mandatory | Risks: Records silently wrong |
| buy now pay later service | mandatory | Risks: Money leaves or fails to arrive |
| clinical trial management software | mandatory | Risks: Physical or psychological harm to a user |
| crypto exchange | mandatory | Risks: Money leaves or fails to arrive |
| data pipeline | mandatory | Risks: Records silently wrong |
| desktop application | mandatory | Risks: Records silently wrong |
| e-signature service | mandatory | Risks: Records silently wrong |
| email marketing platform | mandatory | Risks: Fine or enforcement by a regulator |
| ERP system | mandatory | Risks: Money leaves or fails to arrive |
| expense management tool | mandatory | Risks: Records silently wrong |
| identity and access management service | mandatory | Risks: Fraud or abuse by users |
| insurance app | mandatory | Risks: Records silently wrong, Money leaves or fails to arrive |
| lending platform | mandatory | Risks: Records silently wrong, Money leaves or fails to arrive |
| loyalty program app | mandatory | Risks: Money leaves or fails to arrive |
| machine learning model service | mandatory | Risks: Users or operators act on wrong numbers, Fine or enforcement by a regulator |
| software as a medical device | mandatory | Risks: Physical or psychological harm to a user |
| SDK or client library | mandatory | Risks: Third-party dependency fails |
| stock trading app | mandatory | Risks: Users or operators act on wrong numbers, Money leaves or fails to arrive |
| dating app | recommended | Becomes mandatory when matching, distance or eligibility rules change. |
| messaging app | recommended | Becomes mandatory when encryption, ordering or delivery receipt logic changes. |
| mobile banking app | recommended | Becomes mandatory when interest or fee calculation moves from the core platform into the bank's own code. |
| mobile game | recommended | Becomes mandatory when drop rates, rewards or pricing rules change. |
| neobank | recommended | Becomes mandatory when the neobank runs its own ledger instead of the partner bank's. |
| ride-hailing app | recommended | Becomes mandatory when the risk "Money leaves or fails to arrive" is attached to this product type with verified evidence (see the methodology). |
| subscription box service | recommended | Becomes mandatory when plans with different cycle lengths ship. |
| ecommerce store | optional | May help: discount stacking, tax and shipping rules can be checked in code without a deployed build. |
| electronic health record system | optional | May help on dose calculation, unit conversion and date logic in medication modules. |
| fleet and logistics tracking | optional | May help: duty-time arithmetic across midnight and timezones breaks quietly. |
| government services portal | optional | May help where eligibility rules change by law. |
| grocery delivery app | optional | May help when fees vary by basket size or region. |
| smart home or IoT app | optional | May help: schedule logic breaks quietly across daylight saving changes. |
| kids app | optional | May help where gate logic is custom. |
| language learning app | optional | May help where streak complaints appear after travel. |
| LLM-based assistant | optional | May help: catches template and parsing breaks without calling the model. |
| online marketplace | optional | May help: fee, tax and payout split arithmetic can be checked in code without a deployed build. |
| mental health app | optional | May help on the logic that decides which screens show crisis resources and which events go to analytics. |
| patient portal | optional | May help on the rules that decide which results a proxy or adolescent account can see. |
| pharmacy delivery app | optional | May help: checks days-supply arithmetic and refill-date calculation without a deployed build. |
| social network | optional | May help: age and visibility rules have fixed inputs and outputs. |
| telemedicine app | optional | May help on the scheduling code that maps appointment times across the patient's and clinician's time zones. |
| event ticketing platform | optional | May help when fees vary by venue or price tier. |
| travel booking app | optional | May help when fees vary by supplier or country. |
| video conferencing tool | optional | Optional: supports the intruder cases with code-level checks on meeting ID generation. |
| wearable companion app | optional | May help: checks on unit conversion and threshold logic before device testing. |
| EV charging app | not needed | Not needed as a separate item: price and kWh calculations are covered by data integrity checks. Becomes optional when tariff logic moves into the app. |
| peer-to-peer payment app | not needed | Not needed as a separate plan item: fee and limit rules are checked inside e2e and data-integrity runs. Becomes recommended when fee tiers or limits vary by user type. |
Done conditions used on playbook pages
Each mandatory cell has its own done condition, written for that product type.
- accounting and invoicing SaaS (Fintech): VAT, sales tax and rounding on invoice lines match a reviewed table for each tax rate and currency offered, including credit notes.
- buy now pay later service (Fintech): Instalment split, rounding of the last instalment and late-fee caps match a reviewed table for each plan length and currency offered.
- clinical trial management software (Healthcare): Every combination of randomisation strata allocates from the expected table, and dose calculations match the protocol table at each weight boundary.
- crypto exchange (Fintech): Margin, liquidation and fee rules return the expected result for each test case, and no account flag bypasses liquidation without a recorded approval.
- data pipeline (Infrastructure and developer products): Each transform returns the documented output for empty files, oversized files, null keys, duplicate keys and timezone boundaries.
- desktop application (Infrastructure and developer products): In the test report, the cleanup and repair code refuses to delete the home folder, the root folder, an empty path or any folder the app did not create.
- e-signature service (B2B SaaS): In the test report, every unchanged sample document passes signature validation and every sample with a changed byte or page fails it.
- email marketing platform (B2B SaaS): The suppression step drops every unsubscribed, bounced and complained address from a fixed send list before the send queue is built.
- ERP system (B2B SaaS): Each pay rule returns the expected amount for fixed edge cases: mid-period hire, retroactive raise, unpaid leave and termination.
- expense management tool (Fintech): Currency conversion, per diem and mileage amounts match a reviewed table for each rate and country the tool supports.
- identity and access management service (B2B SaaS): Credential and cache-key checks refuse a wrong password for usernames of every length in the fixed sample set, including the longest the directory allows.
- insurance app (Fintech): For a reviewed set of test drivers and homes, the rating engine returns the same premium as the filed rate tables, factor by factor.
- lending platform (Fintech): APR, amortization schedule and late-fee results match a reviewed spreadsheet for every loan product, including month-end and leap-day due dates.
- loyalty program app (Commerce): For a fixed set of sample members, redemption prices for points earned before a terms change stay at the old award price, and earn rules for each tier and promotion produce the points listed in the program terms.
- machine learning model service (Infrastructure and developer products): In the test report, every missing, out-of-range and low-quality sample input gets its documented value, and every sample score comes back with at least one reason.
- software as a medical device (Healthcare): Dose and threshold inputs written as ".5", "0.5", "5" and with a comma decimal each produce the intended value or a rejection, never a different dose.
- SDK or client library (Infrastructure and developer products): In the test report, every server-sent config and response field in the fixed sample set passes with a null, wrong-type and missing value and no crash.
- stock trading app (Fintech): Buying power, margin and options collateral calculations match a reviewed table for cash, margin and options accounts, including after a partial fill.
Tools
Alphabetical. Not recommendations.
unit tests
- JestJavaScript test runner with mocking and snapshots. webapiopen-source
- JUnitTest framework for the JVM. apiandroidopen-source
- pytestTest framework for Python with fixtures and plugins. apiopen-source
- VitestTest runner for Vite-based JavaScript and TypeScript projects. webapiopen-source
- XCTestApple's framework for unit and UI tests. iosopen-source