Skip to Content
Python Automation Cookbook - Second Edition
book

Python Automation Cookbook - Second Edition

by Jaime Buelta
May 2020
Intermediate to advanced content levelIntermediate to advanced
526 pages
10h 31m
English
Packt Publishing
Content preview from Python Automation Cookbook - Second Edition

12

Automatic Testing Routines

In this chapter, we will cover the following recipes:

  • Writing and executing test cases
  • Testing external code
  • Testing using dependency mocking
  • Testing using HTTP call mocking
  • Preparing testing scenarios
  • Running tests selectively

Introduction

When the code and the complexity of your software grows, generating tests to ensure your program does what it is supposed to do is the best tool to provide you with a firm footing over rocky terrain.

Tests are, in essence, double-checking the code is valid and doing what it is supposed to do. This is a deceptively simple statement, but in practice, it can be very difficult.

Mastering the ability to test is a difficult task and is worth a book or two. The tasks introduced in ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Automation Cookbook

Python Automation Cookbook

Jaime Buelta

Publisher Resources

ISBN: 9781800207080Supplemental Content