☁️VoltTest Cloud closed beta is now openJoin the waitlist
Skip to main content

Cloud Mode

VoltTest Cloud lets you run load tests on managed infrastructure instead of your local machine. Tests scale to thousands of concurrent virtual users across multiple regions, with results stored in the VoltTest dashboard.

Closed Beta — Not in Stable Release

VoltTest Cloud is currently in closed beta and is not available in the stable SDK release. The cloud features documented on this page are only accessible to approved beta users. Sign up to join the waitlist.

Setup

Prerequisites

Get Your API Key

  1. Log in to volt-test.com
  2. Go to Settings
  3. Copy your API key (starts with vt_)

Enable Cloud Mode

$test = new VoltTest('My Load Test');
$test->cloud('vt_your_api_key');

That's it — when you call run(), the test will execute on VoltTest Cloud instead of locally.

Basic Usage

<?php
use VoltTest\VoltTest;

$test = new VoltTest('API Load Test');
$test->cloud('vt_your_api_key');
$test->setVirtualUsers(500);
$test->setDuration('5m');

$scenario = $test->scenario('Checkout Flow');

$scenario->step('Login')
->post('https://api.example.com/login', '{"email": "user@test.com", "password": "secret"}')
->header('Content-Type', 'application/json')
->extractFromJson('token', 'data.token');

$scenario->step('Add to Cart')
->post('https://api.example.com/cart', '{"product_id": 1}')
->header('Authorization', 'Bearer ${token}')
->validateStatus('success', 200);

$test->run();

In cloud mode, run() submits the test to VoltTest Cloud. The run ID, dashboard URL, and status are automatically printed to the terminal — no need to echo them manually.

run() also returns a CloudRun object for programmatic access (useful in CI/CD or automation).

CloudRun API

The CloudRun object returned by run() provides programmatic access to the run details:

MethodReturn TypeDescription
getRunId()stringUnique run identifier
getTestId()stringTest definition identifier
getStatus()stringRun status
getDashboardUrl()stringURL to view results in the dashboard
isSuccessful()booltrue if status is completed

Status Values

StatusDescription
completedTest finished successfully
runningTest is currently executing
failedTest encountered an error
stoppedTest was manually stopped

Configuration Options

Cloud Timeout

Set the maximum time to wait for the cloud run to be provisioned and started (default: 30 minutes):

$test->cloud('vt_your_api_key');
$test->setCloudTimeout(3600); // 1 hour

The minimum timeout is 60 seconds.

Staged Load Profiles

Stages work in cloud mode the same as locally:

$test->cloud('vt_your_api_key');

$test->stage('1m', 100); // Ramp to 100 VUs over 1 minute
$test->stage('5m', 100); // Hold at 100 VUs for 5 minutes
$test->stage('2m', 500); // Ramp to 500 VUs over 2 minutes
$test->stage('10m', 500); // Hold at 500 VUs for 10 minutes
$test->stage('1m', 0); // Ramp down to 0

Region Distribution

Distribute load across multiple geographic regions:

$test->cloud('vt_your_api_key');
$test->setVirtualUsers(1000);
$test->regions([
'us-east-1' => 60, // 600 VUs in US East
'eu-west-1' => 40, // 400 VUs in EU West
]);
  • Weights must be integers greater than 0
  • Weights must sum to exactly 100
  • Requires cloud mode (cloud() must be called first)

Available Regions

North America

CodeLocation
us-east-1US East (N. Virginia)
us-east-2US East (Ohio)
us-west-1US West (N. California)
us-west-2US West (Oregon)
ca-central-1Canada (Central)

South America

CodeLocation
sa-east-1South America (São Paulo)

Europe

CodeLocation
eu-west-1Europe (Ireland)
eu-west-2Europe (London)
eu-west-3Europe (Paris)
eu-central-1Europe (Frankfurt)
eu-north-1Europe (Stockholm)

Asia Pacific

CodeLocation
ap-southeast-1Asia Pacific (Singapore)
ap-southeast-2Asia Pacific (Sydney)
ap-southeast-3Asia Pacific (Jakarta)
ap-southeast-4Asia Pacific (Melbourne)
ap-southeast-5Asia Pacific (Malaysia)
ap-south-1Asia Pacific (Mumbai)
ap-south-2Asia Pacific (Hyderabad)
ap-northeast-1Asia Pacific (Tokyo)
ap-northeast-2Asia Pacific (Seoul)
ap-northeast-3Asia Pacific (Osaka)
ap-east-1Asia Pacific (Hong Kong)
ap-east-2Asia Pacific (Taipei)

Africa

CodeLocation
af-south-1Africa (Cape Town)
info

Region availability may change. If a region is temporarily unavailable, the API will return an error with details.

Conflict Handling

When you run a test with a name that already exists in your account, VoltTest will prompt you to choose:

  1. Update an existing test (reuse its configuration)
  2. Create new test with the same name
  3. Cancel the run

Interactive Mode

In a terminal (TTY), you'll see an interactive prompt:

2 test(s) named 'API Load Test' already exist:
[1] ID: a1b2c3d4... Target: https://api.example.com VUs: 100 Updated: 2026-05-01
[2] ID: e5f6g7h8... Target: https://api.example.com VUs: 500 Updated: 2026-05-15
[3] Create new test
[4] Cancel
Choice [1]:

Non-Interactive Mode

In non-interactive environments (CI/CD), VoltTest defaults to updating the most recently used test.

Custom Conflict Handler

For programmatic control, use setOnConflictPrompt():

$test->setOnConflictPrompt(function (array $existingTests) {
// Return a test ID to update that test
return $existingTests[0]['id'];

// Return null to create a new test
// return null;

// Return 'cancel' to abort
// return 'cancel';
});

Each entry in $existingTests contains:

KeyDescription
idTest UUID
nameTest name
target_urlTarget URL
virtual_usersConfigured VUs
updated_atLast update timestamp

Local vs Cloud Comparison

LocalCloud
ExecutionYour machineVoltTest managed infrastructure
Result typeTestResult (immediate metrics)CloudRun (async, view on dashboard)
Max VUsLimited by local hardwareThousands (plan-dependent)
Results storageConsole output onlyStored in dashboard with charts
Real-time metricsCLI streamingLive dashboard with graphs
Multi-regionNoYes, via regions()
RequiresPHP + SDKPHP + SDK + API key
Staged loadYesYes

Error Handling

Cloud mode can throw specific exceptions for different failure scenarios:

use VoltTest\VoltTest;
use VoltTest\Exceptions\AuthenticationException;
use VoltTest\Exceptions\PlanLimitException;
use VoltTest\Exceptions\CloudConnectionException;
use VoltTest\Exceptions\CloudTimeoutException;
use VoltTest\Exceptions\RunFailedException;

$test = new VoltTest('Load Test');
$test->cloud('vt_your_api_key');
$test->setVirtualUsers(100);
$test->setDuration('5m');

$scenario = $test->scenario('Test');
$scenario->step('Home')->get('https://example.com');

try {
$test->run();
} catch (AuthenticationException $e) {
echo "Invalid API key: " . $e->getMessage() . "\n";
} catch (PlanLimitException $e) {
echo "Plan limit exceeded: " . $e->getMessage() . "\n";
} catch (CloudConnectionException $e) {
echo "Connection failed: " . $e->getMessage() . "\n";
} catch (CloudTimeoutException $e) {
echo "Timed out: " . $e->getMessage() . "\n";
} catch (RunFailedException $e) {
echo "Run failed: " . $e->getMessage() . "\n";
}

Exception Reference

ExceptionCauseFix
AuthenticationExceptionInvalid or expired API keyRegenerate your key at volt-test.com/settings
PlanLimitExceptionVU count or duration exceeds your planReduce load or upgrade your plan
CloudConnectionExceptionCannot reach VoltTest serversCheck your network connection
CloudTimeoutExceptionProvisioning exceeded cloudTimeoutIncrease timeout with setCloudTimeout()
RunFailedExceptionTest execution failed or was stoppedCheck target availability and test configuration

All cloud exceptions extend CloudException, which extends VoltTestException.