Azure Playwright Workspaces SDK for TypeScript
Run Playwright tests at scale with cloud-hosted browsers and integrated Azure portal reporting.
Migration Notice:
@azure/microsoft-playwright-testingis retired on March 8, 2026. Use@azure/playwrightinstead. See migration guide.
Installation
Requirements:
- Playwright version 1.47+ (basic usage)
- Playwright version 1.57+ (Azure reporter features)
Environment Variables
Authentication
Microsoft Entra Token Credential (Recommended)
Custom Credential
Core Workflow
Service Configuration
Run Tests
With Azure Reporter
Manual Browser Connection
Configuration Options
ServiceOS Enum
ServiceAuth Enum
CI/CD Integration
GitHub Actions
Azure Pipelines
Key Types
Migration from Old Package
Before (Old)
After (New)
Best Practices
- Use Microsoft Entra Token Credential — More secure than access tokens
- Use
DefaultAzureCredentialfor local development; useManagedIdentityCredentialorWorkloadIdentityCredentialfor production - Enable artifacts — Set
trace: "on-first-retry",video: "retain-on-failure"in config - Scale workers — Use
--workers=20or higher for parallel execution - Region selection — Choose region closest to your test targets
- HTML reporter first — When using Azure reporter, list HTML reporter before Azure reporter


