Distributed load testing API - Distributed Load Testing on AWS

Distributed load testing API

This load testing solution helps 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 activated methods after they provide a valid identity token.

For more information on running tests directly via the API, refer to Signing Requests in the Amazon API Gateway REST API Reference documentation.

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

Note

For more information about testScenario and other parameters, refer to scenarios and payload example in the GitHub repository.

Scenarios

Tasks

Regions

GET /scenarios

Description

The GET /scenarios operation allows 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 allows you to create or schedule a test scenario.

Request body

Name Description
testName The name of the test
testDescription The description of the test
testTaskConfigs An object that specifies concurrency (the number of parallel runs), taskCount (the number of tasks needed to run a test), and region for the scenario
testScenario The test definition including concurrency, test time, host, and method for the test
testType The test type (for example, simple, jmeter)
fileType The upload file type (for example, none, script, zip)
scheduleDate The date to run a test. Only provided if scheduling a test (for example, 2021-02-28)
scheduleTime The time to run a test. Only provided if scheduling a test (for example, 21:07)
scheduleStep The step in the schedule process. Only provided if scheduling a recurring test. (Available steps include create and start)
recurrence The recurrence of a scheduled test. Only provided if scheduling a recurring test (for example, daily, weekly, biweekly, or monthly)

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 allows 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
testType The type of test that is run (for example, simple, jmeter)
fileType The type of file that is uploaded (for example, none, script, zip)
status The status of the test
startTime The time and date when the last test started
endTime The time and date when the last test ended
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
errorReason An error message generated when an error occurs
nextRun The next scheduled run (for example, 2017-04-22 17:18:00)
scheduleRecurrence The recurrence of the test (for example, daily, weekly, biweekly, monthly)

POST /scenarios/{testId}

Description

The POST /scenarios/{testId} operation allows 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 allows 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
testType The type of test that is run (for example, simple, jmeter)
fileType The type of file that is uploaded (for example, none, script, zip)
status The status of the test
startTime The time and date when the last test started
endTime The time and date when the last test ended
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
errorReason An error message generated when an error occurs

GET /tasks

Description

The GET /tasks operation allows 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

GET /regions

Description

The GET /regions operation allows you to retrieve the regional resource information necessary to run a test in that Region.

Response

Name Description
testId The Region ID
ecsCloudWatchLogGroup The name of the Amazon CloudWatch log group for the Amazon Fargate tasks in the Region
region The Region in which the resources in the table exist
subnetA The ID of one of the subnets in the Region
subnetB The ID of one of the subnets in the Region
taskCluster The name of the AWS Fargate cluster in the Region
taskDefinition The ARN of the task definition in the Region
taskImage The name of the task image in the Region
taskSecurityGroup The ID of the security group in the Region

OPTIONS /regions

Description

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

Response

Name Description
testId The Region ID
ecsCloudWatchLogGroup The name of the Amazon CloudWatch log group for the Amazon Fargate tasks in the Region
region The Region in which the resources in the table exist
subnetA The ID of one of the subnets in the Region
subnetB The ID of one of the subnets in the Region
taskCluster The name of the AWS Fargate cluster in the Region
taskDefinition The ARN of the task definition in the Region
taskImage The name of the task image in the Region
taskSecurityGroup The ID of the security group in the Region