Acceptance Testing Pattern: Detachable GUI

By Alex Yakyma

One of the problems that many software teams have is with acceptance testing a system thru GUI. Testing logic thru GUI is very fragile. Even though UI testing tools are continuously evolving, the nature of UI (as Human-to-System interface) will be constantly a hard problem with respect to test automation.

To better understand the pattern that we will introduce below, let us start with the example. Let's consider widely known and used open source project - 7z - archiving program. Imagine how will you test "Add to archive" function thru GUI. Here's a screenshot for that if you're using 7z version with rich GUI:

Testing this function thru UI will be hard: it requires to test it on few different screens accessing multiple different controls. It is hard and changes in UI (like layout, UI controls attributes etc) may instantaneously make all tests fail and then (most importantly) take a lot of time to fix them.

Now let's consider command line version:

It is quite easy to automate this with help of any scripting language that can run applications and access disk.

This illustrates very simple idea:

There's much more value in acceptance testing the system logic thru really convenient interface rather than aiming too high (testing thru GUI) but end up with impractical unsustainable testing strategy.

I've seen a number of good agile teams that struggled hard to test logic thru GUI and were constantly failing (even though some of them were trying to invent some convenient macro-wrappers around GUI testing frameworks like Selenium and so on). But when they started from different angle - testing business logic directly, it immediately became a powerful agile practice maintained by whole team. Simplest example is when team simply starts developing Acceptance Tests with JUnit, but using only "highest-level interfaces". There's whole bunch of tools though that are suited for this purpose much better (JBehave, Cucumber, FIT etc).

It is vital to have convenient, easy-to-use acceptance testing strategy rather then something that will be adequate testing method, because:

  • Convenient strategy will be used by both developers and testers, will become their "communication and collaboration protocol"
  • Convenient strategy will serve a great requirements discovery tool and will be used by team and their PO
  • Convenient strategy will help team ensure high coverage
  • Convenient strategy is vital for concurrent testing and even more so for test-driven techniques
Direct testing of system logic allows for all these great benefits.

It's worth mentioning that teams should strive to design for this kind of testability. If your GUI and Logic look like spaghetti, you will not be very successful with any testing apparently. UI needs to be "logically detachable" from the logic so you can test it safely. If it's not so, start gradually detaching it (in story-by-story fashion).

Highly coupled (read: messy) GUI and Logic...

On the other hand, detachable GUI allows for the following...

Following MVC pattern allows for Detachable GUI basically by definition. In this case you will be testing the "Model", leaving "View" behind.


  1. Thanks for your informative post on selenium automation testing tool. Your article helped me a lot in understanding the future of automation testing tool and its career prospects. Selenium Training | Best Selenium training institute in Chennai

  2. Testing is the fundamental one for working up the application. Programming testing is required to raise the blemishes and goofs for development phrases. It offers a good work for skilled specialists in programming testing field.
    Software Testing courses in chennai | Testing Training chennai

  3. Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information.
    testing training in chennai|Software training institutes in chennai

  4. Automation selenium engineers are in demand nowadays if you are strong in coding means that you will get the opportunity. Fita will guide you to get a job in automation field and it has a great scope in future.
    Selenium Training institute in Chennai | Selenium Training in Chennai | Selenium Course in Chennai

  5. Excellent sharing. Testing is a wonderful field for IT peoples. Want to learn Selenium Training reach GangBoard. Hadoop Training

  6. Nice post. Very interesting to read. Thank you for Sharing.
    erp in chennai

  7. So, there comes the requirement of International standards that should be followed across the planet to facilitate the ideas on purity and stability. xenon test chamber

  8. Very interesting and informative article, thanks for sharing your valuable ideas and time... really i have enjoyed to read your article... keep udpating and rocks...

    Testing Training in chennai | Software Testing Training in chennai

  9. You truly did more than visitors’ expectations. Thank you for rendering these helpful, trusted, edifying and also cool thoughts on the topic to Kate.
    selenium training in chennai|

  10. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here. Besant technologies Marathahalli

  11. I’m experiencing some small security issues with my latest blog, and I’d like to find something safer. Do you have any suggestions?
    web design training in chennai

  12. Those rules moreover attempted to wind up plainly a decent approach to perceive that other individuals online have the indistinguishable enthusiasm like mine to get a handle on incredible arrangement more around this condition. "Dotnet Training in Marathahalli"

  13. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    ME/M.Tech Project Center in Chennai | ME/M.Tech Project Center in Velachery

  14. Excellent Article.. I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.RPA Training Institute in Chennai | UI Path Training Institute in Chennai | Blue Prism Training Institute in Chennai


  15. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.



  16. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

    java training in bangalore

  17. this artical is good information and its very useful to read your blog. We provide best Digital Transformation Services



  19. Great information, very useful information. Thanks for sharing.

    Best Mobility Services | Austere Technologies

  20. I feel really happy to have seen your webpage and look forward to so
    many more entertaining times reading here. Thanks once more for all
    the details.

    white label website builder

  21. It was a good experience with us. I wish to show thanks to you just for bailing me out of this particular trouble.As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.
    uipath training in chennai

  22. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

    blue prism training in chennai

  23. Excellent information you made in this blog, very helpful information. Thanks for sharing.

    Software Testing | Austere Technology

  24. Great post! Thanks for sharing this valuable information.

    Web Designing Training in Chennai

  25. Hi Thanks for the nice information its very useful to read your blog. We provide best Block Chain Services

  26. Thank you for sharing this valuable information. But get out of this busy life and find some peace with a beautiful trip book best Andaman honeymoon packages

  27. Thanks for sharing with us. This is very Great aticle , it gives more useful information.

    Dot Net Training in Chennai