Florian Bruhin
pytest: Simple, rapid and fun testing with Python
#1about 2 minutes
Understanding the core features and benefits of pytest
Pytest simplifies testing with automatic test discovery, useful failure reports, parameterization, and a powerful fixture system.
#2about 5 minutes
Writing simple tests with plain assert statements
Pytest eliminates boilerplate by using standard Python `assert` statements and provides detailed failure reports through assertion rewriting.
#3about 3 minutes
Using markers to conditionally skip and group tests
Use decorators like `@pytest.mark.skipif` to conditionally run tests and custom markers to tag and select specific test groups.
#4about 3 minutes
Creating data-driven tests with parameterization
The `@pytest.mark.parametrize` decorator allows running a single test function with multiple sets of input data, reducing code duplication.
#5about 7 minutes
Modularizing setup and teardown with fixtures
Fixtures use dependency injection to provide reusable setup and teardown logic for tests, allowing for modular and composable test resources.
#6about 3 minutes
Using built-in fixtures for common testing tasks
Pytest provides built-in fixtures like `tmppath` for creating temporary directories and `monkeypatch` for modifying state on a per-test basis.
#7about 7 minutes
Extending pytest functionality with popular plugins
Explore the pytest plugin ecosystem, including `pytest-cov` for coverage, `pytest-bdd` for behavior-driven development, and `hypothesis` for property-based testing.
#8about 14 minutes
Migrating to pytest and preparing for future releases
Learn how to migrate existing test suites to pytest and get a preview of upcoming features in the pytest 7.0 release, such as type annotations.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
27:57 MIN
Testing against a real, persistent database service
Three-and-a-half Ways of Testing your Repositories
10:27 MIN
Building a testing foundation with unit tests
Trunk-Based Development at Scale: Real-World Insights from a High-Traffic Luxury E-Commerce Platform
41:20 MIN
Summary of key principles for better testing
Write tests you love, not hate
25:53 MIN
An overview of testing tools for Tezos contracts
Developer’s Perspective: Overview of the Tezos Blockchain Ecosystem
04:14 MIN
Why use existing test frameworks for security
Plants vs. Thieves: Automated Tests in the World of Web Security
12:36 MIN
How TDD builds a strong foundation of unit tests
Treat yourself - A tale about dog training and test-driven development
38:54 MIN
Q&A on tools, frameworks, and implementation
Using non-functional testing to guide user interface, backend services, voice interface, and media development
43:55 MIN
Q&A on mocking responses and advanced test patterns
Watch Tests Go Brrrr! : Getting Started with Cypress in ReactJS
Featured Partners
Related Videos
How not to test
Golo Roden
Continuous testing - run automated tests for every change!
Christian Kühn
Python: Behind the Scenes
Diana Gastrin
Test Driven Development with JavaScript
Sascha Depold & Parinaz Roghany
How To Test A Ball of Mud
Ryan Latta
Measure and improve frontend performance by using test automation
Ramona Schwering
Write tests you love, not hate
Jens Happe
Are you still programming unit tests or already generating?
Johannes Bergsmann & Daniel Bauer
From learning to earning
Jobs that call for the skills explored in this talk.


Testeur Auto - Robot Framework anglais mandatory - Lyon/ass (IT)
Lyon, France
Scrum
Python
Test Case Design
Agile Methodologies
Testeur en Automatisation Python - Pytest H/F
Fortil Group
Canton d'Antibes-3, France
Remote
Senior
API
JIRA
REST
Azure
+8
Node.js/Playwright Engineer - Testdriver Development
TechBiz Global GmbH
Canton of Montpellier-3, France
Remote
REST
Docker
Node.js
JavaScript
+1
Node.js/Playwright Engineer - Testdriver Development
TechBiz Global GmbH
Paris, France
Remote
REST
Docker
Node.js
JavaScript
+1
Node.js/Playwright Engineer - Testdriver Development
TechBiz Global GmbH
Canton of Bordeaux-2, France
Remote
REST
Docker
Node.js
JavaScript
+1
Node.js/Playwright Engineer - Testdriver Development
TechBiz Global GmbH
Mainz, Germany
Remote
REST
Docker
Node.js
JavaScript
+1
Node.js/Playwright Engineer - Testdriver Development
TechBiz Global GmbH
Quedlinburg, Germany
Remote
REST
Docker
Node.js
JavaScript
+1


