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
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Load Testing
  • Getting started
    • Service overview
    • Agent
    • Agent selection
    • Load generator
    • Load profile
    • Testing threads
    • Autostop
    • Resource Check
    • Test agent monitoring
    • Reports
    • Load test regressions
    • Load test results
    • Comparing load test results
    • Test artifacts
    • Quotas and limits
  • Access management
  • Pricing policy
  • Terraform reference
  • Audit Trails events
  • Release notes

In this article:

  • Specifying a test agent
  • Setting up selection of the first test agent that becomes available
  1. Concepts
  2. Agent selection

Agent selection

Written by
Yandex Cloud
Updated at October 24, 2024
  • Specifying a test agent
  • Setting up selection of the first test agent that becomes available

When creating a test, you can either specify a test agent right away by selecting one from the list or configure selecting the first agent that becomes available. The agent selection function allows you to filter test agents by parameters you set.

Specifying a test agentSpecifying a test agent

To specify a test agent:

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

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

  3. In the Tests tab, click Create test.

  4. In the Agents section, click Select from list.

  5. Select the name of the agent you need from the drop-down list.

    Note

    Within a single test, you can assign multiple agents to work synchronously, which allows you to increase the load on the test target.
    To do this, either select multiple agent names from the list or use Only and Except buttons in the row with the name of one of the agents. These buttons allow you to select only this agent or all agents other than this one, respectively.

When creating a test, specify agent IDs:

export AGENT_ID1='<agent_1_ID>'
export AGENT_ID2='<agent_2_ID>'

yc loadtesting test create \
    --name "yc-examples-test" \
    --description "Test has been created using YC" \
    --labels source=gh,type=tutorial,kind=multi \
    --configuration id=$TEST_CONFIG_ID,agent-id=$AGENT_ID1,test-data=$TEST_PAYLOAD_FILE_IN_CONFIG \
    --configuration id=$TEST_CONFIG_ID,agent-id=$AGENT_ID2,test-data=$TEST_PAYLOAD_FILE_IN_CONFIG \
    --test-data name=$TEST_PAYLOAD_FILE_IN_CONFIG,s3bucket=$S3_PAYLOAD_BUCKET,s3file=$S3_PAYLOAD_FILENAME

Setting up selection of the first test agent that becomes availableSetting up selection of the first test agent that becomes available

To configure selecting the first test agent that becomes available:

Management console
CLI
  1. In the management console, select the folder for testing.
  2. In the list of services, select Load Testing.
  3. In the Tests tab, click Create test.
  4. In the Agents section, click First released.
  5. If any of the agents is suitable for the test, select Any suitable agent; otherwise, select Set conditions and set up the agent filtering conditions:
    • (Optional) In the Filter labels section, click Add label and specify the labels for agent selection in key:value format.
    • (Optional) In the Filter by name field, specify a string that must be present in the names of the agents you want to start the test configuration on.
  6. In the Agent count field, specify how many agents will be used to run the test in synch: This will allow you to increase the load on the test target.

Set the filtering conditions:


export ANY_AGENT_SELECTOR=""
export SPECIFIC_AGENT_SELECTOR="labels.key IN (value1, value2)"

yc loadtesting test create \
   --name "yc-examples-test" \
   --description "Test has been created using YC" \
   --labels source=gh,type=tutorial \
   --configuration id=$TEST_CONFIG_ID,agent-by-filter=$ANY_AGENT_SELECTOR,test-data=$TEST_PAYLOAD_FILE_IN_CONFIG \
   --configuration id=$TEST_CONFIG_ID,agent-by-filter={$SPECIFIC_AGENT_SELECTOR},test-data=$TEST_PAYLOAD_FILE_IN_CONFIG \
   --test-data name=$TEST_PAYLOAD_FILE_IN_CONFIG,s3bucket=$S3_PAYLOAD_BUCKET,s3file=$S3_PAYLOAD_FILENAME

In this example, the first part of the test will be performed on any suitable agent (because no filtering conditions are set in ANY_AGENT_SELECTOR), while the second part, on any agent with the key label set to value1 or value2.

Was the article helpful?

Previous
Agent
Next
Load generator
Yandex project
© 2025 Yandex.Cloud LLC