Software Testing · Unit 4

System
Testing

How we tested a real, live product, Peeerly, and what famous failures teach us about testing whole systems.

peeerly.tech9/9 live tests passed26 slides
$ node tests/system-smoke.mjs
9/9 passed

Press → or Space to start · O overview · F full screen

Roadmap

What we'll cover

01

Why it matters

Real failures that cost millions

02

What it is

Levels, V-model, a car analogy

03

Plan & design

Use cases → test cases, BVA, decision tables

04

Execute

Race conditions, CI pipelines, bug life cycle

05

Coverage

Use-case coverage and traceability

06

Stress testing

Strategies, launch-day disasters, our results

07

Findings & lessons

What we found in Peeerly and how real-world failures shaped our tests

01 · Why it matters

When systems fail in the real world

2012$440M

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.

20248.5M

Windows PCs crashed

CrowdStrike

One faulty security update went to every customer at once. Airlines, banks and hospitals stopped.

20136

people enrolled on day one

Healthcare.gov

About 250,000 visitors arrived on launch day, far more than the site was built and tested for.

199637 s

after launch, rocket lost

Ariane 5

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

Each test level checks one design phase

RequirementsSystem design (SRS)ArchitectureModule design Codechecks Unit testingIntegration testingSystem testingAcceptance testing

Left side: build it. Right side: check it. System testing proves the finished product meets the system requirements specification.

02 · What it is

System testing, defined

Testing the complete, integrated software against its requirements, from the user's side, in an environment that looks like production.

Characteristics

Black-boxEnd to endProduction-likeIndependent testersFunctional + non-functional

Entry criteria

  • Integration tests passed
  • Build deployed to a test environment
  • Test cases written and reviewed

Exit criteria

  • All critical test cases pass
  • No open P1 (urgent) bugs
  • Coverage target reached

02 · Real-world analogy

Testing a car, level by level

Unit

Test one spark plug on a bench

Peeerly: isAllowedEmail() accepts only college emails

Integration

Engine + gearbox, together

Peeerly: answer API saves the score in Postgres

System

Full test drive on a track

Peeerly: a student joins a quiz and sees the live leaderboard, on peeerly.tech

Acceptance

Customer's test drive before buying

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

Peeerly: one product, many moving parts

A

Login / Sign-up

Email + Google, college-email rule

Q

Live Quiz

Join by code, live leaderboard, PDF report

P

Polls & SeatLock

First-come elective seats, live wall

E

Placement experiences

Share and verify interview rounds

R

Admin & roles

Permissions, suspensions, audit log

Studentbrowser / phone Next.js 16on Vercel Neon Postgres Better Auth Supabase Realtime AWS S3 (files) Resend (email) OpenAI (questions)

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

Ten kinds of system testing, all on Peeerly

Functional

Join a quiz, book a seat, post an experience

Regression

Re-run all 17 tests after every deploy

Performance

Login page answers in under 800 ms (p95)

Load

A class of 60 in one live quiz

Stress

Push past 250 users to find the limit

Security

Private APIs return 401 without login

Usability

Clear errors, mobile tab bar, dark mode

Compatibility

Chrome, Firefox, Safari, phones under 768 px

Recovery

Refresh mid-quiz and rejoin with your score

Deployment

Smoke test right after each Vercel deploy

03 · Plan

Our system test plan

Scope

In: auth, quiz, polls & SeatLock, placements, admin roles.

Out: Google's own login screens, quality of AI-generated questions.

Environment

Live site: read-only checks and a gentle load test.

Local copy: anything that writes data, plus heavy stress.

Tools

Node smoke script · k6 · Chrome DevTools · Lighthouse · two browsers for race tests

Deliverables

Test case sheet (17) · run log · bug reports · coverage report · this deck

Risk we planned for

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

The ATM: one use case, five test cases

Use case · Withdraw cash
Main flow
  1. Insert card
  2. Enter PIN
  3. Enter amount
  4. Take cash and card
Alternate flows
  • 2a Wrong PIN three times
  • 3a Amount is more than the balance
  • 3b Amount isn't a multiple of ₹100
  • 3c ATM doesn't have enough cash
TC-A1₹2,000, balance ₹10,000Cash + receipt, balance ₹8,000
TC-A2Wrong PIN ×3Card kept, account locked
TC-A3₹50,000, balance ₹10,000"Insufficient funds"
TC-A4₹1,050"Multiples of ₹100 only"
TC-A5ATM holds ₹1,000, ask ₹2,000"Cannot dispense"

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

Peeerly: student joins a live quiz

UC-03
Actor: studentPre: teacher started a session
Main flow
Alternate flow
TC-11PASS · automated
Join with code 000000

Expected 404, "session not found". Live site returned 404.

TC-12MANUAL
Join with a valid code

Lobby shows my name and avatar; presenter counts +1.

TC-13MANUAL
Answer in time

Score saved; leaderboard updates live for everyone.

03 · Test design · from Units 1–2, at system level

Boundaries and classes from our real code

Boundary values · sign-up name must be 2–50 characters

from validation/auth.ts: .min(2).max(50)

acceptreject6 tests instead of 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

Equivalence classes · password

rule: 8+ chars, upper, lower, digit, one of @$!%*?&

ClassExampleResult
ValidPeeerly1!accept
Too shortPe1!reject
No uppercasepeeerly1!reject
No digitPeeerly!!reject
Other symbolPeeerly1!#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

Decision table: will the password be accepted?

ConditionsR1R2R3R4R5R6
C1 · 8 or more charactersYNYYYY
C2 · has upper and lower caseY–NYYY
C3 · has a digitY––NYY
C4 · has one of @$!%*?&Y–––NY
C5 · uses only allowed charactersY––––N
ActionAcceptRejectRejectRejectRejectReject*
Test valuePeeerly1!Pe1!peeerly1!Peeerly!!Peeerly12Peeerly1!#

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

All 17 test cases

IDUse caseInput / actionExpected resultStatus

04 · Execute · a bug only system testing can catch

Two students, one seat

A
Student A
1seat left
"AI elective"
B
Student B
Real world · Therac-25, 1985–87

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

How companies run system tests

Run it once normally, then switch the bug on and run it again.

04 · Real world

What happens when the execution system is skipped

2012 Knight Capital

  1. New code is copied by hand to 8 servers
  2. One server is missed and keeps old, retired code
  3. A reused flag wakes that old code at market open
  4. $440M lost in 45 minutes; the firm is sold soon after

Lesson: automated deploys + a smoke test on every server after release.

2024 CrowdStrike

  1. A routine content update for the Falcon sensor is built
  2. A bug in the validator lets the broken file pass
  3. It ships to all customers at once, with no staged rollout
  4. ~8.5 million Windows PCs crash; flights grounded worldwide

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

A bug's life, and how urgent it is

reopened if retest fails
Severity →
High sev · High priority

Dashboard opens without login

High sev · Low priority

PDF report crashes for a 500-question quiz (rare)

Low sev · High priority

"Peeerly" misspelled on the landing page

Low sev · Low priority

Typo in an admin audit-log tooltip

Priority (how soon to fix) →

Severity = how bad the damage is. Priority = how soon we must fix it.

05 · Coverage metric for system testing

How much of Peeerly did we test?

Test cases per use case

DesignedExecuted by script
Use-case coverage = use cases with ≥ 1 executed testall use cases

05 · Coverage

Traceability: every requirement has a test

covered by an automated test that passedcovered by a manual testAn empty row would mean an untested requirement.

06 · Non-functional · stress testing strategies

Four ways to push a system

time →users

06 · Real world · load and stress

Launch day: when everyone arrives at once

capacity it was tested for HTTP500 before launchgates open
Ticketmaster · 2022

Taylor Swift presale: 3.5 billion system requests, 4× its previous peak. Queues froze, sale paused.

Healthcare.gov · 2013

~250,000 visitors on day one; only 6 people enrolled.

Flipkart Big Billion Day · 2014

The site slowed and crashed; the founders emailed every customer to apologise.

Hotstar · 2019

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

1 → 40 users, zero errors

228requests sent
0errors
176requests / second at 40 users
511 msp95 at 40 users (target < 800 ms)

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

What we found in Peeerly

✓

Access control holds

Every private page redirected to login; every private API answered 401.

✓

Scales smoothly to 40 users

0 errors; p95 249 → 511 ms; 176 requests per second.

!

Cold start on first visit

First landing load took 2.2 s, later pages 0.2–0.7 s. Fix: cache the landing page.

!

Rate limit is per server

Counts live in memory, so each Vercel instance counts on its own. Fix: shared store such as Redis.

✗

Password rule rejects valid-looking passwords

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

From famous failures to our test cases

Therac-25 · race conditionTC-14 two students book the last seat together
Healthcare.gov · launch-day loadSpike test: the whole class joins one quiz in 10 s
Knight Capital · one server missedSmoke test (9 checks) after every deploy
CrowdStrike · shipped to everyone at oncePreview deploy tested before it reaches peeerly.tech
Ariane 5 · reused code, new conditionsRegression: re-run all 17 tests whenever shared code changes

Conclusion

Thank you.
Questions?

System testing checks what users actually experience: the whole product, working together, under real conditions.

Use cases → test casesUse-case coverageStress strategiesIndustrial execution
stp.peeerly.techopen these slides on your phone