AttackForge Enterprise & AttackForge Core
Powered By GitBook
AddTestcaseToTestsuite
This method can be used for the following activity: Add a testcase to a testsuite;

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

1
POST /api/ss/testsuite/:id/testcase HTTP/1.1
2
Host: demo.attackforge.com
3
X-SSAPI-KEY: APIKey
4
Content-Type: application/json
5
Connection: close
Copied!

Query

id (string)
Id of the testsuite.
Example:
1
POST /api/ss/testsuite/5eac95f1e594ea09107e9bb5/testcase HTTP/1.1
Copied!
testcase (string)
Details for the testcase.
Example:
1
{
2
"testcase": "..."
3
}
Copied!
tags (array of strings)
Tags for the testcase.
Example:
1
{
2
"tags": ["...", "..."]
3
}
Copied!

Example

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

Request

Include API Token instead of stars in 'X-SSAPI-KEY: ***************************************' parameter.
1
curl -X POST 'https://demo.attackforge.com/api/ss/testsuite/5eac95f1e594ea09107e9bb5/testcase' -H 'Host: demo.attackforge.com' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
2
"testcase": "Verify X, Y and Z",
3
"tags": ["01", "Web App"]
4
}'
Copied!

Response

Response contains a status.
1
{
2
"status": "Added Testcase to Testsuite"
3
}
Copied!
Last modified 1yr ago