Test automation mostly using unit testing is a key feature of extreme programming and agile software development, where it is known as test-driven development (TDD) or test-first development. Unit tests can be written to define the functionality before the code is written. However, these unit tests evolve and are extended as coding progresses, issues are discovered and the code is subjected to refactoring. Only when all the tests for all the demanded features pass is the code considered complete. Proponents argue that it produces software that is both more reliable and less costly than code that is tested by manual exploration. It is considered more reliable because the code coverage is better, and because it is run constantly during development rather than once at the end of a waterfall development cycle. The developer discovers defects immediately upon making a change, when it is least expensive to fix. Finally, code refactoring is safer when unit testing is used; transforming the code into a simpler form with less code duplication, but equivalent behavior, is much less likely to introduce new defects when the refactored code is covered by unit tests.
Over a decade of domain experience has taught us that there are some of the best automation testing tools available in the market, some of which are open and some available as commercial versions. We have the expertise to help you choose the most effective software testing tool(s) based on your specific requirements and effectively use these tools to meet your exact requirements.
Chandra Kandukuri is a Technical Test Lead at Microsoft with more than 16 years of software development experience in multiple environments, developing automation frameworks and tools. He advocates the use of TDD and dedicating the time and resources to do it well. Although it is relatively uncommon to see teams utilize TDD in his experience, Kandukuri recommends the method with automated software testing because of the positive teamwork habits it can promote.
There's plenty of failure in that combination. First of all, the feedback loop from development to test is delayed. It is likely that the code doesn't have the hooks and affordances you need to test it. Element IDs might not be predictable, or might be tied to the database, for example. With one recent customer, we couldn't delete orders, and the system added a new order as a row at the bottom. Once we had 20 test runs, the new orders appeared on page two! That created a layer of back and forth where the code didn't do what it needed to do on the first pass. John Seddon, the British occupational psychologist, calls this "failure demand," which creates extra work (demand) on a system that only exists because the system failed the first time around.
I think we can all agree that automation is a critical part of any organization's software delivery pipeline, especially if you call yourself "agile." It's pretty intuitive that if you automate testing, your release cycles are going to get shorter. "So, if that's the case," you might say, "why don't we just automate everything?" There's a good reason: automation comes with a price.