Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Multiply Your Testing Effectiveness with Parameterized Testing

PyCon US via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore pytest parametrization techniques to enhance testing effectiveness in this 21-minute PyCon US talk by Brian K Okken. Dive into three parametrization methods, test case identifiers, and generators through code examples. Start with a simple test and progress to advanced concepts like function parametrization, fixture parametrization, and custom ids functions. Learn to leverage parameters from named lists, functions, generators, and files. Discover how to run specific test cases, handle object parameters, and combine various techniques. Access slides, code, and additional resources on GitHub to apply these powerful pytest features and streamline your test writing and maintenance process.

Syllabus

Intro
Brian Okken
Value of Tests
Parametrize vs Parameterize
Something to Test
without Parametrization
Moving to one test (don't do this)
Function Parametrization
Parameters from a named list
Parameters from a function
Parameters from a generator
Parameters from a file
Run the last failing test case
Run test cases with 60 degree angles
Run an individual test case
Fixture Parametrization
Object parameters get non-helpful names
An ids function
Custom ids function
pytest_generate_tests()
metafunc
test.param
indirect parameter
indirect example
More test cases
Review
Combining Techniques
Resources

Taught by

PyCon US

Reviews

Start your review of Multiply Your Testing Effectiveness with Parameterized Testing

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.