Course outline for Unit Testing with unittest and pytest
About Unit Testing with unittest and pytest
Pre-requisites for learning Unit Testing with unittest and pytest
- Participants must have some background knowledge of Python programming language.
Lab Setup
- All participants must have a laptop with Internet connectivity
- Make sure you have Python 2.6+/3.4+ or above installed.
Duration
- 2 - 3 days
Training Mode
Online training for Unit Testing with unittest and pytest
We provide:
- Instructor led live training
- Self-paced learning with access to expert coaches
- 24x7 access to cloud labs with end to end working examples
All jnaapti sessions are 100% hands-on. All our instructors are engineers by heart. Activities are derived from real-life problems faced by our expert faculty. Self-paced hands-on sessions are delivered via Virtual Coach.
Classroom training for Unit Testing with unittest and pytest
Classroom sessions are conducted in client locations in:
- Bengaluru
- Chennai
- Hyderabad
- Mumbai
- Delhi/Gurgaon/NCR
Note: Classroom training is for corporate clients only
Detailed Course Outline for Unit Testing with unittest and pytest
Getting Started
- Installation
- What is Testing?
- Need for Testing
- Types of Testing
- Writing Testcases
- Testing Techniques
Introduction to Unit Test
- Unit Testing in Python
- Simple Unit test examples
- Test discovery
- Test Runner
- Assert methods
Skipping tests and expected failures in unittest
- Using the skip() decorator
- Decorators to implement test skipping and expected failures
Fixtures in unittest
- What are fixtures ?
- setUpClass and tearDownClass
- setUpModule and tearDownModule
pytest
- Why pytest?
- Assertion rewriting with pytest
- Running unittests from pytest
Parameterizing and Fixtures in pytest
- What is Parameterizing ?
- Parameterizing in pytest
- pytest Fixtures
- Benefits of pytest fixtures
- Built-in Fixtures
pytest Plugins
- Installing and Using plugins
- pytest-cov
- pytest-xdist
- pytest-catchlog
- pytest-timeout
- pytest-sugar