Load Testing API, REST: Test.Create
Creates (runs) a test in the specified folder.
HTTP request
POST https://loadtesting.api.cloud.yandex.net/loadtesting/api/v1/tests
Body parameters
{
"folderId": "string",
"configurations": [
{
"configId": "string",
"agentSelector": {
// Includes only one of the fields `agentId`, `matchByFilter`, `anonymousAgent`
"agentId": "string",
"matchByFilter": "string",
"anonymousAgent": "boolean"
// end of the list of possible fields
},
"files": {
// Includes only one of the fields `objectStorage`
"objectStorage": {
"bucket": "string",
"name": "string"
}
// end of the list of possible fields
}
}
],
"testDetails": {
"name": "string",
"description": "string",
"tags": [
{
"key": "string",
"value": "string"
}
],
"loggingLogGroupId": "string",
"artifactSettings": {
// Includes only one of the fields `objectStorageBucket`
"objectStorageBucket": "string",
// end of the list of possible fields
"isArchive": "boolean",
"filterInclude": [
"string"
],
"filterExclude": [
"string"
]
}
}
}
Field |
Description |
folderId |
string Required field. ID of the folder to create a test in. |
configurations[] |
Test configuration associated with agents on which they will be executed. |
testDetails |
Test details. Name, tags etc. |
SingleAgentConfiguration
Configuration of a test.
Field |
Description |
configId |
string ID of the config. |
agentSelector |
Agent selection criterion. |
files |
Additional files to be used during test execution, represented as
Use cases include:
|
AgentSelector
Agent selection criterion.
The structure is used by service to determine on which agents a specific test should be executed.
Field |
Description |
agentId |
string Selection by agent ID. Includes only one of the fields |
matchByFilter |
string Selection by filter string. Includes only one of the fields |
anonymousAgent |
boolean Select anonymoud (i.e. not registered) agents. Includes only one of the fields |
FilePointer
Variant-like structure for referencing files in different sources.
Field |
Description |
objectStorage |
Reference to a file in Object Storage. Includes only one of the fields |
ObjectStorage
Reference to a file stored in Object Storage.
Field |
Description |
bucket |
string Bucket name. |
name |
string File name. |
Details
Test meta information.
Field |
Description |
name |
string Name of the test. |
description |
string Description of the test. |
tags[] |
Tags assigned to the test. |
loggingLogGroupId |
string ID of the logging group to which test artifacts are uploaded. |
artifactSettings |
Settings which define where to upload test artifacts and which files should be included. |
Tag
Tag attached to some entity.
Field |
Description |
key |
string Key of the tag. |
value |
string Value of the tag. |
ArtifactSettings
Artifact upload settings.
Defines where to upload test artifacts and which files should be included.
Field |
Description |
objectStorageBucket |
string Name of output object storage bucket in test's folder. Includes only one of the fields |
isArchive |
boolean Setting which defines whether artifact files should be archived prior to uploading. |
filterInclude[] |
string Filter strings defining which files should be included to artifacts. GLOB format. Example:
|
filterExclude[] |
string Filter strings defining which files should be excluded from artifacts. GLOB format. Example:
|
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": {
"testId": "string"
},
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": {
"id": "string",
"configurations": [
{
"configId": "string",
"agentSelector": {
// Includes only one of the fields `agentId`, `matchByFilter`, `anonymousAgent`
"agentId": "string",
"matchByFilter": "string",
"anonymousAgent": "boolean"
// end of the list of possible fields
},
"files": {
// Includes only one of the fields `objectStorage`
"objectStorage": {
"bucket": "string",
"name": "string"
}
// end of the list of possible fields
}
}
],
"details": {
"name": "string",
"description": "string",
"tags": [
{
"key": "string",
"value": "string"
}
],
"loggingLogGroupId": "string",
"artifactSettings": {
// Includes only one of the fields `objectStorageBucket`
"objectStorageBucket": "string",
// end of the list of possible fields
"isArchive": "boolean",
"filterInclude": [
"string"
],
"filterExclude": [
"string"
]
}
},
"summary": {
"status": "string",
"createdAt": "string",
"createdBy": "string",
"startedAt": "string",
"finishedAt": "string",
"isFinished": "boolean",
"error": "string",
"imbalancePoint": {
"at": "string",
"rps": "string",
"comment": "string"
},
"assignedAgentId": "string",
"artifacts": {
// Includes only one of the fields `objectStorage`
"objectStorage": {
"bucket": "string",
"name": "string"
}
// end of the list of possible fields
}
},
"folderId": "string"
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
createdBy |
string ID of the user or service account who initiated the operation. |
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
done |
boolean If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
CreateTestMetadata
Field |
Description |
testId |
string ID of the test that is being created. |
Status
The error result of the operation in case of failure or cancellation.
Field |
Description |
code |
integer (int32) Error code. An enum value of google.rpc.Code |
message |
string An error message. |
details[] |
object A list of messages that carry the error details. |
Test
Load Test.
In context of the service, Test represents a single testing task/job.
Field |
Description |
id |
string ID of the test. Generated at creation time. |
configurations[] |
Configuration of the test. A test can have multiple configurations if it can be |
details |
Test meta information. Name, description, etc. |
summary |
Test execution information. |
folderId |
string ID of the folder that the test belongs to. |
SingleAgentConfiguration
Configuration of a test.
Field |
Description |
configId |
string ID of the config. |
agentSelector |
Agent selection criterion. |
files |
Additional files to be used during test execution, represented as
Use cases include:
|
AgentSelector
Agent selection criterion.
The structure is used by service to determine on which agents a specific test should be executed.
Field |
Description |
agentId |
string Selection by agent ID. Includes only one of the fields |
matchByFilter |
string Selection by filter string. Includes only one of the fields |
anonymousAgent |
boolean Select anonymoud (i.e. not registered) agents. Includes only one of the fields |
FilePointer
Variant-like structure for referencing files in different sources.
Field |
Description |
objectStorage |
Reference to a file in Object Storage. Includes only one of the fields |
ObjectStorage
Reference to a file stored in Object Storage.
Field |
Description |
bucket |
string Bucket name. |
name |
string File name. |
Details
Test meta information.
Field |
Description |
name |
string Name of the test. |
description |
string Description of the test. |
tags[] |
Tags assigned to the test. |
loggingLogGroupId |
string ID of the logging group to which test artifacts are uploaded. |
artifactSettings |
Settings which define where to upload test artifacts and which files should be included. |
Tag
Tag attached to some entity.
Field |
Description |
key |
string Key of the tag. |
value |
string Value of the tag. |
ArtifactSettings
Artifact upload settings.
Defines where to upload test artifacts and which files should be included.
Field |
Description |
objectStorageBucket |
string Name of output object storage bucket in test's folder. Includes only one of the fields |
isArchive |
boolean Setting which defines whether artifact files should be archived prior to uploading. |
filterInclude[] |
string Filter strings defining which files should be included to artifacts. GLOB format. Example:
|
filterExclude[] |
string Filter strings defining which files should be excluded from artifacts. GLOB format. Example:
|
Summary
Process of test and some results
Field |
Description |
status |
enum (Status) Status of the test.
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
createdBy |
string UA or SA that created the test. |
startedAt |
string (date-time) Test start timestamp. Empty if the test has not been started yet. String in RFC3339 To work with values in this field, use the APIs described in the |
finishedAt |
string (date-time) Test finish timestamp. Empty if the test has not been finished yet. String in RFC3339 To work with values in this field, use the APIs described in the |
isFinished |
boolean Indicates whether the test is finished. |
error |
string Error message. |
imbalancePoint |
Detected imbalance point. Contains information about a state at the moment it has been Empty if no auto-stop occured. |
assignedAgentId |
string ID of the agent that executed the test. |
artifacts |
Test output artifacts. Link to the artifacts output target containing |
ImbalancePoint
Test imbalance point.
Field |
Description |
at |
string (date-time) Imbalance moment timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
rps |
string (int64) Imbalance moment RPS. |
comment |
string Imbalance reason comment. |