Maxtrain.com - info@maxtrain.com - 513-322-8888 - 866-595-6863
Test Automation with Python
Description
Test Automation with Python Introduction
Welcome to our course on Test Automation with Python, where we dive into the world of efficient and effective testing using the pytest framework. Known for its simplicity and flexibility, pytest is widely recognized as the most ‘Pythonic’ way of conducting tests in Python. This course is designed to equip you with the necessary skills to master pytest, making it an integral part of your everyday coding workflow.
You’ll discover its powerful features and plugins that simplify a wide range of testing tasks, enabling you to tackle even the most complex testing scenarios with ease.
Throughout this course, you’ll embark on a journey from basic to advanced testing techniques. We’ll start by introducing you to pytest, helping you become proficient from the outset by applying it to real-world testing challenges. You’ll learn how to seamlessly integrate pytest into existing unittest-based test suites, with practical tips for transitioning to a pytest-centric approach.
This course is not just about learning pytest but also about enhancing your overall testing strategy. We’ll cover how to write and manage tests effectively, from simple unit tests to comprehensive functional tests. You’ll gain insights into organizing tests in files and directories, boosting your productivity on the command line, and mastering the use of markers for skipping, marking xfail, and parameterizing tests.
Explore advanced topics like fixtures and their applications, including tmpdir, pytestconfig, and monkeypatch. Lastly, we’ll guide you through converting unittest suites to pytest, employing lesser-known yet highly effective techniques.
Test Automation with Python Course Objectives
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
Prerequisites
- 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.
Audience
- 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.
Test Automation with Python Course Outline
Python Refresher
- Python Overview
- Python Basics
- Python Lab
Introducing PyTest
- Why Spend time writing test
- UnitTest Module
- Why PyTest?
- Introductory Lab
Writing and Running Test
- Installing PyTest
- Writing and Running Tests
- Organizing files and packages
- Command Line options
- Configure pytest.ini
- Install and Config Lab
Markers and Parameters
- Mark Basics
- Built-in marks
- Parameterization
- Markers and Parameters Lab
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
Plugins
- Finding and installing plugins
- Overview of plugins
- Plugin Lab
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
$1895.00
|
2 Days Course |