List
Retrieves the list of test in the specified folder.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListTestsRequest = cloudApi.loadtesting.api_test_service.ListTestsRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.TestServiceClient);
const result = await client.list(
ListTestsRequest.fromPartial({
// folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.loadtesting.api.v1.test_service_pb2 import ListTestsRequest
from yandex.cloud.loadtesting.agent.v1.test_service_pb2_grpc import TestServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(TestServiceStub)
response = service.List(
ListTestsRequest(
# folder_id = "folderId",
# page_size = 0,
# page_token = "pageToken",
# filter = "filter"
)
)
print(response)
ListTestsRequest
folderId
: string
ID of the folder to list tests in.
pageSize
: int64
The maximum number of results per page to return. If the number of available
results is larger than page_size
, the service returns a ListTestsResponse.next_page_token
that can be used to get the next page of results in subsequent list requests.
Default value: 100.
pageToken
: string
Page token. To get the next page of results, set page_token
to the
ListTestsResponse.next_page_token returned by a previous list request.
filter
: string
A filter expression that filters tests listed in the response.
The filter expression may contain multiple field expressions joined by AND
.
The field expression must specify:
- The field name.
- An operator:
=
,!=
,<
,<=
,>
,>=
,CONTAINS
,:
for single values.IN
orNOT IN
for lists of values.
- The value. String values must be encosed in
"
, boolean values are {true
,false
}, timestamp values in ISO-8601.
Currently supported fields:
id
yandex.cloud.loadtesting.api.v1.test.Test.id- operators:
=
,!=
,IN
,NOT IN
details.name
yandex.cloud.loadtesting.api.v1.test.Details.name- operators:
=
,!=
,IN
,NOT IN
,CONTAINS
details.tags.<TAG_NAME>
yandex.cloud.loadtesting.api.v1.test.Details.tags- operators:
:
summary.status
yandex.cloud.loadtesting.api.v1.test.Summary.status- operators:
=
,!=
,IN
,NOT IN
summary.is_finished
yandex.cloud.loadtesting.api.v1.test.Summary.is_finished- operators:
=
summary.created_at
yandex.cloud.loadtesting.api.v1.test.Summary.created_at- operators:
<
,<=
,>
,>=
summary.created_by
yandex.cloud.loadtesting.api.v1.test.Summary.created_by- operators:
=
,!=
,IN
,NOT IN
Examples:
summary.status IN ("DONE", "ERROR") AND details.tags.author:"yandex"
summary.is_finished = true AND details.name CONTAINS "nightly-test"
ListTestsResponse
tests
: test.Test
List of tests in the specified folder.
nextPageToken
: string
Token for getting the next page of the list. If the number of results is greater than
the specified ListTestsRequest.page_size, use next_page_token
as the value
for the ListTestsRequest.page_token parameter in the next list request.
Each subsequent page will have its own next_page_token
to continue paging through the results.
Test
Load Test.
In context of the service, Test represents a single testing task/job.
id
: string
ID of the test. Generated at creation time.
configurations
: SingleAgentConfiguration
Configuration of the test.
A test can have multiple configurations if it can be executed on multiple agents simultaneously. For more information, see Load testing using multiple agents.
details
: Details
Test meta information. Name, description, etc.
summary
: Summary
Test execution information.
folderId
: string
ID of the folder that the test belongs to.
SingleAgentConfiguration
Configuration of a test.
configId
: string
ID of the config.
agentSelector
: AgentSelector
Agent selection criterion.
files
: FilePointer
Additional files to be used during test execution, represented as rel_path:file
pairs.
rel_path
can be either a simple file name, a relative path, or absolute path. Files are
downloaded by the agent to appropriate location.
Use cases include:
- Test Data files.
- Custom Pandora executable.
- JMeter executable or ".jmx" scenario.
- etc.
Details
Test meta information.
name
: string
Name of the test.
description
: string
Description of the test.
tags
: common.Tag
Tags assigned to the test.
loggingLogGroupId
: string
ID of the logging group to which test artifacts are uploaded.
artifactSettings
: ArtifactSettings
Settings which define where to upload test artifacts and which files should be included.
Summary
Process of test and some results
status
: Status
Status of the test.
createdAt
: google.protobuf.Timestamp
Creation timestamp.
createdBy
: string
UA or SA that created the test.
startedAt
: google.protobuf.Timestamp
Test start timestamp.
Empty if the test has not been started yet.
finishedAt
: google.protobuf.Timestamp
Test finish timestamp.
Empty if the test has not been finished yet.
isFinished
: bool
Indicates whether the test is finished.
error
: string
Error message.
imbalancePoint
: ImbalancePoint
Detected imbalance point.
Contains information about a state at the moment it has been auto-stopped.
Empty if no auto-stop occured.
assignedAgentId
: string
ID of the agent that executed the test.
artifacts
: FilePointer
Test output artifacts.
Link to the artifacts output target containing .log
and other files collected
during test execution.
AgentSelector
Agent selection criterion.
The structure is used by service to determine on which agents a specific test should be executed.
One of agent
agentId
: stringSelection by agent ID.
matchByFilter
: stringSelection by filter string.
anonymousAgent
: boolSelect anonymoud (i.e. not registered) agents.
FilePointer
Variant-like structure for referencing files in different sources.
One of filePointer
objectStorage
: ObjectStorageReference to a file in Object Storage.
Tag
Tag attached to some entity.
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.
One of uploadTo
objectStorageBucket
: stringName of output object storage bucket in test's folder.
isArchive
: bool
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:
- '*' - all files will be uploaded.
- '.log', '.yaml - all
.log
and.yaml
files will be uploaded.
filterExclude
: string
Filter strings defining which files should be excluded from artifacts. GLOB format.
Example:
- filter_include='*', filter_exclude='phout.log' - upload all
.log
files excludingphout.log
.
ImbalancePoint
Test imbalance point.
at
: google.protobuf.Timestamp
Imbalance moment timestamp.
rps
: int64
Imbalance moment RPS.
comment
: string
Imbalance reason comment.
ObjectStorage
Reference to a file stored in Object Storage.
bucket
: string
Bucket name.
name
: string
File name.