The example shows how to construct a condition request for the Response code is one of "201,403". To better understand the process, read descriptions of Concepts and Test catalog template in the Test Center concepts section.
To create a valid condition statement:
- Run the Get the test catalog template operation to get the template for creating conditions. It contains the
conditionTypesarray with 18conditionType:RESPONSE_CODERESPONSE_HEADERCACHE_KEY_QUERY_PARAMETERSCACHINGCONTENT_PROVIDER_CODEIGNORE_CASE_IN_CACHE_KEYLAST_MILE_ACCELERATION_(GZIP_COMPRESSION)LOG_REQUEST_DETAILSORIGIN_SERVERPREFETCH_OBJECTSREDIRECTSURE_ROUTETIERED_DISTRIBUTIONVARIABLEALERTED_RULESDENIED_RULEPOLICY_NAMEAPI_ID.
To learn more about these condition types, check the list of available conditions. Each of these conditionType relates to the specific conditionExpressions array and placeHolders.
- Go to the
conditionTypeof your choice. Here, it's theRESPONSE_CODE.
{
"conditionTypes":[
{
"conditionType":"RESPONSE_CODE",
"conditionExpressions":[
{
"conditionExpressionId":1,
"conditionExpression":"Response code is one of \"responseCodes\"",
"examples":[
"Response code is one of \"401, 403, 404, 500, 501, 502\"",
"Response code is one of \"200\""
]
}
],
"placeHolders":[
{
"placeHolder":"responseCodes",
"valueInputType":"MULTIPLE_VALUE",
"valueDataType":"INTEGER",
"supportsCustomValue":true,
"valueSeparator":",",
"availableValues":[
200,
300,
400,
500
]
}
]
}
]
}
- In the
conditionExpressionsarray, inconditionExpression, check the structure of supported condition statement. In this case, it's"Response code is one of \"responseCodes\".Some statements require your input, the required values are in"". Here, you need to provideresponseCodes. - Check the
placeHoldersarray to learn about values supported forresponseCodes. In this example, we see that this input supports multiple values and they need to be integers. - Check
examplesto make sure you statement is correct.
