Recommended Free Tools
Put Playwright Test settings in a playwright.config.ts file at the project root, import defineConfig from @playwright/test, and export a configuration object. Place test-runner settings such as retries and workers at the top level, browser settings in use, and separate browser or test variants in projects. The example below is a practical starting point; check option names and defaults against the Playwright version installed in your project.
Create the configuration file
In the root of the project where you run Playwright Test, create playwright.config.ts. The TypeScript format is common, but Playwright supports other configuration file formats too. Import the helpers from @playwright/test and export one configuration object as the default export.
This starter configuration sets a test directory, CI-aware execution options, a shared base URL, a Chromium project, and a local web server:
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'npm run start',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
},
});
Change testDir, the server command, and the URL to match your repository and application. The example illustrates the documented configuration shape; it is not a claim that the command or settings have been tested in your specific project.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitches#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
What the sample does
testDirtells Playwright where to find tests.fullyParallelopts into parallel execution across tests.forbidOnlymakes a CI run fail if a test was left focused withtest.only.retriesandworkersvary with theCIenvironment variable.reporterselects the HTML reporter.usesupplies shared browser/test environment options.projectsnames a Chromium run using the Desktop Chrome device profile.webServerstarts the local app and waits for its readiness URL.
Put each option at the right level
A frequent configuration mistake is nesting an option in the wrong place. Top-level settings control test collection or the overall run. The use object configures the browser and test context. A project can override shared settings for one named group of tests.
| Location | Typical settings | Use it for |
|---|---|---|
| Top level | testDir, timeout, globalTimeout, reporter, retries, workers, fullyParallel, forbidOnly, webServer |
Test discovery and run-wide behavior. |
use |
baseURL, browser name, viewport, storage state, tracing, video |
Settings shared by tests, unless a narrower scope overrides them. |
projects |
A project name and its own use settings |
Distinct browsers, devices, environments, or test groups. |
For example, put retries at the top level, not inside use. Put a shared viewport or storage state in use; put a browser-specific override in the relevant project. The official configuration reference and guide document the supported options, but their availability and defaults can change over time.
Configure projects for browsers, devices, or test groups
Use projects when the same test suite needs to run with different browser or device profiles, or when groups of tests need distinct settings. Each project has a name and can provide its own use values. The starter example defines one project, chromium, based on devices['Desktop Chrome'].
To add another profile, add another object to the projects array and give it a distinct name. Decide first what the project represents: a browser, a device, an environment, or a test group. This makes the run results easier to interpret and helps avoid hiding meaningful differences behind a generic project name.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchRank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Top-level options are shared unless a project-level setting overrides them. Use that distinction deliberately: keep genuinely common behavior shared, and set a project-specific value only where that project needs a different behavior. Check the installed Playwright version before copying options from documentation for a different release.
Choose parallelism, workers, and retries deliberately
Playwright runs test files in parallel by default. Tests within an individual file run in order in one worker unless you configure parallel execution differently. workers limits concurrent worker processes; setting it to 1 disables parallelism. fullyParallel: true opts the run into parallel execution across tests.
More concurrent workers can increase throughput, but parallel tests run in separate worker processes. They cannot rely on shared in-memory state or global variables to communicate or coordinate. If tests interfere with one another, reduce concurrency while you identify and remove the dependency; simply increasing or decreasing workers is not a substitute for making test setup independent.
Retries default to zero. The example enables two retries when CI is set and none otherwise, but that is a policy choice, not a universal best setting. A test that fails on its first attempt and passes on retry is flaky evidence worth investigating. A retry can help reveal instability; it does not repair the underlying cause or make the test reliable.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Choose a starting point
- Use
workers: 1when you need to disable parallel scheduling while diagnosing order or resource conflicts. - Use a deliberate worker limit when the test environment has constrained resources or parallel activity causes interference.
- Enable retries only when you have a reason to collect evidence about intermittent failures, and inspect the first failure rather than treating the final pass as proof.
- Keep local and CI settings explicit so the difference in execution policy is visible in the configuration.
Start a local app and set the base URL
Use webServer when a test run should start the application it tests. Its command starts the process, and its url tells Playwright which address to check for readiness. In the example, npm run start is the command and http://localhost:3000 is the readiness URL. Replace both with values that are valid for your project.
Set use.baseURL when tests should navigate with relative paths. With the sample value, a test can use page.goto('/login'); Playwright resolves the path against the configured base URL. If you configure an array of multiple web servers, explicitly set baseURL.
The sample sets reuseExistingServer: !process.env.CI: outside CI, it can reuse an existing server; in CI, it does not request that reuse behavior. Confirm that this matches how your local and CI environments are managed, especially if an existing process could point tests at the wrong application instance.
Run the configuration and verify its behavior
Run Playwright Test using the test command already configured in your project, or the command supplied by your package scripts. The exact script name is project-specific, so this example does not assume one. Verify that Playwright discovers tests under the configured directory, launches the expected server, and uses the intended project and browser settings.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
- Check the installed Playwright Test version and confirm the configuration options it supports.
- Confirm
testDirpoints to the directory containing your tests. - Check that the web-server command starts successfully and that its readiness URL responds.
- Run a small representative test and inspect the selected project and reporter output.
- For CI, verify the
CIenvironment variable is set as expected so the conditional workers, retries, andforbidOnlybehavior take effect.
Troubleshoot common configuration problems
Playwright does not find the tests
Check that the configured testDir is correct relative to the configuration file and that test files are located there. If your repository uses a different directory layout, change testDir rather than moving tests to match an arbitrary sample.
A setting appears to have no effect
Check its location first. Runner options such as retries and workers belong at the top level; browser context settings belong in use. Then check whether a project-specific value overrides the shared value, and confirm that your installed version supports the option.
Navigation to a relative path fails
Set use.baseURL to the application origin the tests should use. When the run starts multiple web servers, explicitly define baseURL so relative navigation has an unambiguous base.
The web-server readiness check does not complete
Confirm that the configured command starts the application, that the configured URL and port match the running service, and that the service becomes reachable at that URL. A mismatch between the app’s actual address and the readiness URL prevents the run from reaching the expected ready state.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Tests fail intermittently or only in parallel
Use a single worker as a diagnostic, then look for shared state, shared external resources, or ordering assumptions among tests. Parallel workers are separate processes, so global variables are not a cross-worker coordination mechanism. If retries turn failures into passes, investigate the original failures as flakiness rather than considering the retry a fix.
A focused test makes CI behave unexpectedly
In the sample, forbidOnly is enabled when CI is truthy. Confirm that the variable is present in CI and that no committed test is restricted with test.only. Locally, the sample does not enable that guard unless CI is set.
Or skip the browser setup
If you need a website screenshot rather than a Playwright test run, ScreenshotNeo offers a one-request screenshot API. It is not a replacement for configuring Playwright Test, but can handle screenshot capture without starting and managing a browser in your own code. See the ScreenshotNeo documentation for its API options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie/consent banners and removes known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers indicate the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, including Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. These features are available across its plans. Visit ScreenshotNeo for product details, or sign up free for 1,000 screenshots a month with no card.
Keep the configuration maintainable
- Keep run-wide controls at the top level and browser context defaults in
use. - Use named projects to make different browser or environment runs explicit.
- Choose parallelism based on test isolation and the resources available, not just a desire for a faster run.
- Treat a pass after retry as a signal to investigate intermittent behavior.
- Recheck the configuration against the version installed in the project when upgrading Playwright.
Frequently Asked Questions
Can I use a Playwright config file format other than TypeScript?
Yes. Playwright supports configuration file formats other than playwright.config.ts; use a format supported by the Playwright version installed in your project.
Do I need a separate config file for each browser?
No. A single configuration can define multiple named projects, each with its own settings.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

