你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az playwright-testing workspace

注意

此参考是 Azure CLI 的 playwright-cli-extension 扩展(版本 2.67.0 或更高版本)的一部分。 该扩展会在首次运行 az playwright-testing workspace 命令时自动安装。 详细了解扩展

管理Microsoft Playwright Testing 服务工作区资源。

命令

名称 说明 类型 Status
az playwright-testing workspace create

创建Microsoft Playwright Testing 服务工作区资源。

外延 加语
az playwright-testing workspace delete

删除 azure Playwright Testing 服务工作区资源Microsoft。

外延 加语
az playwright-testing workspace list

按订阅 ID 列出 azure Playwright Testing 服务工作区资源Microsoft。

外延 加语
az playwright-testing workspace quota

管理 Microsoft Azure Playwright Testing 服务帐户的配额资源。

外延 加语
az playwright-testing workspace quota list

列出给定工作区的配额。

外延 加语
az playwright-testing workspace quota show

按名称获取工作区的配额。

外延 加语
az playwright-testing workspace show

获取 azure Playwright Testing 服务工作区资源详细信息Microsoft。

外延 加语
az playwright-testing workspace update

更新 azure Playwright Testing 服务工作区资源Microsoft。

外延 加语
az playwright-testing workspace wait

将 CLI 置于等待状态,直到满足条件。

外延 加语

az playwright-testing workspace create

创建Microsoft Playwright Testing 服务工作区资源。

az playwright-testing workspace create --name
                                       --resource-group
                                       [--local-auth {Disabled, Enabled}]
                                       [--location]
                                       [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                       [--regional-affinity {Disabled, Enabled}]
                                       [--reporting {Disabled, Enabled}]
                                       [--scalable-execution {Disabled, Enabled}]
                                       [--tags]

示例

创建 Playwright 测试工作区

az playwright-testing workspace create --resource-group SampleRG --workspace-name myPlaywrightWorkspace --location westus --regional-affinity Enabled

必需参数

--name --workspace-name -n

Microsoft Azure Playwright Testing 服务工作区的名称。

--resource-group -g

Azure 资源组的名称。

可选参数

--local-auth

启用后,此功能允许工作区使用本地身份验证(通过访问密钥)对测试运行进行身份验证。

接受的值: Disabled, Enabled
默认值: Disabled
--location -l

未指定资源所在的地理位置,将使用资源组的位置。

--no-wait

不要等待长时间运行的操作完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--regional-affinity

此属性将 Playwright 客户端辅助角色的连接区域设置为云托管的浏览器。 如果启用,辅助角色会连接到最近的 Azure 区域中的浏览器,确保延迟较低。 如果禁用,辅助角色将连接到最初创建工作区的 Azure 区域中的浏览器。

接受的值: Disabled, Enabled
默认值: Enabled
--reporting

启用后,此功能允许工作区在 Playwright 门户中上传和显示测试结果,包括跟踪和屏幕截图等项目。 这样可以更快、更高效地进行故障排除。

接受的值: Disabled, Enabled
默认值: Enabled
--scalable-execution

启用后,Playwright 客户端辅助角色可以连接到云托管的浏览器。 这可以增加测试运行的并行辅助角色数,从而显著减少测试完成持续时间。

接受的值: Disabled, Enabled
默认值: Enabled
--tags

资源标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az playwright-testing workspace delete

删除 azure Playwright Testing 服务工作区资源Microsoft。

az playwright-testing workspace delete [--ids]
                                       [--name]
                                       [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                       [--resource-group]
                                       [--subscription]
                                       [--yes]

示例

删除 Playwright 测试工作区

az playwright-testing workspace delete --resource-group SampleRG --workspace-name myPlaywrightWorkspace

可选参数

--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name --workspace-name -n

Microsoft Azure Playwright Testing 服务工作区的名称。

--no-wait

不要等待长时间运行的操作完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Azure 资源组的名称。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--yes -y

不要提示确认。

默认值: False
全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az playwright-testing workspace list

按订阅 ID 列出 azure Playwright Testing 服务工作区资源Microsoft。

az playwright-testing workspace list [--max-items]
                                     [--next-token]
                                     [--resource-group]

示例

剧作家测试Workspace_ListBySubscription

az playwright-testing workspace list

剧作家测试Workspace_ListByResourceGroup

az playwright-testing workspace list --resource-group SampleRG

可选参数

--max-items

命令输出中要返回的项总数。 如果可用的项总数大于指定的值,则会在命令的输出中提供令牌。 若要恢复分页,请在后续命令的 --next-token 参数中提供令牌值。

--next-token

用于指定开始分页的位置的令牌。 这是先前截断的响应中的令牌值。

--resource-group -g

Azure 资源组的名称。

全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az playwright-testing workspace show

获取 azure Playwright Testing 服务工作区资源详细信息Microsoft。

az playwright-testing workspace show [--ids]
                                     [--name]
                                     [--resource-group]
                                     [--subscription]

示例

获取 Playwright 测试工作区

az playwright-testing workspace show --resource-group SampleRG --workspace-name myPlaywrightWorkspace

可选参数

--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name --workspace-name -n

Microsoft Azure Playwright Testing 服务工作区的名称。

--resource-group -g

Azure 资源组的名称。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az playwright-testing workspace update

更新 azure Playwright Testing 服务工作区资源Microsoft。

az playwright-testing workspace update [--add]
                                       [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                       [--ids]
                                       [--local-auth {Disabled, Enabled}]
                                       [--name]
                                       [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                       [--regional-affinity {Disabled, Enabled}]
                                       [--remove]
                                       [--reporting {Disabled, Enabled}]
                                       [--resource-group]
                                       [--scalable-execution {Disabled, Enabled}]
                                       [--set]
                                       [--subscription]
                                       [--tags]

示例

更新 Playwright 测试Workspace_Disable区域相关性

az playwright-testing workspace update --resource-group SampleRG --workspace-name myPlaywrightWorkspace --regional-affinity Disabled

可选参数

--add

通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>

--force-string

使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--local-auth

启用后,此功能允许工作区使用本地身份验证(通过访问密钥)对测试运行进行身份验证。

接受的值: Disabled, Enabled
--name --workspace-name -n

Microsoft Azure Playwright Testing 服务工作区的名称。

--no-wait

不要等待长时间运行的操作完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--regional-affinity

此属性将 Playwright 客户端辅助角色的连接区域设置为云托管的浏览器。 如果启用,辅助角色会连接到最近的 Azure 区域中的浏览器,确保延迟较低。 如果禁用,辅助角色将连接到最初创建工作区的 Azure 区域中的浏览器。

接受的值: Disabled, Enabled
--remove

从列表中删除属性或元素。 示例:--remove property.list <indexToRemove>--remove propertyToRemove

--reporting

启用后,此功能允许工作区在 Playwright 门户中上传和显示测试结果,包括跟踪和屏幕截图等项目。 这样可以更快、更高效地进行故障排除。

接受的值: Disabled, Enabled
--resource-group -g

Azure 资源组的名称。

--scalable-execution

启用后,Playwright 客户端辅助角色可以连接到云托管的浏览器。 这可以增加测试运行的并行辅助角色数,从而显著减少测试完成持续时间。

接受的值: Disabled, Enabled
--set

通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--tags

资源标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az playwright-testing workspace wait

将 CLI 置于等待状态,直到满足条件。

az playwright-testing workspace wait [--created]
                                     [--custom]
                                     [--deleted]
                                     [--exists]
                                     [--ids]
                                     [--interval]
                                     [--name]
                                     [--resource-group]
                                     [--subscription]
                                     [--timeout]
                                     [--updated]

可选参数

--created

等待在“Succeeded”中使用“provisioningState”创建。

默认值: False
--custom

等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到删除为止。

默认值: False
--exists

等待资源存在。

默认值: False
--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--interval

轮询间隔(以秒为单位)。

默认值: 30
--name --workspace-name -n

Microsoft Azure Playwright Testing 服务工作区的名称。

--resource-group -g

Azure 资源组的名称。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--timeout

最大等待(以秒为单位)。

默认值: 3600
--updated

等到 provisioningState 更新为“Succeeded”。

默认值: False
全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。