workshop online
Testing with Python
Python is a de facto scripting language that is used for many tasks. If you encountered Python on your career path, but never had time to properly dive into testing and TDD with that, then this course is for you.
About the Testing with Python Course
Python is a de facto scripting language that is used for many tasks.
If you encountered Python on your career path, but never had time to properly dive
into testing and TDD with that, then this course is for you.
What You'll Learn in This workshop
-
Apply TDD practices to build reliable Python applications from the ground up
-
Write unit, integration, and acceptance tests with proper isolation and mocking
-
Implement BDD scenarios with behave and API tests with Flask
-
Design performance test suites with locust and generate test data with faker
Testing with Python Outline
1. Module 1
- • Introduction and setup check.
- • Exercise 1: We start right away with coding exercise. The task is to code a complex firewall policy logic with some hints and skeleton code. No TDD, just code. 30 minutes will be not enough, but from the task description, most engineers will tell that it is doable in 30 minutes. After failure, we go into discussion mode.
2. Module 2
- • TDD cycle: red, green, refactor.
- • Overview of Python unittest library.
- • Exercise 2: Implement the same task with firewall policy, but using a TDD cycle by writing unit tests (with hints).
- • Looking at the test coverage.
3. Module 3
- • Overview of Python mocking libraries.
- • Exercise 3: Build on top of firewall policy logic and add integration with firewall log storage. Mock the storage and access logic.
4. Module 4
- • Clean code principles for Python.
- • Integration tests vs unit tests.
- • Introduction to ATDD and double feedback loop.
- • Overview of Docker and Python implementation of testcontainers.
- • Exercise 4: Implement integration tests with a real database for firewall log storage and query. Make sure they run in CI.
5. Module 5
- • Introduction into pair programming.
- • Overview of Python requests library.
- • Exercise 5: Split into pairs. Implement firewall management API with Flask from a template. Add HTTP API acceptance tests.
6. Module 6
- • Introduction into BDD.
- • Overview of Python behave library.
- • Exercise 6: Re-implement acceptance tests with the BDD approach.
7. Module 7
- • Introduction to performance testing.
- • Overview of Python faker library for test data generation.
- • Overview of Python locust library for the performance test suite.
- • Exercise 7: Implement a performance test suite for firewall components.
Who Should Attend
-
developers
-
software architects
-
technical project managers
-
system administrators
What's Included
Pricing
Frequently Asked Questions
Ready to Get Started?
Register now and take your skills to the next level.