Subscribe

Tried and tested

For companies looking to go Agile, test automation is a necessity.

Charlene Tshitoka Mulamba
By Charlene Tshitoka Mulamba, Consultant developer at ThoughtWorks South Africa.
Johannesburg, 08 Jul 2014

For companies considering test automation, it will take the organisation one step closer to being ready for Agile. For companies looking to go Agile, test automation is a must. While not all Agile methodologies directly emphasise the need for specific coding practices, test automation remains critical to reaching a certain level of maturity in Agile. Automating tests is hence necessary for companies wanting to advance in this sphere.

Agile, as a set of principles for software development, ensures that functional pieces of a project are being delivered regularly and rapidly. As such, testing is something that needs to happen regularly and rapidly too.

Test automation refers to the use of a specialised software tool to design and run tests, and compare the actual outcome with the expected outcome. If a developer writes a user story, and expects it to yield 'N' result, and it doesn't, testing will show that and provide a basis to compare what actually happened with what the developer expected to happen.

Testing is automated because manual testing takes a lot of time and repetitive effort. If a team wants to release software frequently, it needs to make changes to the product often, which results in a need to test often. Test automation controls that testing process. It also gives the software development team the assurance that the product has met certain test requirements and it works. This instils confidence in the product and provides a safety net for developers.

Reducing risks

With manual testing, someone physically has to sit and work through each possible use case or scenario, and this increases the risk that this individual will miss one or a few scenarios. Also, if someone is doing this daily, it is easy to assume that 'because this feature worked yesterday it will still work today'.

Computers do not do that; they provide the needed rigour and consistency in running tests to ensure the developers and users can have confidence in the product that is delivered. From the tester's point of view, automation frees them up to do more skills-intensive tasks, like writing new tests or learning new skills.

The frequency at which a team wants to release changes to software influences the needed testing strategy. A dynamic team often requires a dynamic testing mechanism. If a team is making changes to software every hour, for example, it needs to be tested every hour. In a five-person team, this can soon result in an unrealistic testing overhead, which isn't sustainable. Automating tests, in this case, means testing hourly may become a matter of just clicking a button.

The human element

It is, however, important to note that not all tests can be automated. Some things, like testing usability, are better off when a human is involved. Is it intuitive to click on a product I want to buy and then go to the shopping cart? Does the process flow smoothly? Does it make sense? This testing is difficult to automate.

One may want to allocate time for cases where usability tests are needed. Automating tests through building a regression suite can provide that time. This is critical when software is being developed - ultimately, it has to be error-free and usable by the client. Only human interaction will reveal how usable it is, and having more time to interact with it in testing only improves the product.

Testing is something that needs to happen regularly and rapidly.

As for the tools, new methods and tools for testing software are emerging all the time; thus improving feedback delivered by automated tests. Behaviour-driven development (BDD), for example, puts a lot of emphasis on the desired behaviour of a piece of software. For every feature, a specification is first written. This causes developers to implement code according to the requirements needed to satisfy a certain specification.

BBD has encouraged the creation of tools that provide comprehensive documentation, in plain English. Tests are written this way, for example: "If I am a customer, when I buy product A, it should show up in my shopping cart." Developers can use the documentation that results from such specification to implement functionality. Other product stakeholders also get the opportunity to see their specifications directly translated into functionality.

One of the biggest benefits of test automation, however, is continuity. If a tester leaves, the new person can rerun the old tests, and spend their time adding more tests. All of which, ultimately, results in a better quality product that delivers value to the business - which is really the point, after all.

Share