Automated UI Tests: Holy Grail or Snake Oil?

I think the title of this article says it all.

UI Test Automation Tools are Snake Oil

Michael Feathers, the author, is very solid.

It’s a very familiar ‘rabbit hole’ in the industry.  …  Personally, I think that in this day and age selling them [UI testing tools]  is irresponsible. Developing them open-source? Well, let your conscience be your guide, but really, even though people can use them responsibly, they hardly ever do because these tools are sold with a dream, a very seductive and dangerous one.

Here is the section Michael headed as “Solution.”

The fact of the matter is, you can use these tools effectively, but in a very narrow space. It’s nice to be able to test the UI—by itself. However, this sort of thing requires an architectural change.

In general, UIs are too volatile for end-to-end testing. Teams that do it well, typically develop a small task-focused scripting layer and build tests on top if it so that the actual tests don’t touch the UI directly. But, if they happen across that technique, they are lucky. Still, it isn’t an ideal solution. You really want to be below the UI working against an API which exposes the business logic. And, because of that nearly mystical synergy between testability and good design, that API layer is often useful for many things other than testing.

One Response to “Automated UI Tests: Holy Grail or Snake Oil?”

  1. Chi-Ming Chi-Ming says:

    Thanks for the post. Informative.

Leave a Reply