This guide walks you through migrating from Microsoft Playwright Testing to Playwright Workspaces.
For most users, the migration involves:
- Creating a Playwright Workspaces resource
- Updating your test project (dependencies and config)
- Updating CI pipeline service connections
If you run into issues, email
playwrighttesting@microsoft.comor file a support request via the Azure Portal if you have a support plan.
Before migrating your test code, make sure the following setup is complete:
- Create a Playwright Workspaces resource in the Azure Portal
- Manage access to control who can view and modify the workspace
- Update CI service connections to point to the new workspace
Optional (for some scenarios):
- Customize regional latency if tests need to run in specific Azure regions
- Set up local authentication if you're not using the default identity flow
Most users will fall under the first scenario (marked with ✅).
| Scenario | Description |
|---|---|
| ✅ Playwright Test Runner with Service Package (most common) | Using @playwright/test with getServiceConfig |
Playwright Test Runner with connectOptions |
Custom connection logic in playwright.config.ts |
| Node.js Manual Browser Launch | Direct use of browser.connect() |
| .NET NUnit with Service Package | Using NUnit base classes with Microsoft service package |
| .NET Manual Connect | Using Browser.ConnectAsync in .NET |
If you're using @playwright/test with getServiceConfig from the Microsoft service package, this is your scenario.
npm uninstall @azure/microsoft-playwright-testing
npm install @azure/playwright @azure/identity
npm install @playwright/test@latest-
Replace:
import { getServiceConfig } from '@azure/microsoft-playwright-testing';
with:
import { createAzurePlaywrightConfig } from '@azure/playwright'; import { DefaultAzureCredential } from '@azure/identity';
-
Add the
credential:credential: new DefaultAzureCredential()
-
Remove:
- The
runIdparameter (you may userunNameinstead) - Any old service reporter configuration
- The
PLAYWRIGHT_SERVICE_URL=<new_url>
PLAYWRIGHT_SERVICE_ACCESS_TOKEN=<new_token>Playwright Test Runner JS migration example
Use this if you're overriding connectOptions in your playwright.config.ts or using a custom playwright.service.config.ts.
- Follow the Playwright Workspaces Quickstart
- Update your
connectOptionsto use the new workspace format - Ensure the endpoint includes
api-version=2025-09-01 - Update environment variables:
PLAYWRIGHT_SERVICE_URL=<new_url>
PLAYWRIGHT_SERVICE_ACCESS_TOKEN=<new_token>Use this if you're directly connecting to the cloud browser using browser.connect().
- Update your custom connection logic or fixture
- Ensure the endpoint includes
api-version=2025-09-01 - Update environment variables:
PLAYWRIGHT_SERVICE_URL=<new_url>
PLAYWRIGHT_SERVICE_ACCESS_TOKEN=<new_token>Node.js manual connect migration example
Use this if you’re using NUnit with PageTest and the Microsoft service package.
Uninstall-Package Azure.Developer.MicrosoftPlaywrightTesting.NUnit
Install-Package Azure.Developer.Playwright.NUnit
Install-Package Azure.Identity
Update-Package Microsoft.Playwright.NUnit -Version 1.50.0-
Update
usingstatements:using Azure.Developer.Playwright.NUnit; using Azure.Developer.Playwright; using Azure.Identity;
-
Update base class:
public class SetUpFixture : PlaywrightServiceBrowserNUnit
-
Add:
credential: new DefaultAzureCredential()
-
Remove
runIdif present (userunNameif needed)
- Create
CloudBrowserPageTest.csinheriting from the new base class - Update your test classes to inherit from it
- Remove any logger referencing
microsoft-playwright-testing - Delete
.runsettingsfiles
PLAYWRIGHT_SERVICE_URL=<new_url>
PLAYWRIGHT_SERVICE_ACCESS_TOKEN=<new_token>Use this if you're calling Browser.ConnectAsync manually in your .NET code.
- Update your custom connection logic
- Ensure the endpoint uses
api-version=2025-09-01 - Update environment variables:
PLAYWRIGHT_SERVICE_URL=<new_url>
PLAYWRIGHT_SERVICE_ACCESS_TOKEN=<new_token>For common migration problems and resolution tips, see: Migration Troubleshooting Guide
| Area | Change |
|---|---|
| Resource Provider | Changed to Microsoft.LoadTestService |
| Portal Management | All resource operations now in the Azure Portal |
| Workspace ID | Now a GUID (no region_ prefix) |
Reporting is now available to all users as a part of Playwright Workspaces. You can use the QuickStart Guide and Troubleshooting FAQs to get started.
Share your feedback on Playwright Workspaces Reporting:
👉 Discussion: Built-in Reporting for Playwright Workspaces
@azure/microsoft-playwright-testing→@azure/playwrightAzure.Developer.MicrosoftPlaywrightTesting.NUnit→Azure.Developer.Playwright.NUnit
Function Renames:
getServiceConfig→createAzurePlaywrightConfigtimeout→connectTimeout
Deprecated Parameters:
useCloudHostedBrowsers— removedrunIdreplaced withrunName
API Version:
- Now
2025-09-01