Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Load Testing
  • Getting started
    • Overview
    • Agent
    • Agent selection
    • Load generator
    • Load profile
    • Testing threads
    • Autostop
    • Resource Check
    • Test agent monitoring
    • Reports
    • Load test results
    • Comparing load test results
    • Load test regressions
    • Test artifacts
    • Quotas and limits
  • Access management
  • Pricing policy
  • Terraform reference
  • Audit Trails events
  • Release notes

In this article:

  • Creating a temporary test agent
  • 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 November 14, 2025
  • Creating a temporary test agent
  • Specifying a test agent
  • Setting up selection of the first test agent that becomes available

When creating a test, you can either select a test agent from the list or create a temporary agent. The temporary test agent will be created for this specific test only and deleted after the test is complete. You can also configure selecting the first available agent. The agent selection option allows you to filter test agents by parameters you set.

Creating a temporary test agentCreating a temporary test agent

To create a temporary test agent:

Management console
  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 Temporal.
  5. Under Temporal agent settings:
    • Select a suitable agent type. For more information, see Agent performance.
    • Select a previously created service account or create a new one by clicking Create. The service account must have the following roles:
      • loadtesting.generatorClient: To send test results to Load Testing.
      • compute.editor: To create a VM in the user folder.
      • iam.serviceAccounts.user: To link the service account to the VM.
      • vpc.user: To connect to and use network resources in the user folder.
      • vpc.publicAdmin: To assign a public IP address to the VM.
    • Select the subnet hosting your test target.
    • Select the security group. Make sure to configure the security group in advance.

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 sync: 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
© 2025 Direct Cursus Technology L.L.C.