azure-microsoft-playwright-testing-ts 是什么?
此 Skill 使用 @azure/playwright 将 Playwright Test 接到 Azure Playwright Workspaces 云托管浏览器,并可把结果发布到 Portal。它不是测试生成器;你仍需维护本地 Playwright 用例、配置与断言。
中文说明由本站依据来源整理;英文原文保留在页面下方。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
azure-microsoft-playwright-testing-ts,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 azure-microsoft-playwright-testing-ts
请在 Codex 的当前工作环境中安装并检查 azure-microsoft-playwright-testing-ts 这个 Skill。
项目身份:microsoft/skills / azure-microsoft-playwright-testing-ts
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-typescript/skills/azure-microsoft-playwright-testing-ts/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-typescript/skills/azure-microsoft-playwright-testing-ts/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 azure-microsoft-playwright-testing-ts
请在 Claude Code 的当前工作环境中安装并检查 azure-microsoft-playwright-testing-ts 这个 Skill。
项目身份:microsoft/skills / azure-microsoft-playwright-testing-ts
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-typescript/skills/azure-microsoft-playwright-testing-ts/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-typescript/skills/azure-microsoft-playwright-testing-ts/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 azure-microsoft-playwright-testing-ts
请在 Cursor Agent 的当前工作环境中安装并检查 azure-microsoft-playwright-testing-ts 这个 Skill。
项目身份:microsoft/skills / azure-microsoft-playwright-testing-ts
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-typescript/skills/azure-microsoft-playwright-testing-ts/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-typescript/skills/azure-microsoft-playwright-testing-ts/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 azure-microsoft-playwright-testing-ts
请在 当前 Agent 的当前工作环境中安装并检查 azure-microsoft-playwright-testing-ts 这个 Skill。
项目身份:microsoft/skills / azure-microsoft-playwright-testing-ts
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-typescript/skills/azure-microsoft-playwright-testing-ts/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-typescript/skills/azure-microsoft-playwright-testing-ts/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 推荐使用当前 @azure/playwright 包;源文指出旧 @azure/microsoft-playwright-testing 已于2026-03-08退休。
- 测试工程需 Playwright 1.47+;使用 Azure reporter 需 1.57+。准备 PLAYWRIGHT_SERVICE_URL、Entra 登录或受控 access token。
- CI需配置 OIDC/Azure login 权限与 secret;检查测试访问目标站网络与测试数据隔离。
实际使用顺序
- 先核对旧配置:getServiceConfig 改 createAzurePlaywrightConfig,timeout 改 connectTimeout,runId 改 runName,并明确传 credential。
- 合并既有 playwright.config,先用单 worker 和一条可重复测试验证服务连接与浏览器兼容。
- 确认云端网络可访问目标服务,再逐步增加 workers;worker 数影响并发、资源限额和服务用量。
- 需要 Portal 报告时加入 @azure/playwright/reporter,并把 HTML reporter 排在前面;失败时保留trace/video。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
请使用 azure-microsoft-playwright-testing-ts 检查我的 Playwright 配置并列迁移差异:旧包、配置函数、超时选项、reporter和凭据;先输出建议,不改文件、不启动云端测试。得到新旧配置的迁移清单;没有连接 Azure Workspaces 或运行测试。
使用条件与边界
- 源文 --workers=20 是并发示例,不是所有项目的默认建议;按配额、站点承载与成本调整。
- PLAYWRIGHT_SERVICE_URL 与workspace身份凭据属于运行配置,不要贴入公开日志。
- 迁移配置成功不代表测试用例通过;仍需检查浏览器结果和断言。
常见问题
为什么新包没有 useCloudHostedBrowsers?
新配置始终连接云托管浏览器,因此旧选项被移除;迁移时按源文映射删除旧字段。
CI里本机浏览器能跑,云端连不上站点怎么办?
检查服务网络出口/目标站访问策略和 exposeNetwork 配置;云端浏览器运行环境与开发者本机不同。
来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
.github/plugins/azure-sdk-typescript/skills/azure-microsoft-playwright-testing-ts/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Run Playwright tests at scale using Azure Playwright Workspaces (formerly Microsoft Playwright Testing). Use when scaling browser tests across cloud-hosted browsers, integrating with CI/CD pipelines, or publishing test results to the Azure portal.
查看源文件章节 / Source sections
- 原文:Azure Playwright Workspaces SDK for TypeScript
- 安装 / Installation
- 原文: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
原文: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-testing` is retired on **March 8, 2026**. Use `@azure/playwright` instead. See [migration guide](https://aka.ms/mpt/migration-guidance).
安装 / Installation
```bash # Recommended: Auto-generates config npm init @azure/playwright@latest # Manual installation npm install @azure/playwright --save-dev npm install @playwright/test@^1.47 --save-dev npm install @azure/identity --save-dev ``` **Requirements:** - Playwright version 1.47+ (basic usage) - Playwright version 1.57+ (Azure reporter features)
原文:Environment Variables
```bash PLAYWRIGHT_SERVICE_URL=wss://eastus.api.playwright.microsoft.com/playwrightworkspaces/{workspace-id}/browsers AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production ```
原文:Microsoft Entra Token Credential (Recommended)
```bash # Sign in with Azure CLI az login ``` ```typescript // playwright.service.config.ts import { defineConfig } from "@playwright/test"; import { createAzurePlaywrightConfig, ServiceOS } from "@azure/playwright"; import { DefaultAzureCredential, ManagedIdentityCredential } from "@azure/identity"; import config from "./playwright.config"; // Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential> const credential = new DefaultAzureCredential({requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]}); // Or use a specific credential directly in production: // See https://learn.microsoft.com/javascript/api/overview/azure/identity-readme?view=azure-node-latest#credential-classes // const credential = new ManagedIdentityCredential(); export default defineConfig( config, createAzurePlaywrightConfig(config, { os: ServiceOS.LINUX, credential, }) ); ```
原文:Custom Credential
```typescript import { ManagedIdentityCredential } from "@azure/identity"; import { createAzurePlaywrightConfig } from "@azure/playwright"; export default defineConfig( config, createAzurePlaywrightConfig(config, { credential: new ManagedIdentityCredential(), }) ); ```
原文:Service Configuration
```typescript // playwright.service.config.ts import { defineConfig } from "@playwright/test"; import { createAzurePlaywrightConfig, ServiceOS } from "@azure/playwright"; import { DefaultAzureCredential } from "@azure/identity"; import config from "./playwright.config"; export default defineConfig( config, createAzurePlaywrightConfig(config, { os: ServiceOS.LINUX, connectTimeout: 30000, exposeNetwork: "<loopback>", credential: new DefaultAzureCredential({requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]}), }) ); ```
文件 SHA256:0dc8c8b6b89db75fa1aa0890e777a7989960804dafd4aa4b02cc4ffa64476434
仓库许可证记录:MIT;skill-declaration-captured-not-interpreted,查看来源。
Run Playwright tests at scale using Azure Playwright Workspaces (formerly Microsoft Playwright Testing). Use when scaling browser tests across cloud-hosted browsers, integrating with CI/CD pipelines, or publishing test results to the Azure portal.
历史收录数据
| 来源仓库 | microsoft/skills |
|---|---|
| Skill源路径 | .github/plugins/azure-sdk-typescript/skills/azure-microsoft-playwright-testing-ts/SKILL.md |
安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。
