Test design techniques & BVA
How to choose a few smart test cases instead of many random ones. The interviewer asked a boundary value question about a snowflake at 5 °C — this chapter gives you a perfect, complete answer and lets you play with it.
- Don't test random values. Test smart values.
- EP: split values into groups (cold / warm) and test one value from each group.
- BVA: bugs hide at the edges, so test the edge and its neighbours: 4.9, 5.0, 5.1.
- For the snowflake: first ask what happens at exactly 5.0 °C, then test both directions (colder and warmer).
Think of it like a lift for max 8 people. You don't test it with 2 people. You test it with 7, 8 and 9 people, because that is where it can go wrong.
See it as a picture: BVA on a number line · Hysteresis
Why we need techniques
You can't test every value (principle: exhaustive testing is impossible). Temperature can be −40.0, −39.9, −39.8 … 85.0 °C: that is 1,251 values. Techniques tell you which few values find the most bugs.
| Family | Techniques | Based on |
|---|---|---|
| Black-box (specification-based) | Equivalence partitioning, Boundary value analysis, Decision tables, State transition testing | The requirements (your main tools) |
| White-box (structure-based) | Statement coverage, branch coverage | The code (mostly developers) |
| Experience-based | Error guessing, Exploratory testing, Checklist-based testing | Your knowledge and experience |
Equivalence partitioning (EP)
Split all possible inputs into groups that the system treats the same way (partitions). If one value from a group works, the others probably work too. So test one value per group, including the invalid groups.
| Partition | Values | Valid? | Test value |
|---|---|---|---|
| Below range | < 0 | Invalid | −1 (try turning below 0: must stay 0) |
| In range | 0 … 40 | Valid | 20 |
| Above range | > 40 | Invalid | 41 (try turning above 40: must stay 40) |
3 partitions → 3 test cases instead of 42.
More car examples: fan speed 1–7 (valid) vs 0 and 8 (invalid); gear P/R/N/D (each gear is its own partition); phone types iPhone / Android; language groups: left-to-right vs right-to-left scripts.
Boundary value analysis (BVA)
Bugs love edges. Developers often write < when they meant ≤ (or the other way round). So test exactly on the boundary and right next to it. BVA is an extension of EP: you take the edges of each partition.
2-value and 3-value BVA (ISTQB v4.0)
| 2-value BVA | 3-value BVA | |
|---|---|---|
| Values per boundary | The boundary + its nearest neighbour in the other partition | The boundary + both neighbours |
| Volume max = 40 | 40, 41 | 39, 40, 41 |
| Volume min = 0 | −1, 0 | −1, 0, 1 |
| When to use | Normal features | Safety-relevant or tricky features (stronger) |
The "step size" (resolution) decides the neighbours
The neighbour is one step away, and the step is the smallest change the signal can make:
- Integer values (volume, fan level): step = 1 → 39, 40, 41.
- Temperature signal with 0.1 °C resolution: step = 0.1 → 4.9, 5.0, 5.1.
- Temperature signal with 0.5 °C resolution (factor 0.5 in the DBC!): step = 0.5 → 4.5, 5.0, 5.5. You can't even send 4.9!
Always ask for the signal resolution. Knowing that the DBC factor defines the smallest step impresses interviewers, because it connects test theory with real automotive signals.
"Below 5" vs "5 and below": open and closed boundaries
| Requirement wording | Maths | At exactly 5.0 °C | Values to test (step 0.1) |
|---|---|---|---|
| "below 5 °C" | T < 5 | OFF | 4.9 (ON), 5.0 (OFF), 5.1 (OFF) |
| "5 °C and below" / "at or below 5" | T ≤ 5 | ON | 4.9 (ON), 5.0 (ON), 5.1 (OFF) |
| "above 4 °C" | T > 4 | at 4.0: not above | 3.9, 4.0, 4.1 |
Only the value exactly on the boundary changes between the two wordings. That's why 5.0 is the single most important test value.
The snowflake question: the full answer
This is the exact scenario from your interview:
- The snowflake (ice warning) appears when the outside temperature goes below 5 °C.
- It stays displayed while the temperature is low.
- It disappears when the temperature rises above 4 °C (other version: "at 4 °C or above").
Step 1: Spot the problem in the requirement (this impresses!)
Look closely: it appears below 5 but disappears above 4. What happens at 4.5 °C? Going down, 4.5 is below 5 → ON. Going up, 4.5 is above 4 → OFF. The requirement contradicts itself between 4 and 5 °C.
Real cars solve this with hysteresis: two different thresholds, one for switching ON and one for switching OFF, with a zone in the middle where the icon keeps its previous state. It stops the icon from flickering when the temperature hovers around one value (4.9, 5.0, 4.9, 5.0…).
"Before choosing values, I'd clarify the requirement, because 'appears below 5' and 'disappears above 4' overlap between 4 and 5 degrees. I'd confirm whether it's a hysteresis — for example ON at 4 °C or below and OFF at 5 °C or above, keeping its state in between — and I'd ask about the signal resolution, the reaction time, and what happens when the sensor fails."
Step 2: Choose the test values
Assuming the clarified rule above and a resolution of 0.1 °C (3-value BVA on both boundaries):
| Temperature | Coming from warm (falling) | Coming from cold (rising) | Why this value |
|---|---|---|---|
| 5.1 °C | OFF | OFF | Just above the upper boundary |
| 5.0 °C | OFF | OFF (switches off here) | On the upper boundary |
| 4.9 °C | OFF (hold) | ON (hold) | Just below the upper boundary |
| 4.1 °C | OFF (hold) | ON (hold) | Just above the lower boundary |
| 4.0 °C | ON (switches on here) | ON | On the lower boundary |
| 3.9 °C | ON | ON | Just below the lower boundary |
If instead the rule is the simple "ON below 5 °C, OFF at 5 °C or above" (the version in your notes), the core values are 4.9 → ON, 5.0 → OFF, 5.1 → OFF. The notes' table (3, 4, 4.9, 5, 5.1, 6 °C) is the same idea: normal values on each side plus the values at and around the boundary.
Don't only test "normal" values like 0 °C and 10 °C. Those are equivalence partitioning values. They will pass even if the developer used the wrong comparison. BVA is about the values at and around the boundary.
Step 3: Test both directions and the transitions
- Falling 6 → 5.1 → 5.0 → 4.9 → 4.1 → 4.0 → 3.9: note exactly when it switches ON.
- Rising 3 → 3.9 → 4.0 → 4.1 → 4.9 → 5.0 → 5.1: note exactly when it switches OFF.
- Oscillation: 4.9 ↔ 5.0 ↔ 4.9 many times → no flicker.
- Hold time: keep each value for a few seconds (or the time in the spec) before judging; check the reaction time.
- How: step the signal in CANoe (panel slider or a CAPL script), record the screen and the trace.
Step 4: Extra cases a strong tester adds
- Signal minimum and maximum (e.g. −40 °C and 85 °C).
- Invalid / SNA value and timeout (sensor failure) → no snowflake, dashes shown (per spec).
- Ignition cycle while the icon is ON → correct state after restart.
- °F setting: 41 °F = 5 °C, 39.2 °F = 4 °C; the logic must still use the same thresholds.
- Display rounding: signal 4.96 might be displayed as "5.0" — is the icon logic based on the raw value or the rounded one?
- Related: an ice warning pop-up/chime may also appear — test it together.
Try it: snowflake simulator
Choose a rule, then move the temperature. Watch when the icon switches. Use the ±0.1 buttons to feel how the direction matters with hysteresis.
History: –
Step 5: If it fails, report it
Interviewer: "The snowflake appears at 5.0 °C, but the requirement says only below 5 °C. What do you do?"
- Check the CAN trace: was the signal really 5.0 °C (not 4.96 displayed as 5.0)?
- Repeat 3 times: is it reproducible? Test both directions.
- Check the requirement version and whether this is already reported (search Jira).
- Raise the ticket:
Summary : [Cluster] Ice warning (snowflake) shown at exactly 5.0 °C; REQ-HMI-TEMP-012 requires < 5.0 °C
Environment : SW 24.3.1, bench B-03, HW C-sample, variant EU, language EN, units °C
Precondition: Ignition ON, cluster started, Outside_Temp = 6.0 °C for 3 s
Steps : 1. CANoe: set Outside_Temp = 5.0 °C
2. Wait 3 s and observe the cluster
Expected : No snowflake at 5.0 °C (REQ-HMI-TEMP-012)
Actual : Snowflake shown after 0.4 s
Repro rate : 3/3 (also when rising from 4.0 °C)
Evidence : video, CAN trace (.blf, 10:15:32 = raw 0x5A = 5.0 °C), DLT log
Analysis : Correct value on the bus; cluster logic likely uses <= instead of <
Impact : False ice warning at exactly 5.0 °C; all variants using this logic
Severity : Minor/Major per project definitions Links: TC-TEMP-003, REQ-HMI-TEMP-012
Follow-up questions (Q62–69) with short answers
Q62Why is BVA useful in automotive testing?
Cars are full of thresholds: speed chimes, low fuel, tyre pressure, temperature warnings, battery levels. Off-by-one mistakes (< vs ≤) at these thresholds are very common, and some are safety-relevant. BVA finds them with very few test cases.
Q63What is the difference between BVA and equivalence partitioning?
EP divides the inputs into groups that behave the same and tests one representative value per group, for example "cold" and "warm". BVA tests the edges between those groups: the boundary value and its neighbours. They are used together: EP finds the groups, BVA tests their edges.
Q64How many test cases for one boundary?
Two with 2-value BVA (the boundary and the nearest value on the other side), three with 3-value BVA (the boundary and both neighbours). For safety-related thresholds I use 3-value.
Q65"Below 5 °C" vs "5 °C and below"?
Only the value 5.0 changes. "Below 5" means 5.0 is OFF; "5 and below" means 5.0 is ON. That's why testing exactly 5.0 is essential, and why I clarify the wording before testing.
Q66How would you test the transition 4 → 5 → 6 °C?
Start clearly cold so the icon is ON, then increase the signal in 0.1 steps through 4.0, 4.1 … 4.9, 5.0, 5.1, holding each value for a few seconds. I note exactly when the icon switches off, check the reaction time, and record screen and trace.
Q67And the reverse 6 → 5 → 4 °C?
Same, but falling from warm with the icon OFF: 5.1, 5.0, 4.9 … 4.0, 3.9. With hysteresis the switch point is different from the rising direction, so both directions need their own test cases.
Q68The snowflake appears at 5.0 °C but should only appear below 5 °C. What do you do?
First I confirm it's real: check the trace that the signal was exactly 5.0, repeat it, and check the requirement version. Then I search Jira for a duplicate. If it's new, I raise a defect with steps, expected vs actual, trace, log and video, and link it to the requirement and test case.
Q69How would you report it?
With a precise summary like "[Cluster] Snowflake shown at exactly 5.0 °C; REQ requires < 5.0 °C", environment (build, bench, variant), numbered steps with the exact signal values, expected and actual result, reproducibility, evidence (video, trace with timestamp, log), my analysis, impact, severity and links. See the example above.
Decision tables
When the result depends on a combination of conditions, write all combinations in a table. Each column (rule) becomes a test case. You'll never miss a combination.
Requirement: "The chime plays when the seat is occupied AND the belt is not fastened AND speed > 20 km/h."
| Condition / Rule | R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8 |
|---|---|---|---|---|---|---|---|---|
| Seat occupied | Y | Y | Y | Y | N | N | N | N |
| Belt unfastened | Y | Y | N | N | Y | Y | N | N |
| Speed > 20 km/h | Y | N | Y | N | Y | N | Y | N |
| Chime? | Yes | No | No | No | No | No | No | No |
3 conditions → 2³ = 8 rules. Then add BVA on the speed (20 and 21 km/h) inside rule R1/R2.
State transition testing
Many features have states (like "idle", "ringing", "in call") and events that move between them ("incoming call", "accept"). Draw the states and arrows, then test every valid arrow and some invalid ones.
| Test | Start state | Event | Expected end state |
|---|---|---|---|
| T1 | Idle | Incoming call | Ringing (ringtone, caller name shown) |
| T2 | Ringing | Accept (touch / steering wheel) | Active call, timer starts at 00:00 |
| T3 | Ringing | Reject | Idle, missed call listed |
| T4 | Active | Hold | On hold, "on hold" shown |
| T5 | On hold | Resume | Active |
| T6 | Active | End | Idle, audio returns to music |
| T7 (invalid) | Idle | Press "hold" | Nothing happens, no crash |
| T8 (interruption) | Active | Reverse gear | Camera shown, call continues |
Experience-based techniques
Error guessing: 25 things that often break in IVI
Interruptions
Call during navigation voice · reverse gear during a call · USB pulled while playing · ignition off during an update · pop-up during camera view
Data extremes
Empty lists · 10,000 songs · very long titles · special characters äöüß · emoji in contact names · right-to-left text
Timing
Pressing buttons very fast · double tap · action during boot · action during screen transition · slow phone
States
Sleep/wake · ignition cycles · low voltage · language change mid-action · switching units
Connections
Phone out of range and back · two phones · CarPlay + Bluetooth together · network lost
Exploratory testing
Testing freely, but with a goal written as a charter, in a time box (e.g. 45 min), taking notes. Example charter: "Explore the media player with a 10,000-song USB stick to find performance and display problems." At the end, report what you tested, what you found, and ideas for new test cases.
Checklist-based testing
Use a list of things to check (like the UI checklist or the 8-point scan in the eye tests).
Practice exercises (try, then open the answer)
Ex 1Low fuel warning: ON when fuel ≤ 10% (resolution 1%). Which values? (3-value BVA)
9% → ON, 10% → ON, 11% → OFF. Plus EP values like 50% (OFF) and 0% (ON), and the invalid/SNA case. Also check both directions if there is hysteresis (refuelling vs using fuel).
Ex 2Overspeed chime when speed > 120 km/h (resolution 1 km/h).
119 → no chime, 120 → no chime, 121 → chime. "Greater than 120" means 120 itself does not trigger. Also: does the chime stop when going back to 120? Test in km/h and in mph setting.
Ex 3Tyre pressure warning when pressure < 180 kPa (signal resolution 5 kPa).
The step is 5 kPa, so: 175 → warning, 180 → no warning, 185 → no warning. You cannot send 179 because the signal can't represent it. Also test each wheel separately and the sensor-fault case.
Ex 4Climate temperature 16.0–28.0 °C in 0.5 steps, "LO" below 16 and "HI" above 28. Which values?
Lower edge: LO, 16.0, 16.5. Upper edge: 27.5, 28.0, HI. Plus a middle value (22.0), pressing "down" at LO (stays LO), pressing "up" at HI (stays HI), and the °F display of each.
Ex 5Rear camera shows when gear = R AND speed < 15 km/h. Make a decision table.
| R1 | R2 | R3 | R4 | |
|---|---|---|---|---|
| Gear = R | Y | Y | N | N |
| Speed < 15 | Y | N | Y | N |
| Camera | Shown | Not shown | Not shown | Not shown |
Then BVA on speed: 14, 15, 16 km/h in reverse.
Ex 6Media player states: Stopped, Playing, Paused. List valid transitions to test.
Stopped → Playing (play) · Playing → Paused (pause) · Paused → Playing (play) · Playing → Stopped (source removed / stop) · Paused → Stopped (source removed). Invalid: "pause" while Stopped does nothing. Interruptions: incoming call while Playing → paused/ducked, then resumes after the call.
Ex 7Write 5 test cases for: "An ice-warning pop-up appears once when the temperature first goes below 4 °C after ignition on."
- Ignition on at 6 °C, lower to 3.9 °C → pop-up appears once.
- Lower to exactly 4.0 °C → no pop-up ("below 4").
- After the pop-up, go 5 → 3.9 °C again (same ignition cycle) → no second pop-up ("once").
- Ignition cycle, then go below 4 again → pop-up appears again.
- Ignition on while already at 2 °C → clarify with requirement: pop-up at start-up or not? (a good question to ask!)