Links

AddTestcaseToTestsuite

This method can be used for the following activity: Add a test case to a test suite;

Parameters

The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as mandatory.

Headers

POST /api/ss/testsuite/:id/testcase HTTP/1.1
Host: localhost:3000
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close

Query

id (string)
Id of the testsuite.
Example:
POST /api/ss/testsuite/5eac95f1e594ea09107e9bb5/testcase HTTP/1.1
testcase (string)
Details for the test case.
Example:
{
"testcase": "..."
}
code (string) (optional)
Code for the test case.
Example:
{
"code": "..."
}
sort_order (number) (optional)
Sort Order to apply to the test case.
Example:
{
"sort_order": 1
}
tags (array of strings)
Tags for the test case.
Example:
{
"tags": ["...", "..."]
}

Example

The following example is a cURL request to add a test case on a testsuite.

Request

Include API Token instead of stars in 'X-SSAPI-KEY: ***************************************' parameter.
curl -X POST 'https://localhost:3000/api/ss/testsuite/5eac95f1e594ea09107e9bb5/testcase' -H 'Host: localhost:3000' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
"testcase": "Verify X, Y and Z",
"code": "WEBAPP-001",
"sort_order": 1,
"tags": ["01", "Web App"]
}'

Response

Response contains a status.
{
"status": "Added Testcase to Testsuite",
"testcase": {
"id": "...",
"created": "...",
"testcase": "...",
"code": "...",
"sort_order": 1,
"tags": [
"..."
]
}
}