• Complain

Ashwin Pajankar - Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python

Here you can read online Ashwin Pajankar - Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2021, publisher: Apress, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Ashwin Pajankar Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python
  • Book:
    Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2021
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

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. Youll 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. Youll 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. Youll then explore logging frameworks such as Pythons 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 ForPython developers, software testers, open source enthusiasts, and contributors to the Python community.

Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Contents
Landmarks
Book cover of Python Unit Test Automation Ashwin Pajankar Python Unit - photo 1
Book cover of Python Unit Test Automation
Ashwin Pajankar
Python Unit Test Automation
Automate, Organize, and Execute Unit Tests in Python
2nd ed.
Logo of the publisher Ashwin Pajankar Nashik Maharashtra India ISBN - photo 2
Logo of the publisher
Ashwin Pajankar
Nashik, Maharashtra, India
ISBN 978-1-4842-7853-6 e-ISBN 978-1-4842-7854-3
https://doi.org/10.1007/978-1-4842-7854-3
Ashwin Pajankar 2017, 2022
Apress Standard
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made.

This Apress imprint is published by the registered company APress Media, LLC part of Springer Nature.

The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.

I dedicate this book to Alan Mathison Turing, an English mathematician, computer scientist, logician, cryptanalyst, and philosopher who was influential in the development of theoretical computer science.

Introduction
Why This Book?

I have been using Python for more than ten years on a wide variety of projects. Initially, I used it for GUI applications. Then I quickly moved to scientific usage, as my academic projects demanded it. When I entered professional life, I used it for automation first and then for implementation of alert mechanisms. I have been using Python for the last six years in the fields of scientific computing, Internet of Things (IoT), and single board computers. I have written plenty of Python code over these years. I always prefer it to bash scripting, which offers limited capabilities to users like me. At different points over the last ten years, Ive worked as a developer, an R&D engineer, a maker, an author, and a QA specialist. I used Python in every single role.

Whenever I write code, I unit test it thoroughly. I used to unit test all my Python modules in the good old manual way. I used to run all the scripts once and compare the outcome with what was expected. However, I learned that when your codebase grows larger, its pretty difficult to test the scripts manually. Also, all the scripts have to be tested, re-tested, and tested for regression whenever a small part of the codebase changes. I was looking for a way to run all the tests automatically, which led me to reading about test automation. It immediately piqued my curiosity and, after a couple of days, I was running my own automated Python tests.

After acquainting myself with the philosophy of test automation, I applied my newfound knowledge to automate unit and integration testing to web, mobile, GUI, API, and a variety of other types of applications using programming languages like C++, Python, Java, and PHP.

I wrote this book to share my knowledge and experiences while automating unit tests in Python 3. I explore different frameworks and plugins in this book. I learned about the tools and techniques explained in this book by spending numerous hours learning, coding, discussing, and actively participating in diverse Internet forums. I have condensed the knowledge to the basics of the unit test automation frameworks. I hope you will enjoy reading and following the book as much as I enjoyed writing it. This book includes the following:
  • An introduction to Python and various IDEs

  • Various test automation frameworks for Python 3, including doctest , unittest , nose , nose2 , and pytest

  • Logging frameworks and web driver automation

  • Coding standards for Python 3 test automation and implementation of test-driven development with pytest in Python 3

Who This Book Is For

The main audience of this book is Python 3 programmers who want to automate their unit tests. This includes a large and diverse set of people, including developers, test automators, students, researchers, and novice learners. The book is for those who have some knowledge of the Python programming language. The test automation engineers who have already worked with other programming frameworks, such as Java and C++, will find this book immensely useful to learn how test automation is done in Python 3. If you are just beginning with Python 3 programming and want to quickly get into automating the unit tests of your modules and packages, you will find this book helpful.

This book is not a book for learning Python 3 programming and syntax from scratch. It is also not a DIY cookbook for development projects. If your understanding of coding is limited, you will find it difficult to follow this book.

How This Book Is Organized
This book has eight chapters. Here is a sneak peek into the topics covered in each chapter:
  • Chapter: This chapter introduces you to the history and philosophy of Python. It teaches you how to install Python and how to set up the environment for Python 3 programming. It also briefly explores the new features of Python 3 and introduces you to a few popular Python 3 IDEs.

  • Chapter: The aim of this chapter is to quickly get you started with unit test automation in Python 3. The chapter revises the understanding of testing concepts and quickly moves into implementing those concepts with docstring and doctest .

  • Chapter: This chapter serves to introduce xUnit and its philosophy to you. Then it proceeds to teach you how to implement concepts of xUnit with unittest , a xUnit port for Python.

  • Chapter: This chapter explores the inadequacies of unittest . Then it explores a better unit-testing framework, called nose . It explains the installation of plugins for nose to generate reports. It also discusses nose2 , which is nose's next-generation version thats under active development.

  • Chapter: This chapter introduces you to a modular, easy-to-use, unit test framework for Python, called pytest . It discusses the drawbacks of nose and compares nose , unittest , and pytest .

  • Chapter: This chapter introduces you to a web driver automation framework known as selenium . You will learn how to use the Selenium IDE and Selenium Python library.

  • Chapter: This chapter introduces you to various logging frameworks in Python. First, you will explore the built-in framework, logging . Then you will explore a third-party logging library, called loguru .

  • Chapter: This chapter helps you understand the coding and filenaming conventions for facilitating easier test discovery across various unit test frameworks in Python. The chapter concludes the book by implementing a test-driven development in Python 3 using pytest .

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python»

Look at similar books to Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python»

Discussion, reviews of the book Python Unit Test Automation: Automate, Organize, and Execute Unit Tests in Python and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.