Menu

1 / 2

UI tests that stayed green on a broken app, and what it took to make them fail

DEV Community: mobile·Vadim Toptunov·8 days ago
#313ygfXf
#devtomobile#devto#dev#test#tests
Reading 0:00
15s threshold

I had 34 UI tests, 135 switchable bugs, a mock backend that answered in 120 ms, a price feed that ticked every second, and a minus sign that wasn’t a hyphen. Not that I needed all of that to test one banking app. But once you’ve built a serious collection of bugs, you want to switch every one of them on and see what happens.

On the clean build, all 34 tests were green. That’s nice, but it only says the app works. It says nothing about whether the tests would notice if it didn’t.

So I started breaking the app on purpose and watching which tests went red. The first results weren't great. Nine of the 34 tests never went red, whatever I broke. And when I switched on the 23 money bugs one at a time, 18 of them got through the whole suite without a single red test.

Below are the four that taught me the most, and what I changed in the tests. None of it is specific to my app or my framework.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.