YoVDO

Unit Testing in Python

Offered By: LinkedIn Learning

Tags

Python Courses Docker Courses Unit Testing Courses Test-Driven Development Courses Test Automation Courses Parametrizations Courses

Course Description

Overview

Learn the fundamentals of unit testing in Python projects. Explore techniques for test-driven development of a Python project using the pytest framework and a Docker container.

Syllabus

Introduction
  • Python unit testing with pytest
  • Why pytest?
  • Roadmap
  • Exercise files
1. Installation and Setup
  • Docker and VS Code (Mac)
  • Docker and VS Code (PC)
  • Running pytest with Docker
2. Overview of Test-Driven Development and Pytest Features
  • Overview of TDD
  • Basic tests and assertions
  • Exceptions
  • Challenge: Exceptions
  • Solution: Exceptions
  • Happy path testing
  • Sad path testing
3. Test Automation with Fixtures and Parametrization
  • Fixtures to amortize costly operations
  • Factory fixtures
  • Parametrization
  • Challenge: Parametrization
  • Solution: Parameterization
4. Organizing Your Pytest Project
  • Using Conftest.py for common functions
  • Modularizing conftest.py
5. Using Pytest with an Existing Project
  • Reading tests to surmise understand behavior
  • Challenge: Adding test coverage
  • Solution: Adding test coverage
Conclusion
  • Next steps

Taught by

Jasmine Omeke

Related Courses

TDD – Desenvolvimento de Software Guiado por Testes
Instituto Tecnológico de Aeronáutica via Coursera
Virtualize and Automate Your SAP Testing Using Int4 IFTT
SAP Learning
Selenium Grid - Running Selenium tests in parallel
Coursera Project Network via Coursera
Source control management for test automation with Git
Coursera Project Network via Coursera
Building Test Automation Framework using Selenium and TestNG
Coursera Project Network via Coursera