Test automation - from theory to reality

If you have been reading about test automation in magazines, blogs or books, you get the idea that automation is nice, easy, straightforward and beautiful.

Because all these talk about theory, most of the time. 


Theory is always like a finished, simple, beautiful, well designed, professionally-done building. 






In theory, automation is about having 

  • independent tests
  • tests that create their own data and delete it after being executed 
  • dedicated test automation environment 
  • tests that run in parallel 
  • tests that use simulated external dependencies 
  • tests that run in 3 minutes  
  • good code written by professional people


This all sounds great and makes you want to get started with test automation tomorrow :) 




And how is test automation in reality? 

Have a look at this construction. 




Automation in real life means in many cases

  • dependent tests; if one test fails, multiple other tests fail 
  • tests that use manually created data; the data is also different from environment to environment; 
  • shared test automation environment; the tests are created and executed on an environment used as well for manual testing 
  • tests that run in "parallel"; instead of having tests executed in parallel on multiple Jenkins slaves, you have tests executed in "parallel" on the same slave 
  • tests that use real external dependencies 
  • tests that run in a few hours 
  • bad code written by non-professional people




Theory and reality are never similar. 

To get from reality to something similar to theory is difficult and takes a long time. 

But it is worth doing, that is for sure!

SeleniumJava.com post - How to deal with windows authentication popups

If you dont like Bugs Bunny, maybe you should not continue reading.

What is the first thing that I do every morning at work?
Check the results of the automation scripts executed in Jenkins over night.
I want to know how many scripts passed or failed because of the work done in the previous day.
Most days, some scripts pass and some fail.
But recently, most scripts failed.
This was very unusual so I looked into it right away.
All failures followed the same pattern: the scripts failed on opening the site in the browser.