Lite / Building Machines That Respond / Week 33
A test plan that could prove you wrong
You test your gripper on the egg and it works. Then the bolt slips and the cup crushes. Did testing fail you, or did you test too little?
Why should I care?
Testing only the cases you expect to pass is the most common way engineers fool themselves. A plan written before the test, with a prediction, makes it impossible to quietly move the goalposts afterwards.
- Write a test plan: question, cases, prediction, pass criteria and what would change your mind.
- Cover every combination of the important conditions, including the edges, in a test matrix.
- Report a pass rate together with which cases failed and why.
Predict
In the test harness, a gripper uses one fixed squeeze for an egg, a bolt, a tomato and a paper cup, on rubber or plastic pads, at two lift speeds. Can any single squeeze pass all 16 cases?
- Yes, around 3 N
- Yes, around 5 N
- No: some cases need more squeeze than others can survive
Guess first, then reveal
No. The bolt on plastic pads needs about 3.9 N even on the gentle lift, but the paper cup crushes above 3 N. The requirements conflict for a fixed squeeze, and only a full test matrix reveals it. The fix is a design change, not a better number.
Discover
Before each run, set your predicted pass rate. Try squeezes of 1 N, 3 N and 5 N, then add the edge cases. Record each pass rate and which cases failed. Can you explain every failure from the 'needs' and 'crush' columns?
What the interactive shows (text version)
The test harness sets one fixed squeeze force, a required grip safety factor and an option for edge cases. Before running you enter a predicted pass rate. Running fills a table with every case (object, pad, lift acceleration, squeeze needed, crush limit, result) and reports the pass rate against your prediction. The bolt on plastic needs more than 3 N while the cup crushes above 3 N, so no single squeeze passes every case.
Understand
Write the plan first
A test plan states: the question ('does one fixed squeeze meet R2 and R3 for every object?'), the cases (objects × pads × lift speeds), the prediction, the pass criteria (squeeze ≥ needed and ≤ crush limit) and what would change your mind ('if any case fails, the fixed-squeeze design is rejected'). Writing it before running stops you explaining away surprises.
Cover the matrix and the edges
Failures hide in combinations: heavy and slippery, light and fragile. Run every combination of the conditions that matter; with 4 objects, 2 pads and 2 speeds that is 4 × 2 × 2 = 16 cases. Then add edge cases at the limits of what's allowed, such as an emergency lift. If the full matrix is too big, explain how you chose a subset.
Report like an engineer
Give the pass rate and the list of failing cases with the reason for each: 'bolt on plastic at 4.9 m/s² slipped: needs 4.9 N, squeeze 3 N'. A 94% pass rate means nothing if the failing 6% is the safety case. Compare with your prediction and say what you learned.
Explain it another way
Intuitive
A good test is a fair attempt to break your design. If you only try the easy cases, you're not testing; you're hoping.
Technical
Full-factorial testing runs every level of every factor. Pass/fail per case against stated acceptance criteria; summarise with a pass rate and a failure list. Pre-registering the prediction separates confirmation from exploration.
Mathematical
Bolt (0.2 kg) on plastic (μ = 0.3) at 4.9 m/s²: needs 0.2 × (9.81 + 4.9) ÷ (2 × 0.3) ≈ 4.9 N per finger. Paper cup crushes above 3 N. No fixed squeeze satisfies both.
Applied
Software teams keep test suites that run every case after every change; hardware teams keep test matrices and re-run them before each design review.
Worked example 1
A sorter must be tested at 3 belt speeds, with 4 part types, in 2 lighting conditions. How many cases? Which edge case would you add?
3 × 4 × 2 = 24 cases. Edge cases: the fastest speed in the worst lighting with the hardest-to-see part, and a sensor that gives an impossible reading.
Common mix-ups
A high pass rate means the design is good.
✓ Look at which cases failed. One failed must can sink the design.Testing is for checking the design works.
✓ Testing is for finding out whether it works, so a good test plan tries hard to break it.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Write a one-page test plan for your capstone: the question, the factors and their levels, the full case count, at least two edge cases, pass criteria for each requirement, your prediction, and what result would make you change the design. Run it in your chosen Build or lab and record the results table.
Reflect
Which failure surprised you in the test harness? What would you have missed with only three test cases?
Write your answer on paper or in your own notes. Lite never stores what you write.