TRAININGS
Pytest - advanced topics.
To be agreed upon.
To be agreed upon.
770 $ + VAT
24h
intermediate
To be agreed upon.
To be agreed upon.
770 $ + VAT
24h
INTERMEDIATE
Who is this training for?
What will you learn from our training?
Training Agenda
Review
Here we will focus on several key aspects to provide all participants with a solid foundation of knowledge and skills:
- Review of Basic Testing Concepts in Python: We will start with a review of the basic principles of testing in Python, which will provide a shared knowledge base for all participants.
- Assertions in PyTest: We will focus on assertion techniques in PyTest, discussing how to effectively use these tools to verify test results.
- Conftest - Configuration File: We will analyze the
conftest.py
file, which is crucial for configuring tests in PyTest, showing how to manage test settings with it. - Functional Tests and the FIRST Rule: We will explain what functional tests are and discuss the FIRST rule.
- Fixtures in PyTest: We will thoroughly discuss the fixtures mechanism in PyTest, which is used for creating modular and repeatable tests.
- How to Write Clear and Maintainable Tests: We will provide practical advice on writing tests that are easy to understand and maintain.
- Main Features of PyTest and Differences from Python.UnitTest: We will show how PyTest differs from the standard Python.UnitTest library and what its main advantages are.
This initial segment of the training will provide a foundation for more advanced topics that will be covered later in the course. This will ensure that all participants have an equal start and will be able to fully utilize the remaining part of the training.
Artificial Test Environment - Fakes, Mocks, Stubs
We will discuss various methods of creating an artificial test environment, including the use of fakes, mocks, and stubs.
Extending Functionality with Plugins
We will present how to extend the capabilities of PyTest using plugins. We will cover topics such as assertion rewriting, hook functions, and loading test suites from YAML files. We will discuss popular plugins.
Scaling Tests
We will provide practical examples of scaling tests and discuss how to scale them effectively.
Creating Test Reports
We will discuss methods of creating and interpreting test reports.
Real-Life Example: Communication via HTTP and Serial Port
A practical case in which participants will have the opportunity to write tests for an application that communicates via HTTP and a serial port.
Real-Life Example: Creating a Custom Test Framework Based on PyTest
We will guide participants step by step through the process of creating their own test framework, from configuration and passing arguments to logging and directory structure, and self-tests.
Integration of PyTest with CI (Continuous Integration)
We will show how to integrate PyTest with Continuous Integration systems, which is crucial in modern development practices.
Summary
Finally, we will summarize and answer any questions from the participants.