Creating a test with data from a bucket
You can upload payloads from a Yandex Object Storage bucket to Load Testing. This method allows you to:
- Handle large volumes of payloads (over 100 MB).
- Store payloads and reuse them easily.
- Ensure maximum security (payloads remain in the user's cloud and associated networks).
Preparing the infrastructure
-
Create a test agent.
-
Grant the service account linked to the agent read permission in the bucket. To do this, edit the bucket's ACL:
- In the management console
, select the folder the bucket is in. - In the list of services, select Object Storage.
- Click
next to the bucket and select Bucket ACL. - In the window that opens, enter the service account name, select the
READ
permissions to the bucket, and click Add. - Click Save.
This grants the service account permission to read data from this bucket only.
Note
As an alternative to editing the bucket ACL, you can assign the
storage.editor
role to the service account.This method is less secure, since it allows the service account to perform any operations with all buckets in the folder: creating, deleting, and updating a bucket, or granting public access to them.
- In the management console
Creating a test
-
In the management console
, select the folder for testing. -
In the list of services, select Load Testing.
-
In the
Tests tab, click Create test. -
Select a test agent or create a new one.
-
(Optional) Select or create a log group.
-
Under Attached files:
- Click Select from bucket.
- Find the bucket in the drop-down list and specify the path to the payload file.
Alternatively, you can Select files from your computer. In this case, you will have to reupload the files every time you run the test.
-
Depending on the selected configuration type, set the parameters under Test settings:
FormConfiguration file- Select a load generator.
- In the Target address and Target port fields, enter the address and port of the service to test.
- (Optional) Enable Secure connection.
- In the Testing threads field, specify the number of testing threads.
- Under Load type:
- Select a type.
- Click
Load profile and add one or more server load profiles.
- In the Configuration method field, select Attached file as the test data type.
- (Optional) If you want to reduce the test time, set the condition to stop the test automatically in the Autostop menu. Click
Autostop and specify:-
Autostop type: Parameter whose value defines when a test is interrupted.
-
Autostop parameter values.
Specify different sets of parameters for different autostop types.
-
- Under Forced test termination time, specify the time to autostop the test unless it is stopped for other reasons. This parameter value should be slightly greater than the expected test duration.
- Optionally, enable the Agent monitoring option. For more information, see Test agent monitoring.
- Under Test information, specify the test name, description, version number, and label.
Click Attach file and open the configuration file on your computer. If you do not have a configuration file, run the test again or generate a configuration file based on the documentation
.Warning
Make sure to specify the time limit for the test under
autostop
in the configuration file:autostop: enabled: true package: yandextank.plugins.Autostop autostop: - limit (5m)
-
Click Create.