Python Testing Cookbook
eBook - ePub
No longer available |Learn more

Python Testing Cookbook

Easy solutions to test your Python projects using test-driven development and Selenium, 2nd Edition

Greg L. Turnquist, Bhaskar N. Das

Share book
  1. 396 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub
No longer available |Learn more

Python Testing Cookbook

Easy solutions to test your Python projects using test-driven development and Selenium, 2nd Edition

Greg L. Turnquist, Bhaskar N. Das

Book details
Table of contents
Citations

About This Book

Fix everyday testing problems in Python with the help of this solution-based guide

Key Features

  • Use powerful tools such as doctest and unittest to make testing convenient
  • Apply automation testing to an existing legacy system that isn't test oriented
  • A practical guide to ease testing in Python using real-world examples

Book Description

Automated testing is the best way to increase efficiency while reducing the defects of software testing. It helps find bugs in code easily and at an early stage so that they can be tackled efficiently. This book delves into essential testing concepts used in Python to help you build robust and maintainable code.

Python Testing Cookbook begins with a brief introduction to Python's unit testing framework to help you write automated test cases. You will learn how to write suitable test sets for your software and run automated test suites with Nose. You will then work with the unittest.mock library, which allows you to replace the parts of your system that are being tested with mock objects and make assertions about how they have been used. You will also see how to apply Test-driven Development (TDD) and Behavior-driven Development (BDD) and how to eliminate issues caused by TDD. The book explains how to integrate automated tests using Continuous Integration and perform smoke/load testing. It also covers best practices and will help you solve persistent testing issues in Python. The book concludes by helping you understand how doctest works and how Selenium can be used to test code efficiently.

What you will learn

  • Run test cases from the command line with increased verbosity
  • Write a Nose extension to pick tests based on regular expressions
  • Create testable documentation using doctest
  • Use Selenium to test the Web User Interface
  • Write a testable story with Voidspace Mock and Nose
  • Configure TeamCity to run Python tests on commit
  • Update project-level scripts to provide coverage reports

Who this book is for

If you're a Python developer who wants to take testing to the next level and would like to expand your testing skills, this book is for you. It is assumed that you have some Python programming knowledge.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Python Testing Cookbook an online PDF/ePUB?
Yes, you can access Python Testing Cookbook by Greg L. Turnquist, Bhaskar N. Das in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Python. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781787281509
Edition
2

Table of contents