May 19, 2015

Testing for Dark Patterns

In our latest Weekend Testing Europe session (WTEU-57: Linking In to Mobile App Testing), attendee and good friend Emma Keaveny stumbled upon a classic example of what's known as a "dark pattern" in software development. This is where a UI has been designed in such a way that it deliberately exploits common user traits, to persuade users to perform actions that they might otherwise avoid. (There's a website,, dedicated to categorising and shaming companies who behave in this way.)

In Emma's case, when syncing the LinkedIn app with her phone's address book, she performed an action which caused the app to send SMS text invites to everybody on her device - not only unexpected/unprompted, but also resulting in her being charged for each message!

Emma approached me after the session to talk more about dark patterns: "I can't seem to find anything on them from a testing perspective. How would you approach a dark pattern? Is there a code of ethics you need to look at? Your own opinions, feelings?"

My first-hand experience of dark patterns

I've previously blogged about my own encounter with dark patterns. I don't want to spoil the outcome, but it's a story entitled The time I did bad work. The particular dark pattern which it refers to is called Disguised Ads, and the website in question is still using it today - even in the new beta version that they're trialling.

Avoiding introducing dark patterns

The nature of dark patterns makes it very hard for them to be introduced accidentally. As with my example above, they generally need to be "designed-in", and our development teams have enough checks in place to ensure that we don't deliberately mislead people. (Though, as in my example, it's certainly possible that management interference and "pathetic compliance" can lead to a dark pattern being railroaded-through...)

When testing, if you spot something which feels like a dark pattern, the first thing to do is treat it like any other potential product problem. Talk to a developer or manager; I'd wager that 9 times out of 10, it's an accidental oversight and will get fixed.

But for the times when they say "Yeah, we did that on purpose"?...

Rejecting dark patterns with oracles

When we're describing problems, such as in bug reports, we cite oracles to show that we have justifiable reason to believe something might be a problem. We can do the same with dark patterns, too. The FEW HICCUPPS heuristic seems to offer a couple of good arguments: Users' Desires (if you're performing an action which is contrary to what the user might reasonably expect) and Explainability ("We then immediately send messages to all their friends, because... Because we can?").

We can use our own emotions as an oracle, too. If a user exhibits surprise ("hey, I didn't want to send all of those messages!") then, at the very least, this points towards poor usability. See Michael Bolton's presentation "Emotions in Software Testing" (PDF link). If your business reports that this behaviour is deliberate, and can't even be swayed by being shown examples of real users falling into the trap, then it's very likely that a dark pattern is at work.

Dark patterns in the wild

The website does a great job of naming-and-shaming companies who utilise dark patterns; you can even submit your own by registering with their website. Despite this, unless you've had first-hand experience of being tricked by a dark pattern, it's easy to think of this all as being purely theoretical; we tut when we hear about it, but does it really affect people?

Well, here's a real example - in 2013, several online retailers were outed on the BBC's Watchdog programme, featuring interviews with victims of the practice, and some live eye-tracking studies which show how dark patterns take effect for real users.

If you watched that video to the end, you'll see that one of Sports Direct's justifications is "other retailers do the same thing". It's a pathetic excuse, but the more of us that stand up and declare that this sort of activity is unacceptable in our products, the sooner we can make dark patterns extinct.

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket
Comments powered by Disqus