Test case
Synopsis
Add test cases to a test suite.
Syntax
New-TestCase -TestSuiteID <Int32> -RequestMethod <String> -TestRequestURL <String> -ConditionExpression <String> -Client <String> -IPVersion <String> [-GeoLocation <String>] [-RequestBody <String>] [-EncodeRequestBody] [-RequestHeaders <Hashtable[]>] [-Variables <String[]>] [-Tags <String[]>] [-IncludeStatus] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]New-TestCase -TestSuiteID <Int32> -Body <Object> [-IncludeStatus] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Adds a list of new functional test cases to a test suite.
Each test case consists of a test request, client profile, and condition.
If you want to use variables within a condition or test request's URL or request header, run the New-TestVariable operation first.
Parameters
‑AccountSwitchKey |
An account credential key that lets you move between accounts when using an API client enabled for multiple accounts. To find account switch keys, use Get-AccountSwitchKey. |
‑BodyConditionally required |
A request body, either as a |
‑ClientConditionally required |
Client type you want to use for the test run, either CHROME or CURL. |
‑ConditionExpressionConditionally required |
Condition expression you want to evaluate in the test run. To create the expression, you need to Get the test catalog template. |
‑EdgeRCFile |
Your EdgeGrid resource file to authenticate your command. Defaults to |
‑EncodeRequestBody |
Encodes requestBody. It applies only if clientType is set to CURL and requestMethod to POST, true by default. |
‑GeoLocation |
Location type you want to use for the test run. The only currently supported value is US. |
‑IPVersionConditionally required |
IP version to use in the test run, either IPV4 or IPV6. |
‑IncludeStatus |
When enabled, return response metadata as well as the usual 'successes' object. |
‑RequestBody |
Request body for the testRequestUrl. Provide it only if clientType is set to CURL and requestMethod is POST. |
‑RequestHeaders |
One or more hashtables with the following members: headerAction - should always be 'ADD', headerName - the name of the header to add, headerValue - the value of the header to add. For example |
‑RequestMethodConditionally required |
Request method for the testRequestUrl. The available values are: HEAD, GET, and POST. |
‑Section |
The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to |
‑Tags |
Lists keywords for the test request. They're useful to filter test cases in the Test Center application. |
‑TestRequestURLConditionally required |
Fully qualified URL of the page or object you want to test. The URL needs to include a protocol, a hostname, a path, and any optional query parameters. Test Center requests this URL from a browser, as well as any requests triggered by it. |
‑TestSuiteIDRequired |
Your test suite's ID. |
‑Variables |
Variable used in |
Related Links
Updated 28 days ago
