Session Allocation and Queue Management
Parallel Execution
QuantumGrid is designed to support parallel test execution across multiple devices while using a single hub URL.
Whether tests are triggered from a CI/CD pipeline, local machine, or parallel test threads, every session is routed through the same QuantumGrid hub. Device allocation is based on the capabilities configured in the test script, such as platform, platform version, or a specific device UDID.
How Parallel Execution Works
- All sessions use the same QuantumGrid hub URL.
- Devices are allocated based on the capabilities provided.
- Multiple sessions can run simultaneously when matching devices or execution slots are available.
- Device allocation is dynamic, meaning available devices that match the requested capabilities are selected automatically.
- Tests targeting different devices can run in parallel without additional configuration.
- Tests targeting the same device follow the concurrency limit configured for that device on the QuantumGrid server.
Example
If five Android devices are available and five parallel tests are triggered, QuantumGrid can allocate one device to each session and execute them simultaneously.
If multiple tests target the same device, execution depends on the concurrency settings configured for that device.
Queue Management
If a matching device has reached its session limit, QuantumGrid can place the new session into a queue instead of failing the request immediately.
This helps ensure that test executions continue automatically as resources become available.
How Queue Management Works
- If a matching device is busy, the session can wait in the queue.
- Queue processing follows the FIFO (First In, First Out) principle.
- The first session added to the queue is the first session to start when a slot becomes available.
- When an active session ends (for example, after
driver.quit()or a session timeout), the next queued session can start automatically. - Queue behavior can be customized using QuantumGrid capabilities.
This process helps maximize device utilization while reducing test execution failures caused by temporary resource unavailability.
Monitoring and Dashboard
QuantumGrid provides a dashboard to monitor grid activity in near real time.
The dashboard displays:
– Active sessions
– Device availability
– Queue status
Dashboard URL:
https://{domain}.testgrid.io/quantumgrid/ui/
