← All Playwright Python mock interview topics
Test your knowledge of Test Data, Configuration and Cross-Browser with a timed Playwright Python MCQ mock test. Each attempt gives you 20 random questions in 20 minutes from a 200-question bank covering data-driven tests with parametrize and indirect fixtures, test data in JSON, CSV, Excel and YAML, environment variables and .env files, custom pytest options for multiple environments, base_url, cross-browser runs with –browser, channels and browser markers, mobile device emulation, and context options such as locale, time zone, geolocation, colour scheme and the fake clock. Submit to see your score, the correct answers and an explanation for every question.
What this mock test covers
The questions follow Module 7 of the free Playwright with Python & Pytest tutorial. The Python lessons for this module are on the way; until then, revise with these related tutorials:
- Data-driven (parameterized) tests
- pytest parametrize
- Read and write JSON in Python
- Read and write CSV in Python
- Environment variables with .env
- Cross-browser testing
- Mobile device emulation
Sample questions with answers
- Q. Which pytest feature runs one Playwright test with several data rows?
Answer: @pytest.mark.parametrize
Each row becomes its own test with its own result. - Q. How many tests does @pytest.mark.parametrize('user', ['a', 'b', 'c']) create for one test function on one browser?
Answer: 3
One test per value. - Q. With –browser chromium –browser firefox, how many tests run for a function parametrized with 3 users?
Answer: 6
pytest-playwright parametrizes by browser too: 3 users x 2 browsers. - Q. What do test ids look like for a parametrized Playwright test on Chromium?
Answer: test_login[chromium-standard_user]
The browser id comes first in pytest-playwright 0.10. - Q. Which argument gives readable names to parametrized cases?
Answer: ids=[…] or pytest.param(…, id='…')
Readable ids make reports easy to scan.
Ready for more? Go back to the Playwright Python mock interview dashboard to track your overall interview readiness.
Frequently asked questions
How many questions does the Test Data, Configuration and Cross-Browser mock test have?
The question bank has 200 questions. Each test picks 20 at random, favouring questions you have not seen, so about 10 attempts cover the full bank.
What is the pass mark?
You pass a test with 70% or more, which is 14 of 20 questions correct.
Can I retake the test?
Yes. Retake as often as you like. Every retake draws a fresh set of 20 questions and counts toward your 20-exam readiness target.