lost in 45 minutes
Knight Capital
New trading code reached 7 of 8 servers. The 8th still ran old code that bought and sold wildly.
Software Testing · Unit 4
How we tested a real, live product, Peeerly, and what famous failures teach us about testing whole systems.
Press → or Space to start · O overview · F full screen
Roadmap
Real failures that cost millions
Levels, V-model, a car analogy
Use cases → test cases, BVA, decision tables
Race conditions, CI pipelines, bug life cycle
Use-case coverage and traceability
Strategies, launch-day disasters, our results
What we found in Peeerly and how real-world failures shaped our tests
01 · Why it matters
lost in 45 minutes
New trading code reached 7 of 8 servers. The 8th still ran old code that bought and sold wildly.
Windows PCs crashed
One faulty security update went to every customer at once. Airlines, banks and hospitals stopped.
people enrolled on day one
About 250,000 visitors arrived on launch day, far more than the site was built and tested for.
after launch, rocket lost
Software reused from Ariane 4 overflowed on the faster new rocket. It worked fine in the old system.
None of these was one broken function. Each was the whole system meeting the real world, and that is exactly what system testing checks.
02 · What it is
Left side: build it. Right side: check it. System testing proves the finished product meets the system requirements specification.
02 · What it is
Testing the complete, integrated software against its requirements, from the user's side, in an environment that looks like production.
02 · Real-world analogy
Peeerly: isAllowedEmail() accepts only college emails
Peeerly: answer API saves the score in Postgres
Peeerly: a student joins a quiz and sees the live leaderboard, on peeerly.tech
Peeerly: faculty approve SeatLock for elective allotment
A perfect spark plug doesn't prove the car can drive. Each level catches bugs the level below can't see.
Our system under test
Email + Google, college-email rule
Join by code, live leaderboard, PDF report
First-come elective seats, live wall
Share and verify interview rounds
Permissions, suspensions, audit log
A unit test touches one box. A system test sends a real request through all of them, the way a student does.
02 · What it is
Join a quiz, book a seat, post an experience
Re-run all 17 tests after every deploy
Login page answers in under 800 ms (p95)
A class of 60 in one live quiz
Push past 250 users to find the limit
Private APIs return 401 without login
Clear errors, mobile tab bar, dark mode
Chrome, Firefox, Safari, phones under 768 px
Refresh mid-quiz and rejoin with your score
Smoke test right after each Vercel deploy
03 · Plan
In: auth, quiz, polls & SeatLock, placements, admin roles.
Out: Google's own login screens, quality of AI-generated questions.
Live site: read-only checks and a gentle load test.
Local copy: anything that writes data, plus heavy stress.
Node smoke script · k6 · Chrome DevTools · Lighthouse · two browsers for race tests
Test case sheet (17) · run log · bug reports · coverage report · this deck
Testing on production can hurt real students. So on the live site we only read, and we kept the load test small (max 40 users, 228 requests).
03 · Use cases → test cases · classic example
Rule of thumb: every flow → at least one test case. Main flow gives positive tests, alternate flows give negative ones.
03 · Use cases → test cases · our project
Expected 404, "session not found". Live site returned 404.
Lobby shows my name and avatar; presenter counts +1.
Score saved; leaderboard updates live for everyone.
03 · Test design · from Units 1–2, at system level
from validation/auth.ts: .min(2).max(50)
Normal BVA min, min+1, max−1, max → 2, 3, 49, 50
Robust BVA adds min−1 and max+1 → 1 and 51
Worst case combines boundaries of name and password together
rule: 8+ chars, upper, lower, digit, one of @$!%*?&
| Class | Example | Result |
|---|---|---|
| Valid | Peeerly1! | accept |
| Too short | Pe1! | reject |
| No uppercase | peeerly1! | reject |
| No digit | Peeerly!! | reject |
| Other symbol | Peeerly1!# | reject ?! |
The last row satisfies the rule shown to users, but # isn't in the allowed list, so it's rejected with the same message. See Findings.
03 · Test design
| Conditions | R1 | R2 | R3 | R4 | R5 | R6 |
|---|---|---|---|---|---|---|
| C1 · 8 or more characters | Y | N | Y | Y | Y | Y |
| C2 · has upper and lower case | Y | – | N | Y | Y | Y |
| C3 · has a digit | Y | – | – | N | Y | Y |
| C4 · has one of @$!%*?& | Y | – | – | – | N | Y |
| C5 · uses only allowed characters | Y | – | – | – | – | N |
| Action | Accept | Reject | Reject | Reject | Reject | Reject* |
| Test value | Peeerly1! | Pe1! | peeerly1! | Peeerly!! | Peeerly12 | Peeerly1!# |
6 rules → 6 test cases. R6* is a usability bug: the error says "add a special character", but the password already has one.
03 · System-level test cases
| ID | Use case | Input / action | Expected result | Status |
|---|
04 · Execute · a bug only system testing can catch
A radiation-therapy machine had a race condition: when operators edited settings quickly, it could fire a massive overdose. Six known accidents. Each part worked alone; the timing bug appeared only in the full system.
04 · Industrial test execution system
Run it once normally, then switch the bug on and run it again.
04 · Real world
Lesson: automated deploys + a smoke test on every server after release.
Lesson: test the real artifact on a few machines first (canary), then roll out.
In Peeerly: Vercel builds a preview for every change, our smoke test runs against it, and only then does it go to peeerly.tech.
04 · Execute · when a test fails
Dashboard opens without login
PDF report crashes for a 500-question quiz (rare)
"Peeerly" misspelled on the landing page
Typo in an admin audit-log tooltip
Severity = how bad the damage is. Priority = how soon we must fix it.
05 · Coverage metric for system testing
05 · Coverage
06 · Non-functional · stress testing strategies
06 · Real world · load and stress
Taylor Swift presale: 3.5 billion system requests, 4× its previous peak. Queues froze, sale paused.
~250,000 visitors on day one; only 6 people enrolled.
The site slowed and crashed; the founders emailed every customer to apologise.
25.3 million watched one cricket match at the same time, a record, after rehearsing with large load tests.
06 · Our ramp-up test on peeerly.tech · 27 Nov 2026
p95 = 95% of requests were faster than this. We stayed gentle on production; the 250-user k6 breakpoint test is for a local copy.
07 · Results
Every private page redirected to login; every private API answered 401.
0 errors; p95 249 → 511 ms; 176 requests per second.
First landing load took 2.2 s, later pages 0.2–0.7 s. Fix: cache the landing page.
Counts live in memory, so each Vercel instance counts on its own. Fix: shared store such as Redis.
Found while designing equivalence classes. Peeerly1!# meets the rule shown to users but is rejected, because only @$!%*?& are allowed. Fix: allow any symbol, or name the allowed ones in the message. To confirm on the live form: TC-03 variant.
07 · Lessons
Conclusion
System testing checks what users actually experience: the whole product, working together, under real conditions.