The Book "Python. unittest"
Hello, colleagues! We collected our experience of using unittest in Python in a small book and would like to share it with you. The book examines the issues of creating tests, combining them into groups, run and pass tests. This material is distributed free. We welcome feedback and criticism!
You can get "Python.unittest" from our website.
The material of the book primarily designed for people beginners to understand the testing, but already know the basics of the Python language (it is desirable to have an understanding of the OOP component of Python). We have tried to give enough examples so the problems with mastering of the theme should not be.
I would like to highlight the issue of the appearance of this book in historical perspective, from which it becomes clear why its content is the same. The fact that we were faced with the task of testing the user interface desktop applications, and we chose SikuliX. To work with SikuliX use Java or Python. We chose Python)) the Next step was the question of automating the process of running tests and analyzing the results of their passing. A logical step in this case was the use of a framework for testing, we chose unittest. Its functionality was more than enough, because it was only required to create tests, to unite them in groups, to manage the startup process and get the result in a convenient form for analysis. Mock'and other things we don't need, at least for now. As a result, on the subject of testing and use unittest was written several articles, which were United in a small book "Python.unittest".
The contents of the book:
Chapter 1. Introduction
Off-line testing. Basic concepts
Framework and to conduct Autonomous testing in Python
Example to test the application without a framework
An example test application using unittest
Chapter 2. Writing test cases (class TestCase)
Basic structural elements unittest
Running tests
The command-line interface (CLI)
Graphical user interface (GUI)
Work with the TestCase.
Methods used to run the tests
Methods used in direct writing tests
Methods to gather information about the test
Chapter 3. Organization of tests (class TestSuite)
Loading and running tests
Class TestSuite
Loading and running tests
Class TestLoader
Class TestResult
Class TextTestRunner
Chapter 4. Skipped tests
Training
Pass individual tests in the class
Unconditional skipping tests
Conditional skipping tests
Pass class
Article based on information from habrahabr.ru
You can get "Python.unittest" from our website.
The material of the book primarily designed for people beginners to understand the testing, but already know the basics of the Python language (it is desirable to have an understanding of the OOP component of Python). We have tried to give enough examples so the problems with mastering of the theme should not be.
I would like to highlight the issue of the appearance of this book in historical perspective, from which it becomes clear why its content is the same. The fact that we were faced with the task of testing the user interface desktop applications, and we chose SikuliX. To work with SikuliX use Java or Python. We chose Python)) the Next step was the question of automating the process of running tests and analyzing the results of their passing. A logical step in this case was the use of a framework for testing, we chose unittest. Its functionality was more than enough, because it was only required to create tests, to unite them in groups, to manage the startup process and get the result in a convenient form for analysis. Mock'and other things we don't need, at least for now. As a result, on the subject of testing and use unittest was written several articles, which were United in a small book "Python.unittest".
The contents of the book:
Chapter 1. Introduction
Off-line testing. Basic concepts
Framework and to conduct Autonomous testing in Python
Example to test the application without a framework
An example test application using unittest
Chapter 2. Writing test cases (class TestCase)
Basic structural elements unittest
Running tests
The command-line interface (CLI)
Graphical user interface (GUI)
Work with the TestCase.
Methods used to run the tests
Methods used in direct writing tests
Methods to gather information about the test
Chapter 3. Organization of tests (class TestSuite)
Loading and running tests
Class TestSuite
Loading and running tests
Class TestLoader
Class TestResult
Class TextTestRunner
Chapter 4. Skipped tests
Training
Pass individual tests in the class
Unconditional skipping tests
Conditional skipping tests
Pass class
Комментарии
Отправить комментарий