説明
この API を使用すると、使用可能なテスト設定パラメータを更新できます。この機能には、ユーザとテストの両方を識別するためのパラメータが含まれています
API v4
URL
https://a.blazemeter.com/api/v4/tests/testID
リクエスト パラメータ
パラメータ | 説明 |
---|---|
API キー | Identifies the user ( --user 'id:secret' ). How to get the API Key? |
テスト ID | Identifies the test. How to get the Test ID? |
Post ボディ | The parameters you wish to update. See list Below |
cURL
curl -X put https://a.blazemeter.com/api/v4/tests/testID -H "Content-Type: application/json" -d '{"name": "New Name3","configuration": {"location": "us-west-1","type": "jmeter","concurrency": 200,"dedicatedIpsEnabled": "false","plugins": {"splitCSV": {"enabled": "false"}}}}' --user 'id:secret'
Python
import requests def testUpdate(test_id): return requests.put('https://a.blazemeter.com/api/v4/tests/{0}/'.format(test_id), json={"name": "New Name3","configuration": {"location": "us-west-1","type": "jmeter","concurrency": 200,"dedicatedIpsEnabled": "false","plugins": {"splitCSV": {"enabled": "false"}}}}, auth('id','secret'))
res = testUpdate(<testId>)
print res.json()
テスト オブジェクト
テスト オブジェクトには、以下のパラメータが含まれています。
パラメータ | 説明 | 変更可能 |
---|---|---|
name | テストを説明する識別子 | ✔ |
location | The Geolocation of the load generators. Download list here. | ✔ |
rampup | 負荷が 0 から最大同時ユーザ セットまで増加するタイム フレーム | ✔ |
iterations | テストが終了するまでに実行される反復の回数。無限に反復する場合は「-1」と表されます。 | ✔ |
concurrency | エンジンごとに同時にアクティブなスレッドの最大数 | ✔ |
dedicatedIpsEnabled | true の場合は購入した専用 IP が使用されます。詳細情報 | ✔ |
.splitCSV.enabled | true の場合は CSV が分割されます。詳細情報 | ✔ |
reportEmail.enabled | テストの終了時に電子メールを受信する場合は true に設定します | ✔ |
duration | シャットダウンまでテストが実行される期間 | ✔ |
jmeter.version | このテストを実行するために使用される Jmeter のバージョン。例: '2.12 blazemeter' | ✔ |
type | Jmeter、URL/API、または Webdriver テストを指定できます | ✖ |
created | テストが開始された時間 | ✖ |
updated | テストが最後に更新された時間 | ✖ |
id | テストの一意の識別子。「テスト ID」です。 | ✖ |
filename | アップロードされる JMX スクリプトの名前 | ✖ |
userId | ユーザの一意の識別子 | ✖ |
consoleArgs | コンソールのコマンド ライン引数 | ✔ |
engineArgs | エンジンのコマンド ライン引数 | ✔ |
応答の例
{ "api_version": 4, "error": null, "result": { "id": 5543109, "name": "New_Name", "draftId": "td_2016_07_14_14_46_37_136992_422", "userId": 136992, "lastRunTime": 1489410339, "created": 1487494074, "updated": 1489939765, "projectId": 152150, "lastUpdatedById": 136992, "configuration": { "location": "us-east-1", "duration": 60, "type": "jmeter", "concurrency": 50, "dedicatedIpsEnabled": false, "javaVersion": "1.8", "canControlRampup": false, "targetThreads": 50, "plugins": { "remoteControl": [], "splitCSV": { "enabled": false }, "reportEmail": { "enabled": false }, "jmeter": { "filename": "Demo.jmx", "version": "3.1", "consoleArgs": "-Jtarget_host=10.7.42.12", "enginesArgs": "-Jtarget_host=10.7.42.12", "override": { "rampup": 300, "iterations": -1, "duration": 60 } } } } }, "test": { "id": 5543109, "name": "New_Name", "draftId": "td_2016_07_14_14_46_37_136992_422", "userId": 136992, "lastRunTime": 1489410339, "created": 1487494074, "updated": 1489939765, "projectId": 152150, "lastUpdatedById": 136992, "configuration": { "location": "us-east-1", "duration": 60, "type": "jmeter", "concurrency": 50, "dedicatedIpsEnabled": false, "javaVersion": "1.8", "canControlRampup": false, "targetThreads": 50, "plugins": { "remoteControl": [], "splitCSV": { "enabled": false }, "reportEmail": { "enabled": false }, "jmeter": { "filename": "Demo.jmx", "version": "3.1", "consoleArgs": "-Jtarget_host=10.7.42.12", "enginesArgs": "-Jtarget_host=10.7.42.12", "override": { "rampup": 300, "iterations": -1, "duration": 60 } } } } } }
API v2
URL
https://a.blazemeter.com:443/api/latest/tests/testID
リクエスト パラメータ
Parameter | 説明 |
---|---|
API キー | Identifies the user ( --user 'id:secret' ). How to get the API Key? |
テスト ID | Identifies the test. How to get the Test ID? |
Post ボディ | The parameters you wish to update. See list Below |
cURL
curl -X put https://a.blazemeter.com:443/api/latest/tests/testID -H "Content-Type: application/json" -d '{"name": "New Name3","configuration": {"location": "us-west-1","type": "jmeter","concurrency": 200,"dedicatedIpsEnabled": "false","plugins": {"splitCSV": {"enabled": "false"}}}}' --user 'id:secret'
Python
import requests def testUpdate(test_id): return requests.put('https://a.blazemeter.com/api/latest/tests/{0}/'.format(test_id), json={"name": "New Name3","configuration": {"location": "us-west-1","type": "jmeter","concurrency": 200,"dedicatedIpsEnabled": "false","plugins": {"splitCSV": {"enabled": "false"}}}})
users = { user:'id:secret'
}
res = testUpdate(testID ) print res.json()
テスト オブジェクト
テスト オブジェクトには、以下のパラメータが含まれています。
パラメータ | 説明 | 変更可能 |
---|---|---|
name | テストを説明する識別子 | ✔ |
location | The Geolocation of the load generators. Download list here. | ✔ |
rampup | 負荷が 0 から最大同時ユーザ セットまで増加するタイム フレーム | ✔ |
iterations | テストが終了するまでに実行される反復の回数。無限に反復する場合は「-1」と表されます。 | ✔ |
concurrency | エンジンごとに同時にアクティブなスレッドの最大数 | ✔ |
dedicatedIpsEnabled | true の場合は購入した専用 IP が使用されます。詳細情報 | ✔ |
.splitCSV.enabled | true の場合は CSV が分割されます。詳細情報 | ✔ |
reportEmail.enabled | テストの終了時に電子メールを受信する場合は true に設定します | ✔ |
duration | シャットダウンまでテストが実行される期間 | ✔ |
jmeter.version | このテストを実行するために使用される Jmeter のバージョン。例: '2.12 blazemeter' | ✔ |
type | Jmeter、URL/API、または Webdriver テストを指定できます | ✖ |
created | テストが開始された時間 | ✖ |
updated | テストが最後に更新された時間 | ✖ |
id | テストの一意の識別子。「テスト ID」です。 | ✖ |
filename | アップロードされる JMX スクリプトの名前 | ✖ |
userId | ユーザの一意の識別子 | ✖ |
応答の例
{ "api_version": 2, "error": null, "result": { "id": 50969227, "name": "New_Name", "draftId": "td_2015_05_05_21_15_13_67295_9842", "userId": 674495, "created": 1430849615, "updated": 1432758706, "configuration": { "location": "us-central1-a", "type": "jmeter", "concurrency": 50, "dedicatedIpsEnabled": false, "plugins": { "splitCSV": { "enabled": false }, "reportEmail": { "enabled": true }, "jmeter": { "filename": "Demo.jmx", "version": "2.11blazemeter", "override": { "rampup": 300, "iterations": -1, "duration": 50 } } } } }, "test": { "id": 50969227, "name": "New_Name", "draftId": "td_2015_05_05_21_15_13_67295_9842", "userId": 674495, "created": 1430849615, "updated": 1432758706, "configuration": { "location": "us-central1-a", "type": "jmeter", "concurrency": 50, "dedicatedIpsEnabled": false, "plugins": { "splitCSV": { "enabled": false }, "reportEmail": { "enabled": true }, "jmeter": { "filename": "Demo.jmx", "version": "3.1", "override": { "rampup": 300, "iterations": -1, "duration": 50 } } } } } }
0 コメント