“Developers write unit tests to determine if their code is doing things right. Customers write acceptance tests to determine if the system is doing the right things.”
In this fourth and last installment of our post series on test automation, we’d like to talk about ATDD or Acceptance Test Driven Development. Today Software Industry has adopted Agile in a big way. There are various flavors of Agile, one being Acceptance Test Driven Development (ATDD). In this process, the emphasis is more on developer-tester- business customer collaboration. First let us understand what Acceptance Tests are.
Acceptance Tests
Acceptance tests are nothing but specifications of desired behavior and functionality of the system through the eyes of the customer. Hence they are aptly called as Customer Tests. It gives right indication of whether the system is doing right things as customers are expecting. Some of the benefits of writing acceptance tests are:
- They are Customer tests and hence no ambiguity
- Passing acceptance tests indicate to Developers that they have satisfied the requirements
- These tests can be run by any team member and at any given point in time and hence are rightly called as “Running, Tested Features”
With this understanding of Acceptance Tests let us understand the ATDD process.
Acceptance Test Driven Development Process
The below diagram depicts ATDD process:

As seen in the above diagram, the pre-requisite is to have functional requirements or in a more Agile terminology a “User Story”. For every user story,
- The QA writes Acceptance tests (functional test cases) in a domain specific language (DSL).
- These test cases are reviewed by customers and developers and customer buy in is very important.
- The developers start implementing the functionality based on the acceptance tests.
- The QA executes acceptance tests, validates the functionality, raises defects if required, and this process continues till all the acceptance tests are passed.
- There is always a review rework cycle which makes the tests more robust & increases coverage and once all the Acceptance tests passes; the User story will get accepted.
Thus we see that collaboration between the team members (tester, developer and customer) is key to make ATDD a success. However it is not the only one…
Accelerators for ATDD
As we see in the above process, till all acceptance tests are passed, the user story cannot be accepted. Given the time frame of a Sprint (which is usually 2-3 weeks), most often the test team becomes a bottleneck if stories are not delivered on time to the QA team. To combat this few of the accelerators are:
- Automation:
Automation plays a key role here. As the developers are implementing the code, the QA team can also start automating the Acceptance tests that are already ready. This will not only reduce the total time taken by the QA team to execute the Acceptance tests but will also ensure that the User stories are getting completed in the given sprint. However the QA team requires changing their mindset and implementing automation within the sprint as was discussed in our earlier blog on ‘Early Automation’. It is also necessary that the entire team adopts best practices in automation as was described in our blog ‘Inverting the Test Pyramid’. With developers and testers jointly working on automation and pushing more & more automation towards unit/ components levels, a right and robust framework can be built.
- Continuous Integration:
As developers start checking in the code and QA ready with their automation scripts & unit/component level scripts, with Continuous Integration (CI) in place, things can start moving faster. As build gets deployed on the test environment through CI at regular intervals, an automated smoke test triggered through CI can check the sanity of the build. Similarly execution of Acceptance tests through CI will do the task of test case execution and can find bugs at the earliest and its helps in reducing Cost of Quality and increases overall productivity. And all this happens unattended.
Conclusion
In summary, the key takeaway and benefits of adopting ATDD are:
- Unambiguous, executable specifications in the form of Acceptance tests that are understood by every member of the team
- Higher % of Automation leading to Reduced cycle times & faster time to market
- Quality is everybody’s responsibility. A strong collaboration between Customer, Developer and Tester.
- Involvement of Test team right in the beginning
- Motivated work force.
Thus to conclude, in this series of four blog posts on Automation we have tried to emphasize upon the fact that “Automation is a necessity, but it is even more necessary to do Automation in the right manner to reap the rich benefits that it brings.”
Click on our webinar recording that articulates these ideas for a successful transformation of your software engineering organization:
https://www.youtube.com/watch?v=pXLSEetDIxo&feature=youtu.be

