Python Unit Testing: Testing Python Code Using pytest
Python
| Intermediate
- 12 videos | 1h 13m 26s
- Includes Assessment
- Earns a Badge
Explore several types of testing frameworks for Python applications, including the unittest framework, pytest, and doctest, in this 12-video course. First, you will learn how to define and run tests, and how to streamline tests by using fixtures. You will learn the important features of the pytest framework to create small test units, and to define and run individual tests. Next, you will learn to group tests into multiple scripts, and how to execute multiple test scripts within a single run. Learners will observe how to create a simple test, and learn to increase the complexity by defining test scripts to cover multiple tests for your application. You will explore the execution and skipping of specific tests in scripts, then learn to simplify tests by using parameterization. You will learn how to apply filters on different tests, and to execute tests with a certain string in the test name, and examine the use of markers in a test. Finally, you will learn how to use fixtures to run operations common to multiple tests.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseWrite and execute a test using pytestExecute tests defined in multiple scripts using pytestPick the tests to execute based on the test function namesStop the execution of tests when there are a specific number of test failuresApply markers to tests and run only those tests which contain specific marker, and skip the execution of specific tests unconditionally
-
Debug test scripts using the python debuggerParametrize calls to a function an application using the pytest parametrize decoratorUse fixtures to define common operations for test functionsApply module and function level scopes for fixtures functionsBundle fixture functions which are shared across scripts within a single conftest.py fileSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 10s
-
7m 7sIn this video, find out how to write and execute a test using pytest. FREE ACCESS
-
8m 5sIn this video, find out how to execute tests defined in multiple scripts using pytest. FREE ACCESS
-
6m 53sIn this video, find out how to pick the tests to execute based on the test function names. FREE ACCESS
-
4m 30sDuring this video, you will learn how to stop the execution of tests when there is a specific number of test failures. FREE ACCESS
-
8m 16sDuring this video, you will learn how to apply markers to tests and run only those tests which contain a specific marker, and skip the execution of specific tests unconditionally. FREE ACCESS
-
4m 48sIn this video, you will debug test scripts using the Python debugger. FREE ACCESS
-
7m 32sLearn how to parametrize calls to a function in an application using the pytest parametrize decorator. FREE ACCESS
-
8m 45sDuring this video, you will learn how to use fixtures to define common operations for test functions. FREE ACCESS
-
7m 13sIn this video, you will apply module and function level scopes for fixture functions. FREE ACCESS
-
6m 28sDuring this video, you will learn how to bundle fixture functions which are shared across scripts within a single conftest.py file. FREE ACCESS
-
1m 42s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.YOU MIGHT ALSO LIKE
Audiobook
Python Essentials For Dummies