Python Testing: Beginner's Guide

An easy and convenient approach to testing your powerful Python projects

Python Testing: Beginner's Guide



1 customer reviews
An easy and convenient approach to testing your powerful Python projects
Mapt Subscription
FREE
$0.00/m after trial
eBook
$10.00
RRP $23.99
Save 58%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt subscription?
  • Unlimited access to all Packt’s 6,000+ eBooks and Videos
  • 100+ new titles a month, learning paths, assessments & code files
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$39.99
$29.99 p/m after trial
RRP $23.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Python Testing: Beginner's Guide Book Cover
Python Testing: Beginner's Guide
$ 23.99
$ 10.00
Python Testing Cookbook Book Cover
Python Testing Cookbook
$ 26.99
$ 10.00
Buy 2 for $20.00
Save $30.98
Add to Cart

Book Details

ISBN 139781847198846
Paperback256 pages

Book Description

Automated testing moves much of the labor of testing off the developer and makes it easier as well as quicker to find bugs and fix them. Automated tests run faster, increase test coverage, and lower costs. However, testing is neither an easy process nor remotely exciting for most developers. But with the right techniques and tools, testing can become a simple and gratifying part of the development process.

With this helpful guide – from an expert – in your hand, testing will not be a tiresome topic for you anymore. You will learn how to test your Python projects in the easiest way, making other parts of the development process easier and more enjoyable.

This book covers the tools and techniques of automated testing and test-driven development. Starting from the very basics, the chapters introduce new tools and techniques in simple, accessible language with step-by-step examples. You will explore how to make testing easier and more accurate with Python's doctest module and learn test-driven development using the unittest framework. You will also learn how to keep your units separate from each other and discover a simple and easy way to integrate Mocker and unittest. Next, we cover integration testing and web application testing.

Automated testing gives developers better feedback, faster and more often. Bugs get found sooner and fixed better, with less effort. By the end of this book, you will have all of the skills needed to benefit from automated testing.

Table of Contents

What You Will Learn

  • Make testing easy and convenient with Python's doctest module, which lets you put your tests right into your doc strings
  • Drive development using unit testing and learn how it can make the process quicker
  • Explore the assorted features Mocker provides to help you keep units separate from each other and customize it to suit your needs
  • Embed your tests in a controlled and temporary environment using test fixtures
  • Simplify the integration of unittest and Mocker using Python Mocker's MockerTestCase
  • Automatically find and execute tests using Nose – a unittest-based testing framework for Python that makes writing and running tests easier
  • Write tests for web applications using Twill and integrate it's capabilities as a library into Python testing code
  • Create integration tests and run them to see if your programs work correctly in concert with each other
  • Run Nose automatically when your version control software detects changes in the source code
  • Set up the Buildbot automated continuous integration system to run your tests repeatedly over many different environments


Chapter 1
introduces Python test-driven development and various testing methods.

Chapter 2 covers the doctest tool and teaches you how to use it.

Chapter 3 introduces the ideas of unit testing and test-driven development, and applies doctest to create unit tests.

Chapter 4 covers mock objects and the Python Mocker tool.

Chapter 5 introduces the unittest framework and discusses when it is preferred over doctest.

Chapter 6 introduces the Nose test runner, and discusses project organization.

Chapter 7 walks through a complete test-driven development process.

Chapter 8 applies the knowledge gained from previous chapters to web applications, and introduces the Twill tool.

Chapter 9 teaches how to build up from unit tests to tests of a complete software system.

Chapter 10 introduces code coverage and continuous integration, and teaches how to tie automated testing into version control systems.

Authors

Table of Contents

Book Details

ISBN 139781847198846
Paperback256 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Python Testing Cookbook Book Cover
Python Testing Cookbook
$ 26.99
$ 10.00
The Professional ScrumMaster's Handbook Book Cover
The Professional ScrumMaster's Handbook
$ 29.99
$ 10.00
Network Analysis using Wireshark Cookbook Book Cover
Network Analysis using Wireshark Cookbook
$ 29.99
$ 6.00
Penetration Testing with the Bash shell Book Cover
Penetration Testing with the Bash shell
$ 13.99
$ 9.80
SSL VPN : Understanding, evaluating and planning secure, web-based remote access Book Cover
SSL VPN : Understanding, evaluating and planning secure, web-based remote access
$ 29.99
$ 10.00
Python 3 Web Development Beginner's Guide Book Cover
Python 3 Web Development Beginner's Guide
$ 26.99
$ 5.40