Assigning tests to an Endpoint Agent
Both Endpoint Agent and Endpoint Pulse can run a combination of a maximum of 10 Scheduled and Automated Session Tests at a time. However, you can assign more than 10 tests to an agent.
You cannot assign a test to more than 5000 agents.
In case, more than 10 tests are assigned to an agent, the platform works on a mechanism that decides which tests should run on a given agent. For every agent, this mechanism runs at every check-in (10 minutes), or earlier, if the agent is connected to the websocket. Now, all enabled tests associated with the agent are gathered and sorted to determine which tests will run on the agent. To sort the tests, the following cascading (moving down to the next one if there is a tie) list of strategies is used to compare the tests:
- 1.Test priority is defined in the user interface (if toggled the task has higher precedence).
- 2.Type of test (from highest to lowest precedence)
- Test targeting this agent directly.
- Test targeting this agent through a label.
- Test targeting all agents.
- 3.Tests already assigned to the agent have higher precedence.
- 4.A tie-breaker (more details below).
Imagine a scenario with 20 enabled tests, all using the same priority and type. Based on the above strategy, they all have an equal chance of being assigned to an agent. To figure out which 10 tests would be assigned to an agent, the mechanism randomly spreads the tests to all agents, while maintaining a deterministic and consistent behavior per agent. For example, the scenario could have the following spread:
- Agent1: Test# - [1,3,5,7,9,12,14,16,18,20]
- Agent2: Test# - [2,4,6,8,10,11,13,15,17,19]
In case of automated session tests, there is an additional constraint that an agent can only run a test for a given application once. If there are multiple automated session tests for the same application, the relevant test is picked according to the priority system mentioned above. If there are two application tests at the same priority level, then one of them gets picked at random. However, this choice will be consistent for a given agent (no flapping behaviour). For example consider the following scenario:
Here, agent1 may run the tests 3 and 1, and agent2 may run tests 3 and 2.