EveryRole

User journey testing: test the stops, not the clicks

User journey testing checks that one kind of user gets one thing done, start to finish. Write it as stops with answers, not as a list of clicks.

User journey testing checks that one kind of user can get one thing done in your app, from the first page to the result. The way to write such a test is as a short list of stops, each with the answer the app must give there. A list of clicks is the wrong shape: it records how you got through today and says nothing about what had to come out.

That is the whole idea. The rest of this post is how to do it on a real app.

One journey, an editor creates an item, written two ways. As clicks it is twelve lines of open, click and type. As stops it is three places where the app has to answer: the login form, the new item form and the list.
Twelve clicks or three stops. Only the second version says what must come out.

What user journey testing checks

A journey has three parts:

  • Who. One kind of user: a visitor, an editor, a viewer, an admin.
  • What they came for. One outcome, in their words. “Create an item.” “Download last month’s report.”
  • The stops on the way. The places where the person does something and the app has to answer.

Our practice app has items. “An editor creates an item” is a journey. Its stops are the login form, the new item form, and the list where the item must now be. The landing page and the menu are on the route, but nothing is asked of the app there, so they are not stops.

If you can’t say the outcome in one short sentence, you have two journeys. Split them. That sentence is what most test plans call a test scenario.

Why clicks are the wrong unit

Write the same journey as clicks and you get twelve lines: open the page, click the email field, type, click the password field, and so on.

Three things go wrong with that list.

It breaks when nothing is broken. Move “New item” from the page into a menu and line seven fails. The editor can still create an item. Your test says they can’t.

It passes when something is broken. All twelve clicks can succeed on an app that saves nothing. The clicks were possible. That is all the list ever claimed. We call that a hollow pass.

Nobody can review it. Ask a teammate whether the twelve lines cover the feature. They can’t tell, because the lines don’t say what the feature is.

Stops fix all three. “The new item form must answer with the item’s page, name and note on it” survives a redesign, fails when the save fails, and can be read by the person who asked for the feature.

An end to end user journey test, stop by stop

Here is the journey as we would write it.

StopWhat the editor doesWhat the app must answer
1. The login formEmail and password of the editor’s test accountTheir own list of items, under “Your items”
2. The new item formName Sample item, note A short sample note, press “Create”The item’s page opens. Its heading is Sample item, the note is under it
3. The listOpens “Your items”, then reloadsSample item is in the list, and still there after the reload

Each right-hand cell is something on the page that two people would agree about. That is the test of a finished expected result.

The third stop is the one people leave out. The journey isn’t done when the form says yes. It is done when the thing exists where the person will look for it tomorrow.

Then give each stop its cases. The table above is only the good input. At stop 2 the same form must also answer an empty name, a name that is too long, and a wrong value followed by the right one. Those hang off the stop, so they don’t repeat the login, and a broken login fails once instead of five times. Happy path vs edge cases has the list per kind of stop.

Critical user journeys: which ones to write first

You don’t need every journey. Start with the ones where a break costs something the same day:

  1. The way in. Sign up, confirm, land in the app. If this breaks, you get no new users and no error report, because the people affected are not users yet.
  2. The main thing. Whatever your app is for. In ours, creating an item.
  3. Paying, up to the payment step.
  4. What each kind of user must not reach. A viewer at the new item form. A visitor at a signed-in page.

The fourth is a journey too, with a refusal as its outcome. In our practice app a viewer’s “New item” button is disabled, and typing the form’s address answers “Viewers can’t create items.” Both answers belong in the test.

Write those four before anything else. A few journeys that run after every deploy beat a long list that runs when someone remembers.

E2E testing examples that are not journeys

Some things get called journey tests and aren’t:

  • “Every page returns 200.” Useful, and it is a page check. No one got anything done.
  • “Click every button.” That is exploring, not testing: no outcome was expected.
  • “Log in, create, edit, share, export, delete, log out.” That is five journeys in a coat. When it fails at “share” you learn nothing about “export”.

How EveryRole does it

EveryRole is built around this shape. It explores your app on the live site, signed out and as each kind of user you give it a test login for, and suggests journeys. You keep or skip each one.

Five journeys EveryRole planned for our practice app. Each line names the journey, its kind of user, the control and page of its stop, and how many main cases it has: submitting the set-up form as an editor and as a viewer, uploading a file, downloading the reports, and picking a plan.
Journeys planned for the practice app after exploring it: one kind of user and one outcome each.

Each journey is an ordered list of stops, and each stop has its cases. The verdict at a stop comes from checks in code plus your own yes on the first result. After that yes, every run compares with the answer you approved. At each stop it also checks the other kinds of user: does the page open for them, and do they get its button.

It keeps no selectors for you to repair: each button is found by its words, the way a person finds it. If you take one thing from this post without using any tool: write the next test as three stops and their answers, and see how much shorter it gets.

Keep reading