Lion Cipher Lab

Property-fuzz your own API with Schemathesis (find the 500s your example tests miss)

Why it matters

Almost every team tests its API the same way: an engineer writes a handful of EXAMPLE tests -- 'send this user id, expect this user back' -- using the inputs they thought of. The problem is that attackers and reality do not stay inside the inputs you thought of. They send a zero where you expected a positive number, a 40-kilobyte string where you expected a name, a negative id, a Unicode surrogate, an empty body. Your example tests are green and your API still 500s in production on the first weird request, because a server error (HTTP 500) is not just an availability bug -- a stack trace can…

What you'll learn

Steps in this lab

  1. The idea: example tests vs a fuzzer that reads your schema
  2. Install the tools (one-time, from PyPI)
  3. Build a tiny API you OWN -- with two bugs planted on purpose
  4. Point Schemathesis at your schema and watch it break your API
  5. Read the MINIMAL reproducer, then fix the crash
  6. Re-run green -- but only after documenting the 400
  7. Go stateful: test sequences, not just single calls
  8. Gate CI: make the fuzzer fail the build, deterministically
  9. The judgment: what a schema fuzzer can and CANNOT find

Open the full interactive lab →