Chapter 6
Writing Acceptance Tests
IN THIS CHAPTER, you take your testing techniques to the next level. So far, the testing has been focused around the unit level—the individual parts of the application. Now you turn your attention to the full journeys through the code. Does the application actually behave as you expect? When you run the application, as the end user will actually use it, do you get the results and output that you expect? If unit testing verifies that the code does exactly what the programmer expects it to do, then acceptance testing verifies that the code does what the user expects it to do.
You will also be shown the development process using acceptance tests. Much in the same way as unit tests allow us to follow the test driven development (TDD) approach, acceptance tests allow the behavior driven development (BDD) approach. You will see how you can apply the process of TDD one step higher and write your acceptance tests first, then your units.
What Is Acceptance Testing?
A relatively new approach to testing, acceptance tests verify the actual behavior of your application and ensure it delivers to the end user exactly what they expect it to. Another aspect that is integral to the agile development process, acceptance testing can be a key structural element in your development cycle, bringing in not just your developers and QA (quality assurance) personnel but also less technical personnel such as business analysts and product owners. These types of tests are ...
Get Testing Python: Applying Unit Testing, TDD, BDD and Acceptance Testing now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.