Test automation secrets

Test automation – the secrets and how to use them

In 1913 Henry Ford created the world’s first assembly line production and, together with his engineers, took the first step towards car production automation. This was something nobody had seen before. Using sophisticated machines to produce large quantities of car parts and various methods for assembling these, Ford contributed to the industrial revolution and has taken his place in the history books. A lot the philosophy lives on in modern day software test automation.

Automation as a concept has existed for a long time and is today a hotter topic than ever. You probably want what everyone else does – that software testing should be quikc and without flaws. But what happens when the complexity increases and tests take longer and longer to both set up and to execute?

The discussion regarding automated testing has likely come up in almost every software develoment project. Despite test automation having come far from the old Record and Playback, many still have questions about it. Below you will find some of the secrets behind successful test automation that can help you in your work towards a more automated test environment.

Avoid only testing through the user interface

Only testing through the user interface is slow. It might even be extremely slow.

It might work just fine for the first few weeks, when testing only takes five or six minutes to perform. However, those minutes can quickly become one or two hours. Before you can say “unit test”, your testers now run the automated testing through the user interface at 5 in the afternoon and have the results the morning after. In case the testing runs into problems early, the results might be useless. This leads to further testing being needed – which only leads to more time.

When developers are waiting for test feedback, they initiate something else and sooner or later someone makes a UI change, rendering all tests worthless. In addition, test automation is increasingly difficult in this type of scenario.

By extending your automation to also include unit tests (especially important if you have very modular code), Test Driven Development (TDD), Functional Testing or similar methodologies, you can both complement and speed up your regular testing. With a mix of internal code testing and UI testing, the overall process becomes a lot more manageable.

Time for test automation
XKCD: Efficiency

Remember your pipeline

Testing includes more than just the execution and reporting of the tests themselves. You need to set up the right environment, decide on a testing strategy, use the correct test data and design, not to mention the test setup. If you don’t keep all this in mind, your test automation will only simplify a small part of the process. 

If you create automated tests that then needs to be executed manually, those manual additions will end up being more destructive than constructive. You should instead start with a few simple tests that run end-to-end, through your integration server and on every build. When that’s in place, you can extend the test with new scripts.

Unfortunately, 100% test automation is impossible to do right away. That’s why it’s important to realize that if you forget your pipeline, you might find yourself using tests that’s both hard to use and to maintain. Begin with automating the most important examples and work your way up from there.

Test automation from day one

Make sure the application works, and we’ll move on to automation later.

A common misunderstanding is that automation cannot be made before the application is ready to run. The fact is that a strategy that involves early automation can lead to faster delivery, and overall better testing.

To define a good strategy for test automation, you need to agree with developers, testers and product owners what needs do be done to minimize the number of deployment failures. George Dinwiddie, agile coach, popularized the term The Three Amigos for this type of work. The three amigos are referencing the developer, the tester and the analyst and another name for the concept is Acceptance Test-Driven Development.

 

 

These are just a few of the things to remember then thinking about test automation. What type of tests do you use or want to know more about? Let us know in the comments!

About the author: Staffan

Happy marketer, contributor and technology enthusiast. Strong believer in transformational processes and sees learning opportunities everywhere.

Leave a Reply

Your email address will not be published.