Testing Medusa: What to Test, What to Skip, and How
Commerce code moves money, so untested checkout logic is a liability. A pragmatic test strategy — what earns its keep, and what is theatre.
Guides, architecture deep-dives and production notes on MedusaJS — the open-source, TypeScript-native commerce platform we build on.
Commerce code moves money, so untested checkout logic is a liability. A pragmatic test strategy — what earns its keep, and what is theatre.
Self-hosting means owning the question 'is checkout working?'. Structured logging, tracing, the four metrics that matter and alerts that do not cry wolf.
Four cache layers, one rule about carts, and the invalidation strategy that stops a price change taking twelve hours to appear.
The hard part of a commerce-plus-CMS setup is not the sync. It is deciding which system owns each field — and then never letting both own one.
Database search stops working sooner than you expect. Choosing an engine, building the index, and the sync strategy that survives a bulk import.
No shipping, no inventory, and a set of problems physical goods never have: secure delivery, licence enforcement, and tax charged where the customer is.
Multi-vendor commerce means splitting one customer order into several vendor orders, and moving money to people who are not you. The model and the money mechanics.
Recurring billing is a scheduling problem with money attached. The data model, the renewal workflow, and the failure handling that determines involuntary churn.
The four capabilities that separate B2B from DTC, modelled as Medusa modules and workflows — with the data model that makes approvals work.
Explicit prices per currency, price lists for sales and customer-group pricing, and the minor-unit arithmetic that makes zero-decimal currencies interesting.
Regions carry currency, tax, payment methods and shipping. How to model international selling without accidentally creating twelve stores.
Traffic does not break Medusa — the database does, then the workers, then the catalog queries. The bottlenecks in the order you will meet them.