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.

59 comments:

  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

    ReplyDelete
  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.
    Regards,
    Software Testing courses in chennai | Testing Training chennai

    ReplyDelete
  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.
    Regards,
    testing training in chennai|Software training institutes in chennai

    ReplyDelete
  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.
    Thanks,
    Selenium Training institute in Chennai | Selenium Training in Chennai | Selenium Course in Chennai

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

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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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|

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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"

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete

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

    SELENIUM TRAINING IN CHENNAI

    ReplyDelete

  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

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

    ReplyDelete
  18. REALLY VERY EXCELLENT INFORMATION. I AM VERY GLAD TO SEE YOUR BLOG FOR THIS INFORMATION. THANKS FOR SHARING. KEEP UPDATING.

    NO.1 Mobile APPilication DEVELOPMENT SERVICES | MASSIL TECHNOLOGIES

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

    Best Mobility Services | Austere Technologies

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

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

    Software Testing | Austere Technology

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

    Web Designing Training in Chennai

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

    ReplyDelete
  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

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

    Dot Net Training in Chennai

    ReplyDelete
  28. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book ANDAMAN HOLIDAY PACKAGES @ 35999

    ReplyDelete
  29. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book CHEAP ANDAMAN PACKAGES @9999

    ReplyDelete
  30. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book Andaman Tourism

    ReplyDelete
  31. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book Best Travel Agency In India

    ReplyDelete
  32. Hi Thanks for the nice information its very useful to read your blog. We provide About Best Software Development Services

    ReplyDelete
  33. Great Article...Thanks for sharing the best information of acceptance testing a system through gui.It was so good to read and useful to improve my knowledge as updated one.
    Android Training

    ReplyDelete
  34. Hi Thanks for the nice information its very useful to read your blog. We provide best Find All Isfs Courses

    ReplyDelete
  35. Hi Thanks for the nice information its very useful to read your blog. We provide best Massil Technologies

    ReplyDelete
  36. mytectra placement Portal is a Web based portal brings Potentials Employers and myTectra Candidates on a common platform for placement assistance.

    ReplyDelete
  37. Hi Thanks for the nice information its very useful to read your blog. We provide best Association Of Chartered Certified Accountants

    ReplyDelete
  38. Excellent information! all the stuff you discussed above is very useful for my studies. The concept is clearly explained. I hope u will keep on sharing!
    Ethical Hacking Course in Chennai 
    SEO Training in Chennai
    Certified Ethical Hacking Course in Chennai 
    Ethical Hacking Course 
    SEO Course in Chennai
    SEO Training Institute in Chennai

    ReplyDelete
  39. Thanks for your information, the blog which you have shared is useful to us.

    Education
    Technology

    ReplyDelete
  40. Your blog is interesting for readers.you have developed your blog informations with such a wonderful ideas and which is very much useful for the readers.i enjoyed your post and i need some more articles also please update soon.
    best institute for vmware in bangalore
    vmware training near me
    vmware training near me
    vmware training in chennai

    ReplyDelete