Python Unit Test Automation
eBook - ePub

Python Unit Test Automation

Automate, Organize, and Execute Unit Tests in Python

  1. English
  2. ePUB (mobile friendly)
  3. Only available on web
eBook - ePub

Python Unit Test Automation

Automate, Organize, and Execute Unit Tests in Python

Book details
Table of contents
Citations

About This Book

Learn how to automate unit tests of Python 3 with automation libraries, such as doctest, unittest, nose, nose2, pytest, and selenium. This book explores important concepts in software test automation and demonstrates how to automate, organize, and execute unit tests with Python. It also introduces readers to the concepts of web browser automation and logging.

This new edition starts with an introduction to Python 3. Next, it covers doctest and pydoc. This isfollowed by a discussion on unittest, a framework that comes packaged with Python 3 itself. There is a dedicated section on creating test suites, followed by an explanation of how nose2 provides automatic test module discovery. Moving forward, you will learn about pytest, the most popular third-party library and testrunner for Python. You will see how to write and execute tests with pytest. You'll also learn to discover tests automatically with pytest.

This edition features two brand new chapters, the firstof which focuses on the basics of web browser automation with Selenium. You'll learn how to use Selenium with unittest to write test cases for browser automation and use the Selenium IDE with web browsers such as Chrome and Firefox. You'll then explore logging frameworks such as Python's built-in logger and the third-party framework loguru.

The book concludes with an exploration of test-driven development with pytest, during which you will execute a small project using TDD methodology.

What You Will Learn

  • Start testing with doctest and unittest
  • Understand the idea of unit testing
  • Get started with nose 2 and pytest
  • Learn how to use logger and loguru
  • Work with Selenium and test driven development

Who This Book Is For Python developers, software testers, open source enthusiasts, and contributors to the Python community.

Frequently asked questions

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.
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.
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.
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.
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.
Yes, you can access Python Unit Test Automation by Ashwin Pajankar 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

Publisher
Apress
Year
2021
ISBN
9781484278543
Edition
2

Table of contents

  1. Cover
  2. Front Matter
  3. 1. Introduction to Python
  4. 2. Getting Started
  5. 3. unittest
  6. 4. nose and nose2
  7. 5. pytest
  8. 6. Testing with Selenium
  9. 7. Logging in Python
  10. 8. Tips and Tricks
  11. Back Matter