A surprising number of address forms treat "state" as decoration — a dropdown you pick from and never think about again. Then someone enters an address in Oregon, Delaware, New Hampshire or Montana and a piece of downstream logic makes a very confident, very wrong assumption: that a sales tax line always exists.

The state field is not just a label

If your product touches pricing, invoicing or checkout, the state is input to real logic. A few examples that show up in production bugs:

  • Tax calculation assuming every US state has sales tax. Oregon, Delaware, New Hampshire and Montana do not.
  • Validation rules keyed off a fixed list of state codes that quietly omits territories or newer abbreviations.
  • Analytics bucketing that collapses addresses into regions and loses the edge cases entirely.

None of these are exotic. They are normal addresses from normal customers. The reason they reach production is that nobody put them in the test data.

A fixture should be boring and awkward at the same time

The classic test record — John Doe, 123 Main St, Springfield, 12345 — is a gift to the implementation. It has no unit number, an unremarkable ZIP, a name that fits every field, and a state that is probably first in the dropdown. It proves the happy path works, which you already knew.

The records worth keeping are the ones that make you uncomfortable:

  • A ZIP that begins with 0, to catch validators that coerce strings to integers.
  • A unit designator like Apt 4B, Suite 200 or #12 in a single street field.
  • A name with a hyphen, an apostrophe, or a family name longer than the input's maxlength.
  • An address in a tax-free state, to exercise the no-tax branch of your pricing code.
  • A non-US format, if the product claims international support.

Keep the fixtures, not just the one-off test

Anyone can generate one address. The valuable thing is getting a hundred into the shape your test harness expects, then keeping them forever.

AddressLab is a free, no-sign-up generator for exactly this. It produces synthetic US address records with state, ZIP, phone, email format and a formatted full address field, plus multi-country formats and tax-free state addresses. You can save generated records locally and export the selected fields as CSV or JSON, check the file into the repo, and now every CI run exercises the same awkward cases. Six months later, when someone "simplifies" the ZIP validator or the tax branch, the regression fails on the same input that broke it the first time.

Two boundaries worth stating out loud: generated addresses are for development, testing, education and prototypes — they are not real identities and will not receive mail. The generated email is a format placeholder for validation, storage, display and export testing; use a mailbox your team controls if you need to test delivery.

A fixture that looks deliverable is exactly how a prototype gets mistaken for production data. A test address should be obviously disposable. Without a stored fixture, a regression is discovered by a customer. With one, it is discovered by a build.