Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Load Testing
  • Getting started
    • All guides
    • Creating a test agent
    • Configuring test agent security groups
    • Configuring test target security groups
    • Creating a test with data from a bucket
    • Exporting test reports
    • Collecting user requests using Dispatcher
    • Creating and configuring a regression dashboard
    • Checking regression metrics for exceeded thresholds
    • Saving test artifacts to Object Storage
    • Viewing operations with resources
  • Access management
  • Pricing policy
  • Terraform reference
  • Audit Trails events
  • Release notes

In this article:

  • Preparing the infrastructure
  • Creating a test
  1. Step-by-step guides
  2. Creating a test with data from a bucket

Creating a test with data from a bucket

Written by
Yandex Cloud
Updated at May 5, 2025
  • Preparing the infrastructure
  • Creating a test

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 infrastructurePreparing the infrastructure

  1. Create a test agent.

  2. Create a bucket and upload the test data file into it.

  3. Grant the service account linked to the agent read permission in the bucket. To do this, edit the bucket's ACL:

    1. In the management console, select the folder the bucket is in.
    2. From the list of services, select Object Storage.
    3. Click next to the bucket and select Configure ACL.
    4. In the window that opens, enter the service account name, select READ for bucket permissions, and click Add.
    5. 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.

Creating a testCreating a test

Management console
CLI
  1. In the management console, select the folder for testing.

  2. From the list of services, select Load Testing.

  3. In the Tests tab, click Create test.

  4. Select a test agent or create a new one.

  5. Under Attached files:

    1. Click Select from bucket.
    2. 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.

  6. Depending on the selected configuration type, set the parameters under Test settings:

    Form
    Configuration file
    1. Select a load generator.
    2. In the Target address and Target port fields, enter the address and port of the service to test.
    3. (Optional) Enable Secure connection.
    4. In the Testing threads field, specify the number of testing threads.
    5. Under Load type:
      • Select a type.
      • Click Load profile and add one or more server load profiles.
    6. In the Configuration method field, select Attached file as the test data type.
    7. (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.

    8. 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.
    9. Optionally, enable the Agent monitoring option. For more information, see Test agent monitoring.
    10. 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)
    

    Note

    During testing, the agent automatically cleans up disk space. You can manage the amount of space freed up via the disk_limit parameter under rcheck:

    rcheck:
      enabled: true
      package: yandextank.plugins.ResourceCheck
      disk_limit: 2048
      interval: 10s
      mem_limit: 512
    
  7. Click Create.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. View the description of the CLI command for creating a test:

    yc loadtesting test create --help
    
  2. Upload the YAML configuration file for your test:

    yc loadtesting test-config create --from-yaml-file <file_path>
    
  3. Upload the test data. To do this, create an IAM token:

    export YC_TOKEN=$(yc iam create-token)
    export TEST_PAYLOAD_FILE="sample/_requests.uri"
    export S3_PAYLOAD_BUCKET="my_bucket"
    export S3_PAYLOAD_FILENAME="my_requests.uri"
    curl -H "X-YaCloud-SubjectToken: ${$YC_TOKEN}" --upload-file - "https://storage.yandexcloud.net/${$S3_PAYLOAD_BUCKET}/${$S3_PAYLOAD_FILENAME}" < ${$TEST_PAYLOAD_FILE}
    
  4. Create a test in the default folder:

    loadtesting test create \
    --name "yc-examples-test" \
    --description "Test has been created using YC" \
    --labels source=gh,type=tutorial \
    --configuration id=ff6hvk749g71********,agent-id=ff633vbrst7a********,test-data=requests.uri \
    --test-data name=requests.uri,s3bucket=my_bucket,s3file=my_requests.uri
    

    Where:

    • --name: Test name.
    • --description: Test description.
    • --labels: Test labels.
    • --configuration: Test configuration parameters:
      • id: Test configuration ID. Specify the ID of the configuration file you uploaded in Step 2. To get the list of configuration IDs, run the yc loadtesting test-config list command.
      • agent-id: Test agent ID.
      • test-data: Test data file name.
    • --test-data: Test data settings:
      • name: Test data object name.
      • s3bucket: Name of the bucket storing the test data.
      • s3file: Name of the test data file in the bucket.

    For more information on how to create a test with the CLI, see the Yandex Cloud Examples repository.

  5. To view the list of tests in the folder for loadtesting using the CLI, run the following command:

    yc loadtesting test list
    

    For more information on using the CLI to view test info, see the Yandex Cloud Examples repository.

Was the article helpful?

Previous
Configuring test target security groups
Next
Exporting test reports
© 2025 Direct Cursus Technology L.L.C.