> For the complete documentation index, see [llms.txt](https://tvn.gitbook.io/test-automation-with-python/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tvn.gitbook.io/test-automation-with-python/pytest/module-4-test-parametrization.md).

# Module 4: Test Parametrization

```python
# test_parametrize.py

import pytest

@pytest.mark.parametrize("x, y, expected_result", [(1, 2, 3), (3, 4, 7), (5, 6, 11)])
def test_addition(x, y, expected_result):
    assert x + y == expected_result

```

```python
# test_fixture_parametrize.py

import pytest

@pytest.fixture(params=["chrome", "firefox"])
def browser(request):
    if request.param == "chrome":
        driver = webdriver.Chrome()
    elif request.param == "firefox":
        driver = webdriver.Firefox()
    yield driver
    driver.quit()

def test_google_search(browser):
    browser.get("https://www.google.com")
    assert "Google" in browser.title

```
