concept user interface in category software development

This is an excerpt from Manning's book Specification by Example: How Successful Teams Deliver the Right Software.
At Weyerhaeuser, Pierre Veragen and the team worked with a custom test automation tool that recorded tests through the user interface. The cost of maintenance was high. After a change that broke many tests, he was able to justify moving to FitNesse after estimating that rewriting existing tests in the new tool would take less time than re-recording all the broken tests. Moving to FitNesse allowed the team to work more closely with engineers on executable specifications and sparked the move to Specification by Example.
Traditional test automation tools mostly work by manipulating user interface objects. Most automation tools for executable specifications can go below the user interface and talk to application programming interfaces directly.
Unless the only way to get confidence out of automated specifications for a feature is to run them end to end through the user interface, don’t do it.
User interface automation is typically much slower and much more expensive to maintain than automation at the service or API level. With the exception of using visible user interface automation to gain trust (as described earlier in this chapter), going below the user interface is often a much better solution to verifying business logic whenever possible.
The only example where tests described at a lower technical level didn’t cause huge maintenance problems later on was the one I saw from the Sierra team at BNP Paribasin London. They had a set of executable specifications described as interactions with user interface elements. The difference between this case and all the other stories, where such tests caused headaches, was that the Sierra team specifies only user interface functionality, not the underlying domain business logic. For example, their tests check for mandatory form fields and functionality implemented in JavaScript. All their business logic specifications are automated below the user interface.
Raising the level of abstraction would certainly make such tests easier to read and maintain. On the other hand, that would complicate the automation layer significantly. Because they have relatively few of these tests, creating and maintaining a smart automation layer would probably take more time than just changing the scripts when the user interface changes. It’s also important to understand that they maintain a back-office user interface where the layout doesn’t change as much as in public-facing websites, where the user interface is a shopping window.