Appendix D: Distributed Load Testing API - Distributed Load Testing on AWS

Appendix D: Distributed Load Testing API

This load testing solution enables you to expose test result data in a secure manner. The API acts as a “front door” for access to testing data stored in Amazon DynamoDB. You can also use the APIs to access any extended functionality you build into the solution.

This solution uses an Amazon Cognito user pool integrated with Amazon API Gateway for identification and authorization. When a user pool is used with the API, clients are only allowed to call user pool enabled methods after they provide a valid identity token.

The following operations are available in the solution's API.

Scenarios

Tasks

GET /scenarios

Description

The GET /scenarios operation enables you to retrieve a list of test scenarios.

Response

Name Description
data A list of scenarios including the ID, name, description, status, and run time for each test

POST /scenarios

Description

The POST /scenarios operation enables you to create a test scenario.

Request Body

Name Description
testName The name of the test
testDescription The description of the test
taskCount The number of tasks needed to run the test
testScenario The test definition including concurrency, test time, host, and method for the test

Response

Name Description
testId The unique ID of the test
testName The name of the test
status The status of the test

OPTIONS /scenarios

Description

The OPTIONS /scenarios operation provides a response for the request with the correct CORS response headers.

Response

Name Description
testId The unique ID of the test
testName The name of the test
status The status of the test

GET /scenarios/{testId}

Description

The GET /scenarios/{testId} operation enables you to retrieve the details of a specific test scenario.

Request Parameter

testId

The unique ID of the test

Type: String

Required: Yes

Response

Name Description
testId The unique ID of the test
testName The name of the test
testDescription The description of the test
status The status of the test
runtime The date the last test ran
testScenario The test definition including concurrency, test time, host, and method for the test
taskCount The number of tasks needed to run the test
taskIds A list of task IDs for running tests
results The final results of the test
history A list of final results of past tests

POST /scenarios/{testId}

Description

The POST /scenarios/{testId} operation enables you to cancel a specific test scenario.

Request Parameter

testId

The unique ID of the test

Type: String

Required: Yes

Response

Name Description
status The status of the test

DELETE /scenarios/{testId}

Description

The DELETE /scenarios/{testId} operation enables you to delete all data related to a specific test scenario.

Request Parameter

testId

The unique ID of the test

Type: String

Required: Yes

Response

Name Description
status The status of the test

OPTIONS /scenarios/{testId}

Description

The OPTIONS /scenarios/{testId} operation provides a response for the request with the correct CORS response headers.

Response

Name Description
testId The unique ID of the test
testName The name of the test
testDescription The description of the test
status The status of the test
runtime The date the last test ran
testScenario The test definition including concurrency, test time, host, and method for the test
taskCount The number of tasks needed to run the test
taskIds A list of task IDs for running tests
results The final results of the test
history A list of final results of past tests

GET /tasks

Description

The GET /tasks operation enables you to retrieve a list of running Amazon Elastic Container Service (Amazon ECS) tasks.

Response

Name Description
tasks A list of task IDs for running tests

OPTIONS /tasks

Description

The OPTIONS /tasks tasks operation provides a response for the request with the correct CORS response headers.

Response

Name Description
taskIds A list of task IDs for running tests