A 340-case screen-driven pack checks every fare-calculation combination through the screens; which of those checks belong at a lower level?
answer
- Ask what claim each case makes
- Does this claim need a screen?
- Rule variation versus assembly evidence
- Long journeys covered once, not per variant
- Replacement first, retire second
basics
~20 sKeep at the screen level only what needs a screen: that the journey wires together and shows the right result. Rule and combination variation belongs where the rule lives, with one screen case proving the path.
solid answer
~50 sSort the pack by what each case is really claiming. A case that varies inputs against a rule - zone pairs, time bands, concession types - is claiming the calculation is right, and a screen adds nothing to that claim except minutes and instability; move it to the level that owns the rule and keep one screen case that proves the journey reaches the calculation and displays its answer. A case that claims something only visible on a screen stays: the wiring of controls to the result, a state a user can reach only by interacting, a critical journey end to end. Then cover each critical journey once at full length rather than re-walking it in twenty variants. Expect resistance, so bring evidence - which cases fail, how long they take, what they have ever caught - and move one rule family at a time.
go deeper
Be ready to say that not every check needs to go through a screen, and to give one example of something better checked lower down, such as a calculation repeated across many input combinations.
An interviewer expects you to separate a claim about a rule from a claim about assembly, and to explain why the same journey repeated with different inputs adds run time without adding evidence.
Show the migration discipline: measure run time and failure history, write the replacement first, verify it fails on a deliberate break, move one family at a time, and state plainly what the screen level no longer proves.
Own the composition target and the argument for it with people who trust only the screen pack. Be ready to say what feedback time you are buying, what residual risk you accept, and how you stop the pack regrowing one case per rule variant.
### The symptom and the real question A pack of 340 screen-driven cases against a public-transport fare calculator has grown one case per fare combination: zone pairs, peak and off-peak bands, concession types, weekend rules. It now takes over an hour, and on a busy machine the parallel workers exhaust the available memory and the run dies partway through with no verdict at all. The tempting fixes are operational - more workers, fewer workers, more memory. They are worth doing, but they answer the wrong question. The real question is **what each of those 340 cases is claiming**, and whether a screen is required to make that claim. ### Sorting by claim, not by feature Write down, for a sample of cases, the sentence the case would let you say if it passed. Three groups appear. **Claims about a rule.** "A senior concession on a peak zone-2-to-zone-5 journey costs 3.40." The screen contributes nothing here. The rule lives below; a case at that level runs in milliseconds, takes a table of combinations, and names the failing row. Two hundred-odd of the 340 are usually this group. They are the ones to move. **Claims about wiring.** "Choosing zone 5 as the destination and 08:12 as the departure produces a request for a peak zone-2-to-5 fare, and the answer is displayed to the rider." This one needs the screen: it is about controls being connected to the right inputs, the result being rendered, the formatting being right, and the states in between existing. One or two cases per screen usually cover it, because the wiring either works for all combinations or is broken for all of them. **Claims about a journey.** "A rider can plan a trip, apply a concession and buy the ticket." Genuinely end to end, genuinely valuable, genuinely expensive. Cover each critical journey **once**, at full length, and resist the urge to re-walk it with a different concession type - that variation is a rule claim wearing a journey costume. ### What stays at screen level - The critical journeys, once each. - Wiring of each significant screen: inputs reach the system, the result comes back and is displayed. - Behaviour that only exists on the screen: a control disabled until a selection is made, an error surfaced in the place a rider would look, a state reachable only through interaction. - A small number of cases over things that historically break only when assembled - and be honest that this is a judgement call, not a rule. ### What moves down - Input combinations against a rule or a table. - Validation of a single field's accepted values. - Formatting, rounding, currency and locale variants. - Error mapping - which condition produces which message - once one case proves the message reaches the screen. - Anything whose expected result you can compute without rendering anything. ### Doing the move without losing coverage The failure mode of this work is deleting the screen case before the lower-level one exists, or writing a lower-level case that quietly checks something weaker. So: 1. **Measure first.** Per case: run time, failure history, and what it has ever caught. A case that has never failed in a year of runs, and whose rule is checked below, is not protecting anything. 2. **Write the replacement first**, run both for a while, and confirm the lower-level case fails when you break the rule on purpose. Then, and only then, retire the screen case. 3. **Move a slice at a time** - one rule family per change - so a coverage regression is attributable. 4. **Say what you traded.** The moved cases no longer prove the rule is reachable *through the screen*. That is exactly why one wiring case per screen has to stay, and why it must assert the displayed value rather than merely that the screen loaded. ### The counter-arguments to take seriously Someone will say the screen pack is the only thing that tests what the customer really does. Half true: it is the only level that exercises assembly, and that is why the journeys and wiring cases stay. It is not true that a rule is better checked through a screen; it is checked more slowly and less precisely, and the failure names a screen rather than a rule. Someone else will say the lower level cannot be trusted because it uses stand-ins for its neighbours. That is a real risk, and the answer is to be specific about which claim each level makes - the screen proves the pieces are connected, the lower level proves each piece is right - rather than to duplicate the whole matrix in both places. And expect a version of the argument that a run failing on resources should be fixed by capacity alone. Capacity buys time; it does not stop a pack that grows one screen case per rule variant from arriving at the same wall again with more cases and a longer feedback delay. The composition change is what holds.
- How do you avoid losing real coverage while moving checks to a lower level?Write the replacement first and run both for a period. Break the rule on purpose and confirm the new lower-level case goes red with a message that names the rule - not just that something failed. Move one rule family per change so any regression is attributable, and retire the screen case only after its replacement has caught something or has been deliberately proven capable of catching it.
- Someone argues that only screen-driven cases test what the customer actually does. How do you answer?Agree about assembly, disagree about rules. The screen level is the only place that proves the pieces are connected and the result is presented, which is why critical journeys and one wiring case per screen stay. But a fare rule is not better checked through a screen; it is checked more slowly, less precisely, and with a failure message that names a screen rather than the rule that broke.
- What do you keep when the same critical journey has twenty variants?The journey once, at full length, with the most representative inputs, plus the variants moved to whichever level owns what actually differs between them. Twenty long walks that differ only in a concession type are one assembly claim and nineteen rule claims. Re-walking the path adds run time and instability without adding evidence about assembly.
saying these in an interview costs you the question
- Adding workers or memory and calling the problem solved
- Deleting screen cases before the replacement below exists
- Claiming every input combination must be seen on a screen
- Re-walking a long journey once per input variant
- Judging cases by feature area instead of by what they claim
- Assuming a lower-level replacement checks the same thing without verifying