httptest.update

Description

object httptest.update(object/array webScenarios)此方法允许更新现有的Web场景。

参数

(object/array)要更新的Web场景属性。

必须为每个Web场景定义“httptestid”属性,所有其他属性都是可选的。 只有通过的属性将被更新,所有其他属性将保持不变除了标准Web场景属性外, 该方法接受以下参数。

参数 类型 说明
steps array 用来替代现有的步骤的方案步骤。

返回值

(object) Returns an object containing the IDs of the updated web scenarios under the httptestid property.

示例

Enabling a web scenario

Enable a web scenario, that is, set its status to “0”.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "httptest.update",
  4. "params": {
  5. "httptestid": "5",
  6. "status": 0
  7. },
  8. "auth": "700ca65537074ec963db7efabda78259",
  9. "id": 1
  10. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "httptestids": [
  5. "5"
  6. ]
  7. },
  8. "id": 1
  9. }

参见

来源

CHttpTest::update() in frontends/php/include/classes/api/services/CHttpTest.php.