---
title: "Routing questions - test every branch of a survey without testing every path"
description: "SurveyTester finds the questions that drive the routing and generates a few test cases that take every branch of every routing question."
url: https://www.surveytester.com/academy/en/pages-and-routing/routing-questions/
language: en
type: article
audiences: ["Survey Authors", "Survey Testers", "Project Managers"]
published: 2026-11-02
updated: 2026-11-02
tags: ["routing", "routing questions", "filter questions", "branch coverage", "path coverage", "test cases", "screener", "skip logic"]
---

# Routing questions - test every branch of a survey without testing every path

_Pages & Routing · SurveyTester Academy_

Every survey has questions whose answer decides what comes next: "Do you own a car?" opens the car block,
"Which age group are you in?" screens out the under-18s. These are **routing questions**, often also called
**filter questions**. SurveyTester finds them in your test runs, lets you correct the result, and generates a
small set of test cases that take **every branch of every routing question** at least once.

## Why this is hard without SurveyTester

- **The number of paths explodes.** A survey with 20 questions and 10 options each has 10^20 possible
  answer combinations. Nobody can test them all.
- **Most questions don't matter for the routing.** A satisfaction scale or a brand rating usually leads to the
  same next page whatever the answer. Only a handful of questions really change the path, but which ones is
  hidden in the survey programming.
- **Random answers miss rare branches.** A test bot that answers at random takes the 5 % option of a
  screener almost never. The branch behind it stays untested until a real respondent finds the bug.
- **Filters are not always on the next page.** A question on page 3 may decide whether page 12 is shown.
  Spotting that by clicking through the survey takes a long time.

## What SurveyTester does

### Finding the routing questions

After test runs finish, SurveyTester compares the paths of the runs. A question counts as a routing question
when the runs that chose one group of options reach a page, and the runs that chose the other options never
do. This also finds filters whose effect shows up several pages later, and screeners that end the interview.

The options that lead the same way form one **branch**. For "Do you own a car?" these are two branches:
*Yes* (the car block follows) and *No* (it is skipped).

SurveyTester only reports a routing question when the evidence is clear. If a question was answered at random
in just a few runs, a clean split can be a coincidence, so SurveyTester waits for more runs. Pages that a survey
shows at random are not mistaken for routing.

When a questionnaire document is mapped to the project, its "Ask if ..." conditions count too: a question that
another question depends on is a routing question, even before the first test run.

![Placeholder: screenshot of the Pages table with the Routing badge](https://www.surveytester.com/academy/_img/pages-and-routing/routing-questions/en/routing-questions-badge.png "w=44rem | Routing questions carry a badge in the Pages table")

### Correcting the result

Open the expectations dialog of a question in the Pages table. Under **Routing question** you choose:

- **Auto (detected)** - follow what the test runs and the questionnaire show.
- **Yes** - this question drives the routing, even if the runs have not shown it yet. Without detected
  branches, every option counts as a branch of its own.
- **No** - this question does not drive the routing (for example, a page that is shown at random by design).

The dialog also lists the detected branches, how many pages each branch shows or skips, and the options that
no test run has chosen yet.

![Placeholder: screenshot of the Routing question section of the expectations dialog](https://www.surveytester.com/academy/_img/pages-and-routing/routing-questions/en/routing-questions-dialog.png "w=40rem | Auto, Yes or No, and the detected branches")

### Generating the coverage test cases

On the **Test Cases** page, click **Generate routing coverage**. SurveyTester plans test cases so that every
branch of every routing question is taken at least once:

- One test case takes **one branch of every routing question** it reaches. 20 routing questions with 10
  options each therefore need about 10 test cases, not 10^20.
- **Nested filters are respected.** A question that is only asked on the *Yes* branch of an earlier one is
  planned in the test cases that take *Yes*.
- **Screen-out branches come last**, in test cases of their own, so they don't cut the other test cases short.
- Questions that are not routing questions stay random, so the test runs still vary.

The test cases are called *Routing coverage 01*, *02*, and so on. You can generate them again after more test
runs: the rows of the routing questions are updated, and anything else you added stays.

![Placeholder: screenshot of the Generate routing coverage button on the Test Cases page](https://www.surveytester.com/academy/_img/pages-and-routing/routing-questions/en/routing-questions-generate.png "w=44rem | One click plans the coverage test cases")

## Step by step

1. Run a few test runs, manually or with the SurveyBot. The more varied the answers, the sooner the routing
   questions show.
2. On **Pages & Routing**, click **Detect Routing Questions** (detection also runs automatically after test
   runs). Questions with the **Routing** badge are routing questions.
3. Check them: open the expectations dialog of a question and set **Yes** or **No** where you know better.
4. On **Test Cases**, click **Generate routing coverage**.
5. Run the *Routing coverage* test cases with the SurveyBot. Together they take every branch.
6. After changes to the survey, run detection and generation again.

![Placeholder: screenshot of the generated Routing coverage test cases](https://www.surveytester.com/academy/_img/pages-and-routing/routing-questions/en/routing-questions-testcases.png "w=44rem | The generated test cases, one per combination the plan needs")

## Good to know

- Detection reads the latest 500 finished test runs. Runs that were abandoned halfway are not counted as
  "skipped a page".
- A routing question that depends on two answers together ("show if Q2 = 1 AND Q5 = 3") is not always found
  by the detection. Mark the questions with **Yes**.
- An option that a branch reaches can carry a screen-out marker from the survey system. The test case then
  expects that outcome.

See also [Blocks in the routing diagram](https://www.surveytester.com/academy/en/pages-and-routing/routing-blocks) and
[Question expectations](https://www.surveytester.com/academy/en/pages-and-routing/question-expectations).
