Switch to the store?

Python Testing Cookbook

More Information
Learn
  • Get started with the basics of writing automated unit tests and asserting results
  • Use Nose to discover tests and build suites automatically
  • Write Nose plugins that control what tests are discovered and how to produce test reports
  • Add testable documentation to your code
  • Filter out test noise, customize test reports, and tweak doctest's to meet your needs
  • Write testable stories using lots of tools including doctest, mocks, Lettuce, and Should DSL
  • Get started with the basics of customer-oriented acceptance testing
  • Test the web security of your application
  • Configure Jenkins and TeamCity to run your test suite upon check-in
  • Capture test coverage reports in lots of formats, and integrate with Jenkins and Nose
  • Take the pulse of your system with a quick smoke test and overload your system to find its breaking points
  • Add automated testing to an existing legacy system that isn't test oriented

 

About

Are you looking at new ways to write better, more efficient tests? Are you struggling to add automated testing to your existing system? The Python unit testing framework, originally referred to as "PyUnit" and now known as unittest, is a framework that makes it easier for you to write automated test suites efficiently in Python. This book will show you exactly how to squeeze every ounce of value out of automated testing.

The Python Testing Cookbook will empower you to write tests using lots of Python test tools, code samples, screenshots, and detailed explanations. By learning how and when to write tests at every level, you can vastly improve the quality of your code and your personal skill set. Packed with lots of test examples, this will become your go-to book for writing good tests.

This practical cookbook covers lots of test styles including unit-level, test discovery, doctest, BDD, acceptance, smoke, and load testing. It will guide you to use popular Python tools effectively and discover how to write custom extensions. You will learn how to use popular continuous integration systems like Jenkins (formerly known as Hudson) and TeamCity to automatically test your code upon check in. This book explores Python's built-in ability to run code found embedded in doc strings and also plugging in to popular web testing tools like Selenium. By the end of this book, you will be proficient in many test tactics and be ready to apply them to new applications as well as legacy ones.

 

Features
  • Learn to write tests at every level using a variety of Python testing tools
  • The first book to include detailed screenshots and recipes for using Jenkins continuous integration server (formerly known as Hudson)
  • Explore innovative ways to introduce automated testing to legacy systems
  • Written by Greg L. Turnquist – senior software engineer and author of Spring Python 1.1
  • Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible
Page Count 364
Course Length 10 hours 55 minutes
ISBN 9781849514668
Date Of Publication 16 May 2011

Authors

Greg L. Turnquist

Greg L. Turnquist has been a software professional since 1997. In 2002, he joined the senior software team that worked on Harris' $3.5 billion FAA telco program, architecting mission-critical enterprise apps while managing a software team. He provided after-hours support to a nation-wide system and is no stranger to midnight failures and software triages. In 2010, he joined the SpringSource division of VMware, which was spun off into Pivotal in 2013.

As a test-bitten script junky, Java geek, and JavaScript Padawan, he is a member of the Spring Data team and the lead for Spring Session MongoDB. He has made key contributions to Spring Boot, Spring HATEOAS, and Spring Data REST while also serving as editor-at-large for Spring's Getting Started Guides.

Greg wrote technical best sellers Python Testing Cookbook and Learning Spring Boot, First Edition, for Packt Publishing. When he isn't slinging code, Greg enters the world of magic and cross swords, having written the speculative fiction action and adventure novel, Darklight.

He completed his Master's degree in computer engineering at Auburn University and lives in the United States with his family.