az iot product test

注意

此參考是 Azure CLI 的 azure-iot 延伸模組的一部分 (2.37.0 版或更高版本)。 擴充功能會在您第一次執行 az iot product test 命令時自動安裝。 深入了解擴充功能。

此命令群組已隱含取代,因為命令群組 'iot product' 已被取代,且將在未來的版本中移除。

管理產品認證的裝置測試。

命令

名稱 Description 類型 狀態
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

Edge 模組連接字串選擇 IotEdgeCompatible 徽章類型、連接字串和證明類型的連接字串是必要的。

--device-type --dt

定義要測試的裝置類型。

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

TPM 裝置的 TPM 簽署金鑰。 選擇 TPM 作為證明類型時,需要簽署金鑰。

--models -m

包含受測試裝置所實作之 Azure IoT 隨插即用介面的路徑。 當徽章類型為 Pnp 時,需要模型。

--product-id -p

送出的產品識別碼。驗證類型為「認證」時為必要專案。

--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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

已被取代

此命令已隱含取代,因為命令群組 'iot product' 已被取代,且將在未來的版本中移除。

搜尋產品存放庫以測試資料。

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

範例

依產品識別碼搜尋

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

依 DPS 註冊搜尋

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

依 x509 查詢通用名稱 (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

送出的產品識別碼。

--registration-id -r

裝置布建服務的註冊識別碼。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

裝置認證測試所產生的識別碼。

選擇性參數

--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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

裝置認證測試所產生的識別碼。

選擇性參數

--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

Edge 模組連接字串選擇 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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。