Manuals / Selenium WebDriver / Chapter 7
C · Test Infrastructure · intermediate · Week 5–6 · Chapter 7 of 12
Test runners — pytest, TestNG, or JUnit
Raw scripts do not scale. Test runners give discovery, reporting, markers, and parallel hooks.
Path progress52%
Step 1 of 4
pytest or TestNG setup
pytest: tests/test_*.py, assert keywords. TestNG: @Test annotations, testng.xml suite.
Example
# pytest.ini
[pytest]
markers =
smoke: quick checks
regression: full suiteDo this now
Organize tests under tests/. Run full suite with one command.
Was this step clear?
Chapter learning outcomes
- Test discovery
- Markers / groups
- HTML reports
- Parametrize data-driven tests
Clear these before you leave
Side quest
Data-driven login
5 credential rows, 5 outcomes (pass/fail messages).