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

az iot product test

注意

此参考是 Azure CLI(版本 2.37.0 或更高版本)的 azure-iot 扩展的一部分。 该扩展将在首次运行 az iot product test 命令时自动安装。 详细了解扩展。

此命令组已隐式弃用,因为命令组“iot product”已弃用,将在将来的版本中删除。

管理用于产品认证的设备测试。

命令

名称 说明 类型 状态
az iot product test case

管理产品测试认证测试用例。

分机 已放弃
az iot product test case list

列出产品认证测试的测试用例。

扩展 已放弃
az iot product test case update

更新产品认证测试用例数据。

分机 已放弃
az iot product test create

为产品认证创建新的产品测试。

分机 已放弃
az iot product test run

管理产品测试认证测试运行。

分机 已放弃
az iot product test run show

显示测试运行的状态。

扩展 已放弃
az iot product test run submit

将已完成的测试运行提交到合作伙伴/产品服务。

分机 已放弃
az iot product test search

搜索产品存储库以测试数据。

扩展 已放弃
az iot product test show

查看产品测试数据。

分机 已放弃
az iot product test task

管理产品测试认证任务。

扩展 已放弃
az iot product test task create

将新的测试任务排在队列中。 一次只能运行一个测试任务。

分机 已放弃
az iot product test task delete

取消与指定的 --task-id 匹配的正在运行的任务。

扩展 已放弃
az iot product test task show

显示测试任务的状态。 对当前运行的任务或 --task-id 使用 --running。

扩展 已放弃
az iot product test update

更新产品认证测试数据。

分机 已放弃

az iot product test create

已放弃

此命令已隐式弃用,因为命令组“iot product”已弃用,将在将来的版本中删除。

为产品认证创建新的产品测试。

az iot product test create [--at {ConnectionString, SymmetricKey, TPM, X509}]
                           [--badge-type {IotDevice, IotEdgeCompatible, Pnp}]
                           [--base-url]
                           [--certificate-path]
                           [--cf]
                           [--connection-string]
                           [--device-type {DevKit, FinishedProduct}]
                           [--ek]
                           [--models]
                           [--product-id]
                           [--skip-provisioning]
                           [--validation-type {Certification, Test}]

示例

基本用法

az iot product test create --configuration-file {configuration_file}

没有服务创建预配配置

az iot product test create --configuration-file {configuration_file} --skip-provisioning

使用对称密钥证明创建测试

az iot product test create --attestation-type SymmetricKey --device-type {device_type}

使用 TPM 证明创建测试

az iot product test create --attestation-type TPM --device-type {device_type} --endorsement-key {endorsement_key}

使用 x509 证明创建测试

az iot product test create --attestation-type x509 --device-type {device_type} --certificate-path {certificate_path}

为 Edge 模块创建测试

az iot product test create --attestation-type ConnectionString --device-type {device_type} --badge-type IotEdgeCompatible --connection-string {connection_string}

使用对称密钥证明和指定的验证类型创建测试

az iot product test create --attestation-type SymmetricKey --device-type {device_type} --validation-type Certification --product-id {product_id}

可选参数

--at --attestation-type

设备如何对测试服务设备预配服务进行身份验证。

接受的值: ConnectionString, SymmetricKey, TPM, X509
--badge-type --bt

认证徽章的类型。

接受的值: IotDevice, IotEdgeCompatible, Pnp
默认值: IotDevice
--base-url

重写认证服务 URL 以允许在非生产环境中进行测试。

--certificate-path --cp

包含主证书的文件的路径。 选择 x509 作为证明类型时,需要其中一个证书路径。

--cf --configuration-file

设备测试 JSON 文件的路径。 如果未指定,则必须指定证明和设备定义参数。

--connection-string --cs

需要连接字符串选择 IotEdgeCompatible 锁屏提醒类型、连接字符串和证明类型的连接字符串。

--device-type --dt

定义要测试的设备的类型。

接受的值: DevKit, FinishedProduct
--ek --endorsement-key

TPM 设备的 TPM 认可密钥。 选择 TPM 作为证明类型时,需要认可密钥。

--models -m

包含受测试的设备实现的 Azure IoT 即插即用 接口的路径。 当锁屏提醒类型为 Pnp 时,需要模型。

--product-id -p

提交的产品 ID。验证类型为“认证”时是必需的。

--skip-provisioning --sp

确定服务是否跳过生成预配配置。 仅适用于 SymmetricKey 和 连接ionString 预配类型。

默认值: False
--validation-type --vt

要执行的验证测试的类型。

接受的值: Certification, Test
默认值: Test
全局参数
--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 获取完整的调试日志。

已放弃

此命令已隐式弃用,因为命令组“iot product”已弃用,将在将来的版本中删除。

搜索产品存储库以测试数据。

az iot product test search [--base-url]
                           [--certificate-name]
                           [--product-id]
                           [--registration-id]

示例

按产品 ID 搜索

az iot product test search --product-id {product_id}

按 DPS 注册搜索

az iot product test search --registration-id {registration_id}

按 x509 certifcate 公用名(CN)进行搜索

az iot product test search --certificate-name {certificate_name}

按多个值搜索

az iot product test search --product-id {product_id} --certificate-name {certificate_name}

可选参数

--base-url

重写认证服务 URL 以允许在非生产环境中进行测试。

--certificate-name --cn

用于设备预配服务证明的 x509 证书公用名(cn)。

--product-id -p

提交的产品 ID。

--registration-id -r

设备预配服务的注册 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 iot product test show

已放弃

此命令已隐式弃用,因为命令组“iot product”已弃用,将在将来的版本中删除。

查看产品测试数据。

az iot product test show --test-id
                         [--base-url]

示例

基本用法

az iot product test show --test-id {test_id}

必需参数

--test-id -t

设备认证测试生成的 ID。

可选参数

--base-url

重写认证服务 URL 以允许在非生产环境中进行测试。

全局参数
--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 iot product test update

已放弃

此命令已隐式弃用,因为命令组“iot product”已弃用,将在将来的版本中删除。

更新产品认证测试数据。

az iot product test update --test-id
                           [--at {ConnectionString, SymmetricKey, TPM, X509}]
                           [--badge-type {IotDevice, IotEdgeCompatible, Pnp}]
                           [--base-url]
                           [--certificate-path]
                           [--cf]
                           [--connection-string]
                           [--ek]
                           [--models]

示例

基本用法

az iot product test update --test-id {test_id} --configuration-file {configuration_file}

必需参数

--test-id -t

设备认证测试生成的 ID。

可选参数

--at --attestation-type

设备如何对测试服务设备预配服务进行身份验证。

接受的值: ConnectionString, SymmetricKey, TPM, X509
--badge-type --bt

认证徽章的类型。

接受的值: IotDevice, IotEdgeCompatible, Pnp
--base-url

重写认证服务 URL 以允许在非生产环境中进行测试。

--certificate-path --cp

包含主证书的文件的路径。 选择 x509 作为证明类型时,需要其中一个证书路径。

--cf --configuration-file

设备测试 JSON 文件的路径。 如果未指定,则必须指定证明和设备定义参数。

--connection-string --cs

需要连接字符串选择 IotEdgeCompatible 锁屏提醒类型、连接字符串和证明类型的连接字符串。

--ek --endorsement-key

TPM 设备的 TPM 认可密钥。 选择 TPM 作为证明类型时,需要认可密钥。

--models -m

包含受测试的设备实现的 Azure IoT 即插即用 接口的路径。 当锁屏提醒类型为 Pnp 时,需要模型。

全局参数
--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 获取完整的调试日志。