az load test file

注意

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

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

測試檔案作業的命令群組。

測試檔案的作業命令群組,例如上傳、刪除、列出和下載。

命令

名稱 Description 類型 狀態
az load test file delete

從測試中刪除檔案。

擴充 預覽版
az load test file download

從測試下載檔案。

擴充 預覽版
az load test file list

列出測試中的所有檔案。

擴充 預覽版
az load test file upload

將檔案上傳至測試。

擴充 預覽版

az load test file delete

預覽

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

從測試中刪除檔案。

藉由提供檔案名和測試識別碼,從測試中刪除檔案。

az load test file delete --file-name
                         --load-test-resource
                         --test-id
                         [--resource-group]
                         [--yes]

範例

從測試中刪除檔案。

az load test file delete --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --file-name sample-jmx.jmx --yes

必要參數

--file-name

檔案的名稱。

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

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

--test-id -t

負載測試的測試識別碼。

選擇性參數

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

預覽

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

從測試下載檔案。

藉由提供檔案名、測試識別碼和路徑來下載檔案,以下載檔案,以下載檔案。

az load test file download --file-name
                           --load-test-resource
                           --path
                           --test-id
                           [--force]
                           [--resource-group]

範例

從測試下載檔案。 目錄應該已經存在。

az load test file download --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --file-name sample-jmx.jmx --path ~/Downloads/
examples:

如果目錄不存在,請從測試下載檔案。

az load test file download --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --file-name sample-jmx.jmx --path ~/Downloads/ --force

必要參數

--file-name

檔案的名稱。

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

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

--path

要下載檔案之目錄的路徑。

--test-id -t

負載測試的測試識別碼。

選擇性參數

--force

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

預設值: False
--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 file list

預覽

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

列出測試中的所有檔案。

藉由提供對應的測試識別碼,列出與測試相關的所有檔案詳細資料。

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

範例

列出測試中的所有檔案。

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

必要參數

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

預覽

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

將檔案上傳至測試。

藉由提供檔案和測試識別碼的路徑,將檔案上傳至測試。

az load test file upload --load-test-resource
                         --path
                         --test-id
                         [--file-type]
                         [--no-wait]
                         [--resource-group]

範例

將 JMeter 腳本 (JMX 檔案) 上傳至測試。

az load test file upload --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --path sample-jmx.jmx

將 CSV 檔案上傳至測試,而不需要等待長時間執行的作業完成。

az load test file upload --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --path ~/Resources/split-csv.csv --file-type ADDITIONAL_ARTIFACTS --no-wait

將使用者屬性檔案上傳至測試。

az load test file upload --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --path ~/Resources/user-prop.properties --file-type USER_PROPERTIES

必要參數

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

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

--path

要上傳之檔案的路徑。

--test-id -t

負載測試的測試識別碼。

選擇性參數

--file-type

要上傳的檔案類型。 允許的值:ADDITIONAL_ARTIFACTS、JMX_FILE、USER_PROPERTIES。

--no-wait

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

預設值: False
--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 來取得完整偵錯記錄。