arrow-left Back to topicQuizConfigurationCheck yourself1.You want retries: 2 to apply to every test. Where do you put it in playwright.config.ts?Inside use: { retries: 2 }At the top level: defineConfig({ retries: 2 })Inside each project: projects: [{ name: 'chromium', retries: 2 }]2.What does webServer: { reuseExistingServer: !process.env.CI } do?On CI it starts a fresh server every time; locally it reuses an already-running serverOn CI it skips starting the server; locally it always starts a new oneIt only affects how many server instances are started in parallel3.What is the purpose of testDir in playwright.config.ts?It sets the directory where Playwright stores test results and screenshotsIt tells Playwright where to look for test files to runIt defines the working directory for the webServer commandIt controls which directory fixtures are loaded from4.What does forbidOnly: !!process.env.CI do in the config?It prevents tests from running in parallel on CIIt causes the test run to fail if any test or describe block is marked with .only on CIIt prevents test.skip() from being used on CIIt makes all tests run in strict mode on CI5.What does extraHTTPHeaders in the use block do?It adds custom HTTP headers to every request made by page.goto() and all network requests from the browserIt adds headers only to requests made with page.request (the API testing client), not to browser page requestsIt intercepts responses and injects headers into them before Playwright sees themIt sets the Content-Type header for all form submissions6.Where should you configure the HTML reporter in playwright.config.ts?Inside the use: {} block alongside baseURL and viewportAt the top level of defineConfig — reporter: 'html'Inside each project definition under projects: [{ reporter: 'html' }]In a separate reporter.config.ts file that Playwright picks up automatically7.You want test output files (screenshots, videos, traces) stored in a specific folder. Which config option controls that?testDir — the same directory where test files are foundartifactsDir — a dedicated artifacts storage pathoutputDir — defaults to test-results/ in the project rootstorageDir — configured inside the use block8.What is baseURL in the use block used for?It sets the URL of the webServer that Playwright will start before running testsIt allows page.goto('/path') to work by prepending the base so you don't repeat the full URL in every testIt restricts network requests so only calls to that domain are allowedIt sets the URL that Playwright navigates to when a new page is openedSubmit answersarrow-left PreviousParallelismConfiguration (use)Next arrow-right