Test Automation with Python

The pytest framework is simple to use but powerful enough to cover complex testing integration scenarios. PyTest is considered by many to be the true Pythonic approach to testing in Python.

Retail Price: $1,895.00

Next Date: 06/17/2024

Course Days: 2


Enroll in Next Date

Request Custom Course


Course Objectives

This skills-focused course is approximately 50% hands-on, combining expert lecture, real-world demonstrations and group discussions with machine-based practical labs and exercises.  Working within in a hands-on learning environment students will learn to:

  • Become proficient with pytest from day one by solving real-world testing problems
  • Use pytest to write tests more efficiently
  • Scale from simple to complex and functional testing
  • Write and run simple and complex tests
  • Organize tests in fles and directories
  • Find out how to be more productive on the command line
  • Markers and how to skip, xfail and parametrize tests
  • Explore fxtures and techniques to use them effectively, such as tmpdir, pytestconfg, and monkeypatch
  • Convert unittest suites to pytest using little-known techniques

Course Prerequisites

This in an introductory-level course geared for QA, Test team members and others who want to use the Python testing framework PyTest to implement code testing strategies.  Attendees should have prior basic Python scripting experience.  Students should have some familiarity with tools to be used in this course: PyCharm, Jupyter Notebook and basic GIT.


Outline

Please note that this list of topics is based on our standard course offering, evolved from typical industry uses and trends. We’ll work with you to tune this course and level of coverage to target the skills you need most.

  1. Python Quick Refresh
  • Python Overview
  • Python Basics
  • Python Lab
  1. Introducing PyTest
  • Why Spend time writing test
  • UnitTest Module
  • Why PyTest?
  • Introductory Lab
  1. Writing and Running Test
  • Installing PyTest
  • Writing and Running Tests
  • Organizing files and packages
  • Command Line options
  • Configure pytest.ini
  • Install and Config Lab
  1. Markers and Parameters
  • Mark Basics
  • Built-in marks
  • Parameterization
  • Markers and Parameters Lab
  1. Fixtures
  • Introduction to Fixtures
  • Sharing fixtures with conftest.py files
  • Scopes
  • Autouse
  • Parameterizing fixtures
  • Using marks from fixtures
  • Built-in fixtures
  • Best Practices
  • Fixtures Lab
  • Fixtures Lab 2
  1. Plugins
  • Finding and installing plugins
  • Overview of plugins
  • Plugin Lab
  1. From UnitTest to PyTest
  • Use PyTest as a Test Runner
  • Convert asserts with unitest2pytest
  • Handling setup/teardown
  • Managing test hierarchies
  • Refactoring test utilities
  • Migration strategies
Course Dates Course Times (EST) Delivery Mode GTR
6/17/2024 - 6/18/2024 10:00 AM - 6:00 PM Virtual Enroll
8/12/2024 - 8/13/2024 10:00 AM - 6:00 PM Virtual Enroll
9/30/2024 - 10/1/2024 10:00 AM - 6:00 PM Virtual Enroll
11/4/2024 - 11/5/2024 10:00 AM - 6:00 PM Virtual Enroll
12/16/2024 - 12/17/2024 10:00 AM - 6:00 PM Virtual Enroll