UpdateTestcaseOnTestsuite

This method can be used for the following functionality: Update a test case on 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

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

Query

testsuite_id (string)

Id of the test suite.

Example:

PUT /api/ss/testsuite/5eac95f1e594ea09107e9bb5/testcase/:testcase_id HTTP/1.1

testcase_id (string)

Id of the test case.

Example:

PUT /api/ss/testsuite/:testsuite_id/testcase/5eac9db9e9f15a0989bb3422 HTTP/1.1

testcase (string) (optional)

Details for the test case.

Example:

{   
    "testcase": "..."
}

details (string)

Details for the test case. Supports rich-text.

Example:

{   
    "details": "<p>...</p>"
}

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) (optional)

Tags for the test case.

Example:

{   
    "tags": ["...", "..."]
}

is_deleted (boolean) (optional)

Whether test case is deleted or not.

Example:

{   
    "is_deleted": false
}

execution_flow (array of objects) (optional)

Execution flows for the test case.

Example:

{   
    "execution_flow": [
        {
            "title": "...",
            "details": "...",
            "details_type": "PLAINTEXT/RICHTEXT"
        }
    ]
}

custom_fields (array of objects) (optional)

Custom fields. Must include a key and value. Key must be unique and letters, number and underscores only.

For more information visit https://support.attackforge.com/attackforge-enterprise/getting-started/custom-fields-and-forms#using-custom-fields-with-apis

Example:

{   
    "custom_fields": [{"key": "...", "value": "..."}]
}

Example

The following example is a cURL request to update a test case on a test suite.

Request

Include API Token instead of stars in 'X-SSAPI-KEY: ***************************************' parameter.

curl -X PUT 'https://localhost:3000/api/ss/testsuite/5eac95f1e594ea09107e9bb5/testcase/5eac9db9e9f15a0989bb3422' -H 'Host: localhost:3000' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
  "testcase": "Verify A, B and C",
  "code": "WEBAPP-001",
  "sort_order": 1,
  "tags": ["02", "Web App"],
  "is_deleted": false
}'

Response

Response contains a status.

{   
    "status": "Testcase Updated"
}

Last updated

Check YouTube for more tutorials: https://youtube.com/@attackforge