Skip to main content

Updated for Fall 2026

This activity is part of Milestone 5 — see that page for the milestone’s deliverables, rubric, and deadlines.

What Happens When It Goes Wrong?

Your interface works. You have clicked through it, your system tests pass, and the demo will go fine.

All of that is the happy path. The parts of a frontend that fail in the real world are the parts nobody exercises while building it: the backend is down, the recipe was deleted by someone else thirty seconds ago, the form was submitted twice, the list is empty, the response took four seconds. Students and professionals consistently ship interfaces that handle none of these, and it is not because they don’t know how; it’s because nobody ever made them look.

In Milestone 4 you asked whether your tests could catch a defect you injected. This milestone asks the other version of the question: can your interface survive a failure the world injects?

The frontend has no automated test suite, so the only way to answer this is to go and cause the failures. That is the activity.

This is an individual activity. Complete it in your individual repository, on the UC6 Order Beverage page you built for Milestone 5. Do it after UC6 is implemented and merged.

Stage 1: Enumerate

Ask your AI assistant what could go wrong.

I have a React page that lets a user order a beverage from a coffee
ordering system. Here is the component:
<paste your UC6 component and its service module>

Here is the use case it implements, including the alternative flows:
<paste UC6 from technical-documents/requirements.md>

And here are the endpoints it calls and what they return:
<paste the relevant part of technical-documents/backend-design.md>

List everything that could go wrong between the browser and the database
while a user is on this page. For each one, tell me how I could deliberately
cause it on my own machine. Do not tell me what my code does -- you cannot
see it running.

That last instruction matters. The assistant will happily tell you your page “handles this gracefully.” It is reading source code, not watching a browser. Its job here is to give you a list of things to try. You’ll have the opportunity to see if any of the suggestions actually cause problems.

If you are not using AI, build the list from the alternative flows in the use case plus this starting set: backend not running, resource deleted by another user, duplicate submission, empty list, slow response, invalid input that passes the browser’s own validation.

Stage 2: Provoke

Run the frontend with npm run dev, run the backend, and start breaking things.

Some that are easy to cause and will likley reveal issues. You’ll likely need multiple tabs or to run in different browswers for some of these examples:

  • Stop the backend and load the page. Try to submit something while the backend is stopped. Then start the backend and try to submit again.
  • Add a recipe and ingredients. Load the page to order the recipe. Then delete a recipe in another browser tab, then order it in another tab that loaded before the delete.
  • While the back end and frontend are running, empty the database. (Re)load the page and see what happens.
  • Submit the form twice quickly — double-click the button.
  • Order a beverage you cannot afford
  • Order a beverage when there’s not enough inventory
  • Enter a negative number, a decimal, or text where an integer belongs.
  • Throttle the network in your browser’s dev tools and watch what the page shows while it waits.

For each one, write down what actually happened. “Nothing happened and the console showed a 400” is a finding. “The page went blank” is a finding. “It worked correctly and showed ‘Not enough inventory’” is also a finding, and a good one.

Take a screenshot of anything that surprises you. They go in technical-documents/images/.

Stage 3: Decide and Fix

For each failure mode, decide: is the current behavior acceptable?

  • The use case says what should happen. If UC6 specifies an error message for insufficient payment and your page shows nothing, that is a defect and you fix it. You are expected to fix bugs where actual results are different from the requirements.
  • The use case doesn’t cover it. If the requirements don’t describe what should happen for situations like when the backend is done or there’s a double click, you will decide what should happen. Based on this decision, you will file an issue explaining what you would do. You do NOT need to fix bugs that are not part of the requirements.
  • It already behaves well. Say so and move on.

Fix the ones the requirements cover. File issues for the rest.

Deliverable: technical-documents/failure-modes-m5.md, containing

  • a table with one row per failure mode you tried
Failure mode How you caused it What the page did What it should do Fixed / Issue / OK
         
  • at least eight failure modes, of which at least three come from the alternative flows in UC6
  • screenshots of anything that failed badly
  • a note of which ones the assistant suggested and which you found yourself

Reflect

Record your reflection in retros/retro-m5.md in your individual repository. The milestone asks you specifically:

Which failure mode surprised you, and why hadn’t you thought of it?

Beyond that:

  • Which of the assistant’s suggestions turned out to be real problems on your page, and which were irrelevant?
  • Did it claim anything about your page’s behavior that turned out to be wrong when you checked?
  • How many of these would your frontend system tests have caught? Should some of these become system tests?
  • Do the team’s pages for UC2, UC4, UC5, and UC7 have the same gaps? They almost certainly do. Say so in your team’s channel — Milestone 6 is the demo, and this is the kind of thing that shows up in one.

Done Criteria

  • At least eight failure modes provoked on a merged, working UC6 page, including at least three from the use case’s alternative flows.
  • technical-documents/failure-modes-m5.md records what actually happened for each, with a decision.
  • Defects covered by the requirements are fixed and merged; the rest have issues.
  • retros/retro-m5.md is complete, including the surprise question.