Python Unittest Tutorial Using the Unittest framework

Unit testing or whitebox testing, is a good way to enforce quality checks early on during product development phase. Unit test will test a small component of the application, for e.g. a method, or a smallest testable part of any software. Its different from integration tests where the integrated product is tested.
In this video session let us learn about Unit testing in Python3.

We will be using "unittest" framework, which comes as default Python standard library installation and dont need extra install. 

We will be using python 3.6 version and Pycharm as the IDE for our tutorials. We will be getting started with the following topics:
  • Test pkgs organize
  • Unittest rules:
    •  Import unittest, subclassing unittest.TestCase.
    •  Naming the tests.
    •  Using assert from TestCase class
    •  Run the Testcases using unittest runner
    • Write tests for a "simple calculator" app
  • How to Run test from Pycharm IDE - Reports in Pycharm "run" console
  • Show passed, Show ignored, and Export to html.


Ref Links: https://docs.python.org/3/library/unittest.html

The full Python Unit Testing videos here in Youtube.

Python Testing course in Udemy link here.

1 comment: