👑 Premium Sign in Sign up

CSE32 · Web, API & secure coding

Unit Test Challenge

The function is written. Your job is the tests: find the inputs that break a buggy version.

📶 L200⏱ 30 min🧪 Live lab

🎯 You will learn to

  • Write assert-based tests
  • Think of edge cases
  • Use tests to catch a bug

🧪 Live environment

Runs entirely in your browser: nothing is installed, no real cloud account is used and your code is never sent to our server.

Loading the lab…

✅ Steps & checkpoints

🗺️ Tests against a buggy version

Your tests run against the correct function and a hidden buggy one; a good test passes on the first and fails on the second.

Tests against a buggy versionYour tests run against the correct function and a hidden buggy one; a good test passes on the first and fails on the second.Your testcasesCorrectfunctionBuggymutantTest runnerMust passMust failBugscaughtPerson / clientComputeTool / stepOperationsApp / UI

The 2D diagram shows the exact flow, ports and trust boundaries. The 3D scene is a concept view of the same parts; packets travel along the same arrows.

🤔 Think about it

What is an edge case for a function that splits a bill?

🛡️ Safety & cost

The APIs are mocks inside this page. Identities and data are fictional.

🧹 Cleanup

Nothing to clean up.

📚 Reference documents

Official sources, checked on 5 Nov 2026. Cloud services change often; check the official page before relying on a feature. All references