Python Testing Cookbook

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

Nonfiction, Computers, Programming, Software Development, Programming Languages, General Computing
Cover of the book Python Testing Cookbook by Greg L. Turnquist, Bhaskar N. Das, Packt Publishing
View on Amazon View on AbeBooks View on Kobo View on B.Depository View on eBay View on Walmart
Author: Greg L. Turnquist, Bhaskar N. Das ISBN: 9781787281509
Publisher: Packt Publishing Publication: June 29, 2018
Imprint: Packt Publishing Language: English
Author: Greg L. Turnquist, Bhaskar N. Das
ISBN: 9781787281509
Publisher: Packt Publishing
Publication: June 29, 2018
Imprint: Packt Publishing
Language: English

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.

View on Amazon View on AbeBooks View on Kobo View on B.Depository View on eBay View on Walmart

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

Key Features

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

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.

More books from Packt Publishing

Cover of the book Mastering QlikView Data Visualization by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Learning SAP BusinessObjects Dashboards by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Getting Started with ownCloud by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Microsoft Azure Security by Greg L. Turnquist, Bhaskar N. Das
Cover of the book iPhone User Interface Cookbook by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Penetration Testing with BackBox by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Raspberry Pi Home Automation with Arduino - Second Edition by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Drush for Developers - Second Edition by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Build Gamified Websites with PHP and jQuery by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Instant QlikView 11 Application Development by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Instant Migration from Windows Server 2008 and 2008 R2 to 2012 How-to by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Ethereum Smart Contract Development by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Building Cross-Platform Desktop Applications with Electron by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Delphi Cookbook by Greg L. Turnquist, Bhaskar N. Das
Cover of the book Nginx 1 Web Server Implementation Cookbook by Greg L. Turnquist, Bhaskar N. Das
We use our own "cookies" and third party cookies to improve services and to see statistical information. By using this website, you agree to our Privacy Policy