Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
An easy and convenient approach to testing your powerful Python projects
Covers everything you need to test your code in Python
Easiest and enjoyable approach to learn Python testing
Write, execute, and understand the result of tests in the unit test framework
Packed with step-by-step examples and clear explanations
In Detail
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.
Test-driven development of Python software—make development easier using some of the best testing tools out there
Average Rating: ![]()
![]()
![]()
![]()
Based on 3 Ratings
"I think...." - by Umtapao on 07-JUN-2011
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
Examples are a bit difficult to follow.
such as the 'PID' example. I think it's a topic for auto-control engineering.
Report as Inappropriate
"Python tests" - by johnrod on 06-MAY-2010
Reviewer Rating: ![]()
![]()
![]()
![]()
![]()
Scripts are often used to run tests, e.g. as series of shell commands, user interface protocols, builds, or regression. Python also runs apps and webpages. The author provides examples of how to test scripts themselves. As a type of test-driven development or automation, types include unit, integration, system or website. The method includes visual diagramming, command syntax and api documentation, test wrappers, data files, error injection, code coverage, mock objects, search for test files and version control. Ten chapters each explain the steps, add a “what just happened?” description of the demo results, have a pop quiz and chapter summary. Tools include doctest, unittest, Nose, twill, python mocker, bazaar, mercurial, git, darcs, subversion, and buildbot.
Report as Inappropriate
Top Level Categories:
Information Technology & Software Development
Sub-Categories:
Information Technology & Software Development > Programming
Programming > Python