- Official Documentation for Python Unit Test
- Official Documentation for pytest
- Trending Discussions and Questions about Python unittest
- Trending Discussions and Questions about pytest
- Participants must have some background knowledge of Python programming language.
- 2 - 3 days
- All participants must have a laptop with Internet connectivity
- Make sure you have Python 2.6+/3.4+ or above installed.
Course Outline for Unit Testing with unittest and pytest in Python
- What is Testing?
- Need for Testing
- Types of Testing
- Writing Testcases
- Testing Techniques
- Unit Testing in Python
- Simple Unit test examples
- Test discovery
- Test Runner
- Assert methods
- Using the skip() decorator
- Decorators to implement test skipping and expected failures
- What are fixtures ?
- setUpClass and tearDownClass
- setUpModule and tearDownModule
- Why pytest?
- Assertion rewriting with pytest
- Running unittests from pytest
- What is Parameterizing ?
- Parameterizing in pytest
- pytest Fixtures
- Benefits of pytest fixtures
- Built-in Fixtures
- Installing and Using plugins
The classroom training will be provided in Bangalore (Bengaluru), Chennai, Hyderabad or Mumbai and will be conducted in the client's premises. All the necessary hardware/software infrastructure must be provided by the client.