Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python, 2nd Edition

0
(0)

Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python, 2nd Edition
 

  • Author:Ashwin Pajankar
  • Length: 230 pages
  • Edition: 2
  • Publisher: Apress
  • Publication Date: 2021-12-18
  • ISBN-10: 1484278534
  • ISBN-13: 9781484278536
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    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 is followed 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 first of 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.

    中文:

    书名:Python单元测试自动化:在Python中自动化、组织和执行单元测试,第2版

    了解如何使用自动化库自动执行Python3的单元测试,例如doctest、unittest、ns、nose2、pytest和Selify。本书探讨了软件测试自动化中的重要概念,并演示了如何使用Python自动化、组织和执行单元测试。它还向读者介绍了Web浏览器自动化和日志记录的概念。

    这个新版本从对Python3的介绍开始。接下来,它涵盖了doctest和pydoc.然后是关于unittest的讨论,unittest是一个与Python3本身打包在一起的框架。有专门的一节介绍如何创建测试套件,然后解释nose2如何提供自动测试模块发现。接下来,您将了解最流行的第三方库和Python的测试者–pytest。您将了解如何使用pytest编写和执行测试。您还将学习如何使用pytest自动发现测试。

    这一版本有两个全新的章节,第一章重点介绍了使用Selify实现Web浏览器自动化的基础知识。您将学习如何结合使用Selify和unittest来编写用于浏览器自动化的测试用例,以及如何在Chrome和Firefox等Web浏览器中使用Selify IDE。然后,您将探索日志记录框架,如Python的内置记录器和第三方框架Loguru。

    本书最后探讨了如何使用PYTEST进行测试驱动的开发,在此过程中,您将使用TDD方法执行一个小项目。

    你将学到什么

    • 从doctest和unittest开始测试
    • 理解单元测试的概念
    • 开始使用Nose 2和PYTEST
    • 了解如何使用记录器和记录器
    • 使用Selify和测试驱动的开发

    Who This Book Is For

    Python开发人员、软件测试人员、开源爱好者和Python社区的贡献者。

  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

    平均分 0 / 5. 投票数: 0

    还没有投票!请为他投一票。

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册