Für diesen Artikel ist leider kein Bild verfügbar.

Python Testing Cookbook

Easy solutions to test your Python projects using test-driven development and Selenium, 2nd Edition
Buch | Softcover
396 Seiten
2018 | 2nd Revised edition
Packt Publishing Limited (Verlag)
978-1-78712-252-9 (ISBN)
41,10 inkl. MwSt
  • Titel ist leider vergriffen;
    keine Neuauflage
  • Artikel merken
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 DescriptionAutomated 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 forIf 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.

Greg L. Turnquist has worked in the software industry since 1997. He is an active participant in the open source community and has contributed patches to several projects, including MythTV, Spring Security, MediaWiki, and the TestNG Eclipse plugin. 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 2006, he created the Spring Python project and went on to write Spring Python 1.1 in 2010. He joined SpringSource, a division of VMware in 2010, as part of its international software development team. Bhaskar N. Das has 8 years' experience in various projects involving application development, maintenance, and support with IBM. He has worked in various technologies and domains including Java, Python, application servers, the cloud, and various database technologies. His domain expertise includes finance and asset management (IT and finance assets). His areas of interest include big data, business finance optimization and scaling, data science, and Machine Learning.

Table of Contents

USING UNITTEST TO DEVELOP BASIC TESTS
RUNNING AUTOMATED TEST SUITES WITH NOSE
CREATING TESTABLE DOCUMENTATION WITH DOCTEST
TESTING CUSTOMER STORIES WITH BEHAVIOR DRIVEN DEVELOPMENT
HIGH LEVEL CUSTOMER SCENARIOS WITH ACCEPTANCE TESTING
INTEGRATING AUTOMATED TESTS WITH CONTINUOUS INTEGRATION
MEASURING YOUR SUCCESS WITH TEST COVERAGE
SMOKE/LOAD TESTING—TESTING MAJOR PARTS
GOOD TEST HABITS FOR NEW AND LEGACY SYSTEMS
Web UI testing using Selenium

Erscheinungsdatum
Verlagsort Birmingham
Sprache englisch
Maße 75 x 93 mm
Themenwelt Informatik Programmiersprachen / -werkzeuge Python
Informatik Software Entwicklung Qualität / Testen
ISBN-10 1-78712-252-2 / 1787122522
ISBN-13 978-1-78712-252-9 / 9781787122529
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
eine praktische, projektbasierte Programmiereinführung

von Eric Matthes

Buch | Softcover (2023)
dpunkt (Verlag)
32,90
das umfassende Handbuch

von Johannes Ernesti; Peter Kaiser

Buch | Hardcover (2023)
Rheinwerk (Verlag)
44,90
Grundlagen und Praxis der Python-Programmierung

von Paul Barry

Buch | Softcover (2024)
O'Reilly (Verlag)
49,90