Assertions considered Harmful

recheck your test automation

Jeremias Rößler

Playlists: 'froscon2018' videos starting here / audio / related events

Testing has been voted THE major pain point in the development life cycle by a recent Forrester research. And for good reason. Test automation (regression testing) is essentially not working—many teams are discarding efforts and people talk about the ROI of deleting tests. Especially on the UI-level, tests tend to be brittle and incomplete, yet a huge effort to create and maintain—reflected in the famous test pyramid. This is a stark contrast to current trend topics, like CI/CD, DevOps and shift-left. So how can we solve that problem?

Assertions are the go-to checking mechanism in unit tests. However, when applied to testing interfaces, specifically GUIs, I consider them to be toxic. It is hard, but still feasible, to achieve a certain level of separation on the unit level. On the interface level, where integration is inevitable, it is outright impossible. And practice shows exactly that.

But there are alternatives. From ApprovalTests to TextTest to various pixel-comparison tools, Golden Master Testing is a viable option. I give a short overview about them, together with some practical example when to apply what.

Related

Download

Embed

Share:

Tags