Share via


az load test-run

注意

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

此命令群組處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

管理負載測試回合的命令群組。

使用建立、更新、刪除、列出、停止等方式管理負載測試回合的命令群組。

命令

名稱 Description 類型 狀態
az load test-run app-component

管理負載測試執行應用程式元件的命令群組。

副檔名 預覽
az load test-run app-component add

將應用程式元件新增至測試回合。

副檔名 預覽
az load test-run app-component list

列出測試回合的所有應用程式元件。

副檔名 預覽
az load test-run app-component remove

從測試回合中移除應用程式元件。

副檔名 預覽
az load test-run create

建立新的負載測試回合。

副檔名 預覽
az load test-run delete

刪除現有的負載測試回合。

副檔名 預覽
az load test-run download-files

下載現有負載測試回合的檔案。

副檔名 預覽
az load test-run list

列出所有測試回合。

副檔名 預覽
az load test-run metrics

擷取負載測試回合計量的命令群組。

副檔名 預覽
az load test-run metrics get-definitions

取得負載測試回合的所有計量定義。

副檔名 預覽
az load test-run metrics get-dimensions

取得負載測試回合的所有計量維度值。

副檔名 預覽
az load test-run metrics get-namespaces

取得負載測試回合的所有計量命名空間。

副檔名 預覽
az load test-run metrics list

列出負載測試回合的計量。

副檔名 預覽
az load test-run server-metric

管理負載測試回合伺服器計量的命令群組。

副檔名 預覽
az load test-run server-metric add

將伺服器計量新增至測試回合。

副檔名 預覽
az load test-run server-metric list

列出測試回合的所有伺服器計量。

副檔名 預覽
az load test-run server-metric remove

從測試回合中移除伺服器計量。

副檔名 預覽
az load test-run show

顯示測試回合的詳細數據。

副檔名 預覽
az load test-run stop

停止執行負載測試回合。

副檔名 預覽
az load test-run update

更新現有的負載測試回合。

副檔名 預覽

az load test-run create

預覽

命令群組 『load test-run』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立新的負載測試回合。

為指定的測試建立新的負載測試回合。 如果指定了現有的測試回合,則會重新執行測試回合。 根據預設,此命令會等候測試回合完成。 使用 --no-wait 略過此等候。

az load test-run create --load-test-resource
                        --test-id
                        --test-run-id
                        [--certificate]
                        [--description]
                        [--display-name]
                        [--env]
                        [--existing-test-run-id]
                        [--no-wait]
                        [--resource-group]
                        [--secret]

範例

為測試建立測試回合,而不等待測試回合完成。

az load test-run create --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-test-id --test-run-id sample-test-run-id --no-wait

重新執行現有的測試回合。

az load test-run create --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-test-id --test-run-id sample-test-run-id --description "Test run description" --existing-test-run-id existing_test_run_id

必要參數

--load-test-resource --name -n

負載測試資源的名稱或 ARM 資源識別碼。

--test-id -t

負載測試的測試標識碼。

--test-run-id -r

負載測試回合的測試回合標識碼。

選擇性參數

--certificate

'key[=value]' 格式的單一憑證。 憑證應以 PFX 格式儲存在 Azure 金鑰保存庫,且憑證標識碼應提供為 值。使用 「清除現有的憑證」。

--description

負載測試回合的描述。

--display-name

負載測試回合的顯示名稱。

--env

以空格分隔的環境變數:key[=value] [key[=value] ...]。使用 「清除現有的環境變數」。

--existing-test-run-id

應重新執行之現有負載測試回合的測試回合標識碼。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--secret

以空格分隔的秘密:key[=value] [key[=value] ...]。秘密應該儲存在 Azure 金鑰保存庫 中,而秘密標識碼應該以 值的形式提供。使用 「清除現有的秘密」。

全域參數
--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 load test-run delete

預覽

命令群組 『load test-run』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

刪除現有的負載測試回合。

az load test-run delete --load-test-resource
                        --test-run-id
                        [--resource-group]
                        [--yes]

範例

刪除測試回合。

az load test-run delete --load-test-resource sample-alt-resource --resource-group sample-rg --test-run-id sample-test-run-id --yes

必要參數

--load-test-resource --name -n

負載測試資源的名稱或 ARM 資源識別碼。

--test-run-id -r

負載測試回合的測試回合標識碼。

選擇性參數

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

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

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

--verbose

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

az load test-run download-files

預覽

命令群組 『load test-run』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

下載現有負載測試回合的檔案。

az load test-run download-files --load-test-resource
                                --path
                                --test-run-id
                                [--force]
                                [--input]
                                [--log]
                                [--resource-group]
                                [--result]

範例

下載測試回合的輸入、記錄和結果檔。 目錄應該已經存在。

az load test-run download-files --load-test-resource sample-alt-resource --resource-group sample-rg --test-run-id sample-test-run-id --path ~/Downloads/OutputArtifacts --input --log --result

如果不存在,請建立目錄,以下載測試回合的輸入和記錄檔。

az load test-run download-files --load-test-resource sample-alt-resource --resource-group sample-rg --test-run-id sample-test-run-id --path ~/Downloads/OutputArtifacts --input --log --force

必要參數

--load-test-resource --name -n

負載測試資源的名稱或 ARM 資源識別碼。

--path

要下載檔之目錄的路徑。

--test-run-id -r

負載測試回合的測試回合標識碼。

選擇性參數

--force

強制執行命令。 如果目錄不存在,則會建立要下載檔案的目錄。

預設值: False
--input

下載輸入檔案 zip。

預設值: False
--log

下載記錄檔 zip。

預設值: False
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--result

下載結果檔案 zip。

預設值: False
全域參數
--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 load test-run list

預覽

命令群組 『load test-run』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出所有測試回合。

az load test-run list --load-test-resource
                      --test-id
                      [--resource-group]

範例

列出測試中執行的所有測試。

az load test-run list --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-test-id

必要參數

--load-test-resource --name -n

負載測試資源的名稱或 ARM 資源識別碼。

--test-id -t

負載測試的測試標識碼。

選擇性參數

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--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 load test-run show

預覽

命令群組 『load test-run』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

顯示測試回合的詳細數據。

顯示指定test-run-id所識別之測試回合的詳細數據。

az load test-run show --load-test-resource
                      --test-run-id
                      [--resource-group]

範例

取得測試回合的詳細數據。

az load test-run show --load-test-resource sample-alt-resource --resource-group sample-rg --test-run-id sample-test-run-id

必要參數

--load-test-resource --name -n

負載測試資源的名稱或 ARM 資源識別碼。

--test-run-id -r

負載測試回合的測試回合標識碼。

選擇性參數

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--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 load test-run stop

預覽

命令群組 『load test-run』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

停止執行負載測試回合。

az load test-run stop --load-test-resource
                      --test-run-id
                      [--resource-group]
                      [--yes]

範例

停止測試回合。

az load test-run stop --load-test-resource sample-alt-resource --resource-group sample-rg --test-run-id sample-test-run-id --yes

必要參數

--load-test-resource --name -n

負載測試資源的名稱或 ARM 資源識別碼。

--test-run-id -r

負載測試回合的測試回合標識碼。

選擇性參數

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

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

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

--verbose

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

az load test-run update

預覽

命令群組 『load test-run』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

更新現有的負載測試回合。

az load test-run update --load-test-resource
                        --test-run-id
                        [--description]
                        [--display-name]
                        [--resource-group]

範例

更新測試回合的描述

az load test-run update --load-test-resource sample-alt-resource --resource-group sample-rg --test-run-id sample-test-run-id --description "Test run description"

必要參數

--load-test-resource --name -n

負載測試資源的名稱或 ARM 資源識別碼。

--test-run-id -r

負載測試回合的測試回合標識碼。

選擇性參數

--description

負載測試回合的描述。

--display-name

負載測試回合的顯示名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--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 來取得完整偵錯記錄。