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.
🎯 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.
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
- An overview of HTTP · MDN
- OWASP Top Ten · OWASP
- Accessibility · MDN
Official sources, checked on 5 Nov 2026. Cloud services change often; check the official page before relying on a feature. All references