Ticket LS-415 from Tom: “The discount checks are red. Make them green before the 5 pm release.”
Chapter 5 of 7
Green by cheating
Release day. Tom’s ticket asks the agent to make the red discount checks green before 5 pm, and it does.
This chapter: Does green tests always mean the code is right?
About this chapter
You will learn
- An agent can pass a test by weakening it
- Done means what the tests check
- The host can protect test files
Words you’ll meet
- Weakened test
- A test changed so it checks less, and passes code it used to fail.
- Protected file
- A file the host refuses to let the agent edit, whatever it asks.
Step 1 of 6
The agent runs the tests first: two red. It fixes the 50-item threshold and runs them again.
Step until one test is left.