Create test cases
post
https://{your_site_interface}/opa-hub/api/12.2.35/tests/{test-suite-name}/testcases
This operation will create test cases.
Request
Path Parameters
-
test-suite-name(required): string
The name of the test suite to be retrieved.
Supported Media Types
- application/json
Nested Schema : testCasePost
Type:
Show Source
object
-
description: string
The description of the test case, sufficient to distinguish it from other test cases in this test suite.
-
enabled: boolean
Default Value:
true
Determines whether the test case has been activated within the test case with which it is associated. -
expectedOutput: object
testCaseExpectedOutputPost
Additional Properties Allowed:
true
-
input: object
testCaseInputPost
Additional Properties Allowed:
true
-
name(required): string
The name of the test case, unique to the test suite.
-
tags(required): array
tags
A set of all the tags declared by this test case.
Nested Schema : testCaseExpectedOutputPost
Type:
object
Additional Properties Allowed:
true
Nested Schema : testCaseInputPost
Type:
object
Additional Properties Allowed:
true
Security
-
Authorization: apiKey
Type:
apiKey
Description:Obtain a bearer token from https://{your_site_interface}/opa-hub/api/12.2.17/auth and use it in the Authorization header as: Bearer {token}.
-
oauth2_opa: oauth2
Type:
oauth2
Description:POST the OAuth2 Client Credentials parameters to https://{your_site_interface}/opa-hub/api/12.2.17/auth and use the access token from the response in the Authorization header.
Response
Supported Media Types
- application/json
201 Response
The request has been fulfilled and resulted in a new resource being created.
Nested Schema : testCase
Type:
Show Source
object
-
description: string
The description of the test case, sufficient to distinguish it from other test cases in this test suite.
-
enabled: boolean
Default Value:
true
Determines whether the test case has been activated within the test case with which it is associated. -
expectedOutput: object
testCaseExpectedOutput
Additional Properties Allowed:
true
-
input: object
testCaseInput
Additional Properties Allowed:
true
-
name(required): string
The name of the test case, unique to the test suite.
-
tags(required): array
tags
A set of all the tags declared by this test case.
Nested Schema : testCaseExpectedOutput
Type:
object
Additional Properties Allowed:
true
Nested Schema : testCaseInput
Type:
object
Additional Properties Allowed:
true
400 Response
The request could not be processed because it contains missing or invalid information.