Course Content
Testing Tools
Testing Tools
0/1
Sample Python Programs
Sample Python Programs
0/1
Selenium Python First Script
Selenium Python First Script
0/2
HTML Form elements
HTML Form elements
0/1
Handle HTML Frames
Handle HTML Frames
0/2
Handling Dropdown Lists
Handling Dropdown Lists
0/2
Selenium Action class
Selenium Action class
0/1
Python Database Programming
Python Database Programming
0/1
Selenium Python for Beginners [ 2024 ]
About Lesson

@parameterized Decorator

To parameterize your PyUnit tests, you can use the @parameterized decorator from the parameterized library in Python. This will parameterize your PyUnit tests.

Install parameterized module

Open the Windows command prompt. Issue the following pip install command:

/> pip install parameterized

This will install the parameterized module.

Install Parameterized Module

Once installed, you can import the module into your tests using the following statement:

from parameterized import parameterized

@parameterized tests won’t work inside subclasses of TestCase. You can use @parameterized.expand instead.