---
updatedAt: 2026-03-01T18:59:07.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/test-ctr/llms.txt
---

# Submit a test run for a test suite

```curl cURL
egcurl --eg-section default --request POST \
  --url "https://$hostname/test-management/v3/test-runs" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{
    "functional": {
        "testSuiteExecutions": [
            {
                "testSuiteId": 77663
            }
        ]
    },
    "targetEnvironment": "STAGING",
    "purgeOnStaging": true,
    "sendEmailOnCompletion": true,
    "note": "Testing the example.com test suite"
}'
```

```node Node
const EdgeGrid = require("akamai-edgegrid");
const os = require("os");
const edgercPath = os.homedir + "/.edgerc";
const edgercSection = "default";
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection,
});

eg.auth({
  path: `/test-management/v3/test-runs`,
  method: "POST",
  headers: {
    "Content-Type": "application/json",

    Accept: "application/json",
  },
  body: {
    functional: {
        testSuiteExecutions: [
            {
                testSuiteId: 77663
            }
        ]
    },
    targetEnvironment: "STAGING",
    purgeOnStaging: true,
    sendEmailOnCompletion: true,
    note: "Testing the example.com test suite"
});
  
eg.send(function (error, response, body) {
  console.log(JSON.stringify(JSON.parse(body), null, 2));
});
```

```python Python
import requests
import json
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from urllib.parse import urljoin

edgerc = EdgeRc('~/.edgerc')
section = 'default'
baseurl = 'https://%s' % edgerc.get(section, 'host')

session = requests.Session()
session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
 

path = '/test-management/v3/test-runs'
headers = {
  "Content-Type": "application/json",

  "Accept": "application/json"}
payload = {
    "functional": {
        "testSuiteExecutions": [
            {
                "testSuiteId": 77663
            }
        ]
    },
    "targetEnvironment": "STAGING",
    "purgeOnStaging": true,
    "sendEmailOnCompletion": true,
    "note": "Testing the example.com test suite"
}
```

```json Response Example
{
    "submittedBy": "atc@example.com",
    "submittedDate": "2023-08-22T10:53:50+0000",
    "testRunId": 28362,
    "targetEnvironment": "STAGING",
    "note": "Testing the example.com test suite",
    "status": "IN_PROGRESS",
    "functional": {
        "testSuiteExecutions": [
            {
                "testSuiteId": 77663,
                "testCaseExecutions": [
                    {
                        "testCaseId": 217375,
                        "testCaseExecutionId": 210455,
                        "status": "IN_PROGRESS",
                        "testCaseContext": {
                            "testCaseId": 217375,
                            "testRequest": {
                                "testRequestUrl": "https://{{hostname}}/?abc=1234555",
                                "testRequestUrlResolved": "https://example.com/?abc=1234555",
                                "requestMethod": "GET",
                                "requestHeaders": [
                                    {
                                        "headerName": "Accept",
                                        "headerValue": "v1",
                                        "headerAction": "ADD"
                                    }
                                ]
                            },
                            "clientProfile": {
                                "ipVersion": "IPV4",
                                "client": "CHROME",
                                "geoLocation": "US"
                            },
                            "condition": {
                                "conditionExpression": "Response header \"Content-Type\" has a value that ends with \"{{contentTypeValue}}\"",
                                "conditionExpressionResolved": "Response header \"Content-Type\" has a value that ends with \"json\""
                            },
                            "order": 1
                        }
                    },
                    {
                        "testCaseId": 217376,
                        "testCaseExecutionId": 210456,
                        "status": "IN_PROGRESS",
                        "testCaseContext": {
                            "testCaseId": 217376,
                            "testRequest": {
                                "testRequestUrl": "https://{{sampleVarGroup.urls}}/index",
                                "requestMethod": "GET"
                            },
                            "clientProfile": {
                                "ipVersion": "IPV4",
                                "client": "CHROME",
                                "geoLocation": "US"
                            },
                            "condition": {
                                "conditionExpression": "Response code is one of \"{{successCodes.responseCodes}}\""
                            },
                            "order": 2
                        },
                        "derivedTestCaseExecutions": [
                            {
                                "testCaseId": 217376,
                                "testCaseExecutionId": 210457,
                                "status": "IN_PROGRESS",
                                "testCaseContext": {
                                    "testRequest": {
                                        "testRequestUrl": "https://example.com/123/index",
                                        "requestMethod": "GET"
                                    },
                                    "clientProfile": {
                                        "ipVersion": "IPV4",
                                        "client": "CHROME",
                                        "geoLocation": "US"
                                    },
                                    "condition": {
                                        "conditionExpression": "Response code is one of \"200\""
                                    },
                                    "order": 1
                                }
                            },
                            {
                                "testCaseId": 217376,
                                "testCaseExecutionId": 210458,
                                "status": "IN_PROGRESS",
                                "testCaseContext": {
                                    "testRequest": {
                                        "testRequestUrl": "https://example.com/456/index",
                                        "requestMethod": "GET"
                                    },
                                    "clientProfile": {
                                        "ipVersion": "IPV4",
                                        "client": "CHROME",
                                        "geoLocation": "US"
                                    },
                                    "condition": {
                                        "conditionExpression": "Response code is one of \"200\""
                                    },
                                    "order": 2
                                }
                            }
                        ]
                    },
                    {
                        "testCaseId": 217377,
                        "testCaseExecutionId": 210459,
                        "status": "IN_PROGRESS",
                        "testCaseContext": {
                            "testCaseId": 217377,
                            "testRequest": {
                                "testRequestUrl": "https://{{hostname}}/",
                                "testRequestUrlResolved": "https://example.com/",
                                "requestMethod": "POST",
                                "encodeRequestBody": false,
                                "requestHeaders": [
                                    {
                                        "headerName": "Accept",
                                        "headerValue": "v1",
                                        "headerAction": "ADD"
                                    }
                                ]
                            },
                            "clientProfile": {
                                "ipVersion": "IPV4",
                                "client": "CURL",
                                "geoLocation": "US"
                            },
                            "condition": {
                                "conditionExpression": "Response header \"Content-Type\" has a value that ends with \"{{contentTypeValue}}\"",
                                "conditionExpressionResolved": "Response header \"Content-Type\" has a value that ends with \"json\""
                            },
                            "order": 3
                        }
                    }
                ],
                "testSuiteExecutionId": 5398,
                "status": "IN_PROGRESS",
                "testSuiteContext": {
                    "testSuiteId": 77663,
                    "testSuiteName": "test suite recipe",
                    "testSuiteDescription": "example for create test suite with child objects",
                    "isLocked": false,
                    "isStateful": false,
                    "executableTestCaseCount": 4,
                    "variables": [
                        {
                            "variableId": 31938,
                            "variableName": "sampleVarGroup",
                            "variableGroupValue": [
                                {
                                    "columnHeader": "urls",
                                    "columnValues": [
                                        "example.com/123",
                                        "example.com/456"
                                    ]
                                }
                            ]
                        },
                        {
                            "variableId": 31939,
                            "variableName": "hostname",
                            "variableValue": "example.com"
                        },
                        {
                            "variableId": 31940,
                            "variableName": "contentTypeValue",
                            "variableValue": "json"
                        },
                        {
                            "variableId": 31941,
                            "variableName": "successCodes",
                            "variableGroupValue": [
                                {
                                    "columnHeader": "responseCodes",
                                    "columnValues": [
                                        "200",
                                        "200"
                                    ]
                                }
                            ]
                        }
                    ]
                }
            }
        ],
        "status": "IN_PROGRESS",
        "allExecutionObjectsIncluded": false
    }
}
```

# Set up authorization



Before you can use this API, you need to [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials). 

Then, you can use these code samples to apply the token values to your requests.

# Fetch the test suite



Fetch the `testSuiteId` value of the test suite you want to run the test for. Use the [List test suites](https://techdocs.akamai.com/test-ctr/reference/get-test-suites) operation to get this value. The test suite you want to run a test for, needs to include test cases.

# Specify a target environment



Specify the environment against which you want the test run to execute the request, either `PRODUCTION` or `STAGING`.

For `STAGING,` you can also purge the configuration for the test run.

# Provide additional settings



Optionally, add a note about the test run and select whether you want to be notified via email when the test run completes.

# Call the API



Call POST on the request URL, providing the object in the body of the request.

# Review the response



The response returns 202 status and details of the created test run including its `testRunId`. You can use it to [GET](https://techdocs.akamai.com/test-ctr/reference/get-test-run) the test run later and see the results.