Skip to content

ServicesTest

API Test and Analytics - Configure and analyze user-initiated API test and results


Configure and generate testing tasks of service

PUT
/api/v1/services/{id}/test/task/generate

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

查询参数

taskSprintId

Task sprint id, it is required for agile project management

类型integer
format"int64"

请求体

application/json
JSON
[
{
"assigneeId": 0,
"testType": "PERFORMANCE",
"priority": "MEDIUM",
"deadlineDate": "2022-12-01 12:00:00"
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Configure and generate the testing scripts of service

PUT
/api/v1/services/{id}/test/script/generate

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

请求体

application/json
JSON
[
{
"testType": "PERFORMANCE",
"priority": "MEDIUM",
"iterations": "MEDIUM",
"threads": 0,
"duration": {
"value": 0,
"unit": "string"
},
"rampUpThreads": 0,
"rampUpInterval": {
"value": 0,
"unit": "string"
},
"ignoreAssertions": true,
"updateTestResult": true,
"auth": true
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Enable or disable the testing of service apis

PUT
/api/v1/services/{id}/test/enabled

After enabled, the test will be marked as a mandatory activity and the results will be included in the performance analysis

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*
类型integer
必填
format"int64"

查询参数

testTypes*

Apis test type

类型array
必填
uniqueItemstrue
enabled*

Enabled or Disabled

类型boolean
必填

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Create the smoke testing execution of service apis

PUT
/api/v1/services/{id}/smoke/exec

If the script does not exist, create the script

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

请求体

application/json
JSON
[
{
"url": "https://{env}-api.xcan.cloud:{port}/{basePath}",
"description": "The production API server",
"variables": {
"extensions": {
"additionalProperties": {
}
},
"empty": true,
"additionalProperties": {
}
},
"extensions": {
"additionalProperties": {
}
},
"emptyContent": true,
"notEmptyContent": true
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Create the smoke testing execution of service apis

PUT
/api/v1/services/{id}/security/exec

if the script does not exist, create the script

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

请求体

application/json
JSON
[
{
"url": "https://{env}-api.xcan.cloud:{port}/{basePath}",
"description": "The production API server",
"variables": {
"extensions": {
"additionalProperties": {
}
},
"empty": true,
"additionalProperties": {
}
},
"extensions": {
"additionalProperties": {
}
},
"emptyContent": true,
"notEmptyContent": true
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Create the testing execution of service apis

PUT
/api/v1/services/{id}/exec

If the script does not exist, create the script

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

查询参数

testTypes*

Test type

类型array
必填
uniqueItemstrue

请求体

application/json
JSON
[
{
"url": "https://{env}-api.xcan.cloud:{port}/{basePath}",
"description": "The production API server",
"variables": {
"extensions": {
"additionalProperties": {
}
},
"empty": true,
"additionalProperties": {
}
},
"extensions": {
"additionalProperties": {
}
},
"emptyContent": true,
"notEmptyContent": true
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Restart the existing testing tasks of service

PATCH
/api/v1/services/{id}/test/task/restart

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Reopen the existing testing tasks of service

PATCH
/api/v1/services/{id}/test/task/reopen

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query all server configurations of the service

GET
/api/v1/services/{id}/test/schema/server

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query the test results of service

GET
/api/v1/services/{id}/test/result

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

The api testing count of service

GET
/api/v1/services/{id}/test/apis/count

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*
类型integer
必填
format"int64"

查询参数

creatorObjectType

Query organization type, default USER

类型string
枚举
"USER""DEPT""GROUP"
creatorObjectId

Query organization id

类型integer
format"int64"
createdDateStart

Resources creation start date

类型string
format"date-time"
createdDateEnd

Resources creation end date

类型string
format"date-time"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query the test results of project

GET
/api/v1/project/{id}/test/result

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Project id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

The api testing count of project

GET
/api/v1/project/{id}/test/apis/count

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*
类型integer
必填
format"int64"

查询参数

creatorObjectType

Query organization type, default USER

类型string
枚举
"USER""DEPT""GROUP"
creatorObjectId

Query organization id

类型integer
format"int64"
createdDateStart

Resources creation start date

类型string
format"date-time"
createdDateEnd

Resources creation end date

类型string
format"date-time"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Delete the testing tasks of service

DELETE
/api/v1/services/{id}/test/task

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

查询参数

testTypes*

Test type

类型array
必填
uniqueItemstrue

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Delete the testing scripts of service

DELETE
/api/v1/services/{id}/test/script

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

id*

Services id

类型integer
必填
format"int64"

查询参数

testTypes*

Test type

类型array
必填
uniqueItemstrue

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Released under the GPL-3.0 License.