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
Parameter | Type | Description |
---|---|---|
key | String | The 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. |
value | Integer | The 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
Parameter | Type | Description |
---|---|---|
<key> | Integer | The updated value of the shared variable associated with the specified key in Shared Data Server. |
Example Request
http:/test_controller/api/1.0/shared_data_server/increment
POST Data
{
"key": "my_key",
"value": 3
}
Example Response
{
"my_key": 7
}