Chapter 10

Automating Your Processes

WITH A FIRM testing suite built up over the course of this book, it’s now time to turn your attention to automating the tasks that surround your testing process. By automating as much as possible, you ensure that nothing in the testing suite is missed and you know that every time you make changes to the code base, those changes are going through the same stringent checks that the previous code had gone through. Having this in place early in your project means that as the application changes it continually goes through a pipeline of checks. As the code makes its way through this pipeline, you grow more confident that the application that you have created is ready for production and use by your customers.

Without automation, you will inevitably miss something. This chapter introduces you to some of the automation tools available to solve this problem. By creating tasks using the Python Paver tool and executing them upon every check-in with Jenkins, you can be certain that every test you write is executed each time. You also gain instant feedback if your tests fail for any reason. Jenkins also allows you to automate some more advanced ideas, such as deploying your code into environments on every passing build, known as continuous deployment, or combining with some of the tools introduced in previous chapters, such as coverage or PyLint to produce statistics and graphs for each build.

By the end of this chapter, you should feel comfortable creating ...

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.