Python Testing Cookbook

Editorial Reviews. About the Author. Greg has worked since as a software engineer at Python Testing Cookbook - Kindle edition by Greg L. Turnquist.
Table of contents

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.

Python Testing Cookbook - Second Edition

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.

Turnquist has worked in the software industry since As a test-obsessed script junky, he has always sought the right tool for the job. He is a firm believer in agile practices and automated testing. He has developed distributed systems and LAMP-based setups, and he has supported mission-critical systems hosted on various platforms. After graduating from Auburn University with a master's in computer engineering, Greg started working with the Harris Corporation.

He worked on many contracts utilizing many types of technology. In , he created the Spring Python project and went on to write Spring Python 1. He joined SpringSource, a division of VMware in , as part of its international software development team. Sign up to our emails for regular updates, bespoke offers, exclusive discounts and great free content.

Log in to your account.

See a Problem?

Not yet a member? Register for an account and access leading-edge content on emerging technologies. Find Ebooks and Videos by Technology Android. Web Development Latest Releases. Packt Hub Technology news, analysis, and tutorials from Packt. News Become a contributor.

Chapter 1

Categories Web development Programming Data Security. Mapt Go to Mapt. Title added to cart. Search for eBooks and Videos. Making your life easier with automated testing of Python is the sole aim of this book. Are you sure you want to claim this product using a token? What do I get with a Mapt subscription? What do I get with an eBook? What do I get with a Video?

Detalhes do produto

Learn more Add to cart. Book Description Are you looking at new ways to write better, more efficient tests? Table of Contents Chapter 1: Running test cases from the command line with increased verbosity.

Python Testing Cookbook, Greg L. Turnquist, eBook - leondumoulin.nl

While the chapter is not going to turn someone into a master of BDD, it is a good introduction to the software that is available for Python developers and contains some good recipes for quickly getting started and utilizing BDD to test an application. In addition to Chapter 4, I also enjoyed Chapters 6 and 7 quite a bit. Chapter 6 details a few different ways to integrate Python tests with the continuous integration platforms of Jenkins and TeamCity.

These recipes include setting up both services to generate reports, run tests on commit and run tests on a scheduled interval. Chapter 7 is similar, but details how to use the coverage tool with a suite of unit tests. As a whole I enjoyed the book and I thought that I was able to pick up some nice new pointers for testing my Python applications. For these developers, each chapter should provide new information and help to get the developer up-to-speed very quickly. For someone that is already familiar with Python and Python TDD, I would suggest checking out the table of contents for the book.

Each chapter is very helpful and provides a good introduction to the topics discussed in the chapter, however because the chapters are written as introductions, if you are already familiar with the topic for that chapter, its unlikely that you'll pick up much new from the chapter. For new developer's I'll give the book 4 stars, for experienced developers I'll give the book 3 stars. Turnquist's "Python Testing Cookbook" explores automated testing at all levels, with the intention of providing the reader with the knowledge needed to implement testing using Python tools to improve software quality.

To this end the book presents over 70 "recipes" in its nine chapters ranging from the basics of unit testing, through test suites, user acceptance and web application testing, continuous integration, and methods for smoke- and load-testing , covering both tools for testing Python, and Python tools for testing.

It also delivers advice about how to get the most from automated testing, which is as much an art as a science. The first three chapters introduce the fundamentals: Having established a solid foundation, subsequent chapters look at increasingly broader levels of automated testing using the appropriate relevant Python tools: Later chapters cover higher level concepts and tools, such as using nose to hook Python tests into "continuous integration" servers both Jenkins and TeamCity are covered in detail , and assessing test coverage using the "coverage" tool both as a metric, and to identify areas that need more tests.

A detailed chapter on smoke- and load-testing includes practical advice on developing multiple test suites for different scenarios, and methods for stress-testing for example, by capturing and replaying real world data to discover weaknesses in a system before going to production. The final chapter distils the author's experience into general advice on making testing a successful part of your code development methodology, both for new and legacy projects.

There's a lot of good stuff in this book: There is also a lot of excellent and hard-won practical advice from the author's own experience - not only in these early chapters but throughout the book - which is consistently valuable in this regard the final chapter is a real highlight and could easily stand alone - I will definitely be re-reading it soon. Elsewhere the various tools and topics are presented clearly with plenty of useful detail, and in some cases have demystified things that I'd always assumed were quite esoteric and difficult to do nose in particular was a revelation to me, but also setting up continuous integration servers and measuring test coverage.

There are a few disappointments: I'd also have liked something about approaches for handling difficult testing scenarios such as software which interacts with the file system or with large files - a few hints here would have been invaluable for me. There are typos in some commands and code in a few recipes e.

However these are fairly minor quibbles, and in conclusion I was impressed with both the breadth of material covered by the book and the level of detail for many topics. Moreover I enjoyed reading it and was often left feeling excited at the prospect of being able to apply the ideas to my own projects, which is I think was one of the author's aims and no mean feat for a technical book.

I think that the combination of the detail together with the author's practical advice make this book both an excellent introduction to testing with Python, and a valuable resource to refer back to subsequently. See all 12 reviews. Most recent customer reviews.

Book Description

Published on January 4, Published on February 7, Published on August 2, Published on July 21, Published on June 24, Published on June 21, Published on June 10, Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more about Amazon Giveaway.

Set up a giveaway. Customers who bought this item also bought. Feedback If you need help or have a question for Customer Service, contact us. Would you like to report poor quality or formatting in this book? Click here Would you like to report this content as inappropriate? Click here Do you believe that this item violates a copyright? There's a problem loading this menu right now.

Get fast, free shipping with Amazon Prime. Your recently viewed items and featured recommendations.


  • Python Testing Cookbook: Greg L. Turnquist: leondumoulin.nl: Books!
  • Customers who bought this item also bought!
  • Downriver.
  • Customers who viewed this item also viewed;
  • HAMLET (non illustrated).
  • Product details?

View or edit your browsing history. Get to Know Us. English Choose a language for shopping. Not Enabled Word Wise: Not Enabled Screen Reader: Enabled Amazon Best Sellers Rank: Would you like to report this content as inappropriate? Do you believe that this item violates a copyright? Amazon Music Stream millions of songs. Amazon Drive Cloud storage from Amazon. Alexa Actionable Analytics for the Web. AmazonGlobal Ship Orders Internationally. Amazon Inspire Digital Educational Resources. Amazon Rapids Fun stories for kids on the go. Amazon Restaurants Food delivery from local restaurants.

ComiXology Thousands of Digital Comics. East Dane Designer Men's Fashion. Shopbop Designer Fashion Brands.