此方法允许创建新的Web场景。
创建Web场景将自动创建一组.
Description
object httptest.create(object/array **webScenarios**)
This method allows to create new web scenarios.
参数
(object/array)
要创建的Web场景。
除了 标准Web场景属性之外, 该方法接受以下参数
Parameters
(object/array)
Web scenarios to create.
Additionally to the standard web scenario properties, the method accepts the following parameters.
Parameter | Type | Description |
---|---|---|
steps (required) | array | Web scenario steps. |
Return values
Returns an object containing the IDs of the created web scenarios under the httptestids
property. The order of the returned IDs matches the order of the passed web scenarios.
示例
Examples
创建Web场景
创建一个Web场景来监视公司主页。 该方案将有两个步骤,以检查主页和“关于”页面,并确保它们返回HTTP状态代码200。
Creating a web scenario
Create a web scenario to monitor the company home page. The scenario will have two steps, to check the home page and the “About” page and make sure they return the HTTP status code 200.
Request:
{
"result": {
"5"
]
},
"id": 1
See also
来源
Source
CHttpTest::create() in frontends/php/include/classes/api/services/CHttpTest.php.