When you build a test cycle by selecting a folder in a case repository, how far down the folder tree does that selection reach, and why does the answer matter?
answer
- a folder can mean two different sets
- direct members or everything beneath
- the count still looks plausible either way
- silence is the under-coverage symptom
- combine location with an attribute
basics
~20 sIt depends on the tool: a folder selection may take only the cases sitting directly in that folder, or the whole subtree beneath it. Confirm which before trusting the count, because both silently produce a plausible-looking number.
solid answer
~50 sSelecting a folder is ambiguous, and the two readings — **direct children only** versus **the whole subtree** — both return a sensible-looking set, which is why the mistake survives. Non-recursive selection under-covers: the deep leaf folders where the real cases live are missed, and the cycle looks small but complete. Recursive selection over-covers: it sweeps in drafts, retired cases and another team's subtree that happens to sit underneath. Neither failure announces itself, because nothing reports the cases that were never selected. Establish the behaviour once by selecting a parent whose direct-child count you know and comparing against its subtree total, then write it down. In practice you want the subtree scope combined with an attribute condition — active only, this release only — so the reach is deliberate rather than inherited from the folder shape.
go deeper
Know that selecting a folder may or may not include its subfolders, and ask which before you report a case count from a cycle you built that way.
Explain both failure directions and describe the count comparison that settles a tool's behaviour, including the tools that recurse only one level.
Show judgment about which failure you fear more and why silence makes under-coverage worse. Combine location scope with attribute conditions rather than trusting the default.
Own the library's shape. Decide when a repeated exception list means the tree is wrong and selection should move onto attributes the team actually maintains.
## Why "select this folder" is ambiguous A case library is almost always a tree: an area, a feature beneath it, a sub-feature beneath that, and cases hanging at various depths. When a cycle is built by pointing at a node in that tree, the product must decide what "this folder" means, and there is no universal answer. The behaviours you will meet: - **Direct members only.** Only cases attached to that exact node join the cycle. Anything in a child folder is left out. - **Full subtree.** The node and everything beneath it, to any depth. - **Subtree with an exclusion.** The whole subtree except folders marked in some way — archived, or deliberately opted out. All three are defensible designs, and all three return a set that looks reasonable. That is the whole problem: the failure mode of a wrong reach is a *plausible number*, not an error. ## The two ways it goes wrong | Behaviour | Failure | How it shows up | |---|---|---| | Direct members only | under-coverage | small case count; deep folders never run | | Full subtree | over-coverage | drafts, retired cases and neighbouring areas swept in | **Under-coverage is the more dangerous of the two**, because over-coverage is self-announcing — testers hit cases they do not recognise and complain within the hour. Nothing at all announces a case that was never selected. Nobody is assigned it, nobody skips it, no count includes it. It is simply outside the population, and the cycle reports a clean pass over a scope that quietly excluded the deep leaves where a mature library keeps most of its cases. ## Establishing the behaviour instead of guessing 1. Pick a parent folder whose direct-child case count and whose full subtree count you already know, or can count by hand. 2. Build a throwaway cycle from that folder alone. 3. Compare the resulting case count against both numbers. It will match one of them, and that is your answer. 4. Repeat one level deeper, because a couple of products stop after one level of nesting rather than recursing to any depth — a behaviour that a single-level test cannot distinguish from full recursion. Write the answer down beside the team's cycle-building instructions. It is a one-line fact that every later argument about a case count depends on. ## Making the reach deliberate Once you know the default, do not rely on it. A folder is a filing decision, and filing decisions get made for reasons that have nothing to do with what should run — someone parks a spike's cases under a feature, someone leaves an old release's cases in place rather than moving them. Combining scope with attributes fixes this: - Pair the subtree scope with an **active-state condition** so drafts and retired cases cannot enter. - Pair it with a **release or version attribute** when the subtree holds cases for more than one. - Prefer **shallow, deliberate trees** over deep ones for anything you select from regularly; the deeper the tree, the more the reach question costs you. - Sanity-check the resulting count against the previous comparable cycle. A total that has jumped or halved without a matching change to the library is usually a reach problem, not a coverage improvement. ## Where the tree shape itself is the problem If every cycle needs a hand-written exception list because the folder that holds what you want also holds three things you do not, the selection is not the fault — the filing is. That is a signal to move the affected cases or to select on an attribute rather than on location, so the rule stops depending on where somebody filed something months ago. ## What to say in an interview Name the ambiguity, name both failure directions, and say which one you fear more and why. Then describe the count-comparison check, because it shows you treat tool behaviour as something to verify rather than assume — which is the actual point of the question.
- Why is under-covering by a non-recursive selection harder to spot than over-covering by a recursive one?Because over-coverage has a human detector: testers meet cases they do not recognise and say so. Under-coverage has none — a case that was never selected is not assigned, not skipped and not counted, so it leaves no trace anywhere in the cycle. The only way to catch it is to compare the total against a known population.
- When would you select cases by attribute rather than by folder location?When the folder that holds what you want also holds things you do not, so every cycle needs the same hand-written exceptions. At that point the tree is filing history rather than a scope, and a condition over tags, release or state describes what should run far more stably than a location does.
saying these in an interview costs you the question
- Assumes folder selection always recurses to any depth
- Trusts a plausible case count without checking the population
- Reads a smaller cycle as tighter scope rather than missed cases
- Maintains a hand-written exception list instead of fixing the filing