Skip to main content

Shared Data Server - Increment

This Eggplant Performance Test Controller REST method increments an integer value associated with the specified key in the Shared Data Server.

note

For this method to work, Shared Data Server must be running on the same machine as the Test Controller REST server. This is usually accomplished by enabling the Start the Shared Data Server at the beginning of the test option on the Test View > Shared Data Server tab in Studio.

URL

/test_controller/api/1.0/shared_data_server/increment

HTTP Method

POST: Increments an integer value associated with the specified key in the Shared Data Server

POST Data Parameters

ParameterTypeDescription
keyStringThe key of a shared variable in Shared Data Server. This can be a new key or an existing key, in which case the value must already be an integer.
valueIntegerThe amount by which to increment the existing value in the Shared Data Server.
warning

The specified key must relate to a shared variable in Shared Data Server. Shared lists are currently not accessible via this API.

Response Parameters

ParameterTypeDescription
<key>IntegerThe updated value of the shared variable associated with the specified key in Shared Data Server.

Example Request

http://localhost:5001/test_controller/api/1.0/shared_data_server/increment
POST Data
{
"key": "my_key",
"value": 3
}

Example Response

{
"my_key": 7
}