Sub topic 12
Test the structure with tree testing
You have a sitemap and a set of labels. Tree testing checks whether people can find things in that structure, before you spend time on visual design or build anything. This chapter assumes you have read the earlier chapters on hierarchy, labeling, navigation, and sitemaps. It also assumes you can read a short Python script.
What tree testing is
A tree test gives participants a text-only version of your hierarchy. It has no page layouts, no search box, no images, and no navigation bar. For each task, the participant expands the tree level by level and picks the place where they would look for the answer.
Because only labels and structure are visible, a failed task points to one of two causes. Either the label did not make sense, or the item sits in the wrong branch. Layout, color, and search cannot hide or cause the problem.
Tree testing and card sorting both help with structure, but they answer different questions.
| Method | Question it answers | When to use it |
|---|---|---|
| Card sorting | How do users group these items? | Before you have a structure |
| Tree testing | Can users find items in this structure? | After you have a draft structure |
Card sorting generates ideas. Tree testing checks a draft against realistic tasks. Both can be repeated as the IA changes.
The test process
A tree test has a short, repeatable loop. You build the tree, write tasks, run the study, analyze it, and revise the tree.
Prepare the tree
Start from the nested sitemap you drew earlier. For example, the Acme Help Center tree has three top-level groups, each with two children:
{
"name": "Acme Help Center",
"children": [
{
"name": "Getting started",
"children": [
{ "name": "Create an account" },
{ "name": "Set up your profile" }
]
},
{
"name": "Billing",
"children": [
{ "name": "Update payment method" },
{ "name": "Download invoices" }
]
},
{
"name": "Account security",
"children": [
{ "name": "Reset your password" },
{ "name": "Turn on two-step verification" }
]
}
]
}Follow these rules when you load the tree into a testing tool.
- Use the exact labels that will appear in the product. If you test a cleaned-up version, the results describe a different product.
- Include the full depth of the branches under test. A tree that stops one level early hides the level where people often go wrong.
- Leave out items that are not content, such as "Log in" or "Contact us", unless a task needs them.
- Keep the tree to a size people can explore. For a large site, test one or two major branches per study rather than all 500 items.
Write good tasks
A task is a short scenario that describes what the participant wants. It does not name where to click. Each task needs one or more correct answers that you decide before the test.
Good tasks follow these rules.
- Describe a goal, not a label. Write "You need a PDF of last month's charges for your accountant," not "Find the invoices page." The second version turns the test into word matching.
- Use the user's language. Take wording from support tickets and interviews, as in the earlier chapter on user needs.
- Keep each task to one destination. Combined goals make the results impossible to read.
- Choose tasks that matter. Pick the most common and most important user tasks. Add a few that you suspect are weak.
- Limit the count. Aim for 6 to 10 tasks per participant. Fatigue lowers the quality of later answers. If you have more tasks, give each participant a random subset.
- Randomize task order. This keeps early tasks from teaching participants the tree.
Define the correct answers as full paths, such as Billing/Download invoices. If an item legitimately belongs in two places, mark both as correct. If you mark too many answers correct, every task passes and the test tells you nothing.
Recruit and run
Recruit people who resemble your real users. A tree test with the wrong audience measures the wrong thing, for example if you test a developer tool with general consumers.
For findings you can quantify, aim for roughly 30 or more participants per distinct audience segment. Smaller groups of 5 to 10 can still reveal serious problems, but you cannot trust the percentages. Tools such as Optimal Workshop's Treejack, UXtweak, and Maze support unmoderated tree tests. You can also run a moderated session on paper, where you read tasks aloud and ask people to think aloud. Moderated sessions give you fewer data points but tell you why people chose a path.
In an unmoderated test, each participant follows the same steps for each task:
- They read the task.
- They expand branches, and can go back.
- They select one item as their answer.
- They may rate their confidence.
Read the metrics
Four measurements matter most.
| Metric | What it measures | What a low value suggests |
|---|---|---|
| Success rate | Share of participants who chose a correct answer | The item is in the wrong place or labeled poorly |
| Directness | Share who succeeded without backtracking | The path is plausible but unclear, so people had to retry |
| Time to complete | How long the task took | Hesitation, often caused by ambiguous labels |
| First click | Which top-level branch was opened first | The top-level groups do not match expectations |
Success and directness together are more informative than either alone. A task with 80% success and 30% directness means most people eventually found the item, but only after wrong turns. That is a hidden cost. In a real product, people may give up instead of backtracking.
There is no universal pass mark. Many practitioners treat success below about 60 to 70 percent as a problem to investigate, but the right threshold depends on how important the task is. A rare admin task can tolerate a lower rate than "reset my password".
Score results with a script
Most tools compute these numbers for you. Computing them yourself on exported data helps you understand what they mean, and lets you combine results from several tools. This script uses a small made-up dataset, with only five participants per task so the output is easy to check by hand.
from collections import defaultdict
CORRECT = {
"t1": {"Billing/Download invoices"},
"t2": {
"Account security/Reset your password",
"Account security/Turn on two-step verification",
},
}
results = [
{"task": "t1", "who": "p1", "answer": "Billing/Download invoices", "backtracked": False},
{"task": "t1", "who": "p2", "answer": "Billing/Download invoices", "backtracked": True},
{"task": "t1", "who": "p3", "answer": "Billing/Update payment method", "backtracked": False},
{"task": "t1", "who": "p4", "answer": "Billing/Download invoices", "backtracked": False},
{"task": "t1", "who": "p5", "answer": "Billing/Download invoices", "backtracked": False},
{"task": "t2", "who": "p1", "answer": "Account security/Reset your password", "backtracked": False},
{"task": "t2", "who": "p2", "answer": "Getting started/Set up your profile", "backtracked": True},
{"task": "t2", "who": "p3", "answer": "Account security/Turn on two-step verification", "backtracked": False},
{"task": "t2", "who": "p4", "answer": "Account security/Reset your password", "backtracked": True},
{"task": "t2", "who": "p5", "answer": "Getting started/Set up your profile", "backtracked": False},
]
by_task = defaultdict(list)
for r in results:
by_task[r["task"]].append(r)
for task, rows in sorted(by_task.items()):
n = len(rows)
success = [r for r in rows if r["answer"] in CORRECT[task]]
direct = [r for r in success if not r["backtracked"]]
print(f"{task} n={n} success={len(success)/n:.0%} direct={len(direct)/n:.0%}")
wrong = defaultdict(int)
for r in rows:
if r["answer"] not in CORRECT[task]:
wrong[r["answer"]] += 1
for answer, count in sorted(wrong.items(), key=lambda kv: -kv[1]):
print(f" wrong: {answer} x{count}")The output is:
t1 n=5 success=80% direct=60%
wrong: Billing/Update payment method x1
t2 n=5 success=60% direct=40%
wrong: Getting started/Set up your profile x2Task t2 is the weaker one. Two of five participants went to "Set up your profile" when they wanted to secure their account. The wrong-answer list shows where they went, which matters more than the percentage.
Analyze the failures
A score tells you that a task failed. The paths tell you why. Look at the wrong answers and ask which of these patterns applies.
- Scattered wrong answers. People pick many different places. The label for the target item is probably unclear, or the concept is unfamiliar.
- Many people pick the same wrong place. That branch competes with the correct one. Either the labels overlap, or users genuinely expect the item there. Consider moving the item, or listing it in both places.
- Wrong first click. The top-level groups do not match the user's thinking. Fix this before looking at deeper levels.
- Success with low directness. People open the wrong branch, then recover. A better label or a clearer sibling label often fixes it.
- Long dwell time at one level. The labels at that level are hard to tell apart.
Many tools show a "pietree", a diagram of the tree in which each branch is sized by how many participants took it. Use it to spot where participants left the correct path.
Make changes and retest
Change one kind of thing at a time where you can. If you rename three labels and move two items, you cannot tell which change helped. Pick the fixes that address the biggest failures, then run a second round with the same tasks. Comparing the same tasks across rounds shows whether the revision actually helped. Keep the tasks identical for this comparison, and write new ones only when you add new content.
Common mistakes to avoid:
- Testing with too few participants and reporting precise percentages.
- Writing tasks that match label words.
- Defining correct answers after seeing the results.
- Treating the test as pass or fail for the whole IA. It tells you about specific tasks and branches.
- Assuming a passing tree test means the product is findable. Search, layout, and visual design still affect real behavior, which you check later in usability testing.
Where tree testing fits
Tree testing is a checkpoint between drafting the sitemap and building the product. It also gives you a baseline. When content grows and the structure changes, you can rerun the same tasks and compare. The next chapter covers keeping the IA healthy as content grows, and tree test results are one of the main inputs to that work.
Exercise
A tree test of the Acme Help Center has the task "You want to see your past receipts." The correct answer is Billing/Download invoices. Results from 40 participants: 55% success, 25% directness, and 30% of participants chose Account security/Reset your password. Name two problems with this test or tree, and say what you would do next.
Show answer
First, the task may be fine but the label "Download invoices" does not match the user word "receipts", so the label is the likely cause of the 55% success. Consider renaming it or adding "receipts" to the label. Second, the gap between 55% success and 25% directness means many people backtracked, so the path is unclear even for those who succeeded. A separate question is why 30% chose a security item. Check the paths for that group, since they may have opened Account security first because the top-level groups do not signal where billing documents live. Revise the label and top-level wording, then rerun the same task with a new group of participants and compare.
Exercise
Why should a tree test task say "You need a PDF of last month's charges for your accountant" rather than "Find the invoices page"?
Show answer
The second version contains a word from the label, so participants can succeed by matching text rather than by using their own understanding of how the content is organized. The scenario version tests whether the structure fits what users actually think, which is what the test is for.