Create test suites
post
https://{your_site_interface}/opa-hub/api/12.2.35/tests
This operation will create test suites.
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
Nested Schema : testSuitePost
Type:
Show Source
object
-
deployments: array
deployments
An array of deployment names associated with this test suite. The deployments must be in the same workspace as the test suite.
-
description: string
The description of the test suite, sufficient to distinguish it from other test suites.
-
name(required): string
The name of the test suite.
-
projects: array
projects
An array of project names associated with this test suite. The projects must be in the same workspace as the test suite.
-
testcases: object
testCasesPost
-
testType(required): string
Allowed Values:
[ "batchAssess", "decisionService" ]
The type of tests contained by this test suite. One of "batchAssess" or "decisionService". -
workspace(required): string
The workspace for this test suite and all of its testcases. Test suites may only be associated with deployments or projects within the same workspace.
Nested Schema : deployments
Type:
array
An array of deployment names associated with this test suite. The deployments must be in the same workspace as the test suite.
Show Source
Nested Schema : projects
Type:
array
An array of project names associated with this test suite. The projects must be in the same workspace as the test suite.
Show Source
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 : testSuite
Type:
Show Source
object
-
deployments: array
deployments
An array of deployment names associated with this test suite. The deployments must be in the same workspace as the test suite.
-
description: string
The description of the test suite, sufficient to distinguish it from other test suites.
-
name(required): string
The name of the test suite.
-
projects: array
projects
An array of project names associated with this test suite. The projects must be in the same workspace as the test suite.
-
runs: object
testRuns
-
tagSummary: object
testSuiteTagSummary
Additional Properties Allowed:
true
-
testcases: object
testCases
-
testSummary: object
testSuiteTestSummary
-
testType(required): string
Allowed Values:
[ "batchAssess", "decisionService" ]
The type of tests contained by this test suite. One of "batchAssess" or "decisionService". -
workspace: string
The workspace for this test suite and all of its testcases. Test suites may only be associated with deployments or projects within the same workspace.
Nested Schema : deployments
Type:
array
An array of deployment names associated with this test suite. The deployments must be in the same workspace as the test suite.
Show Source
Nested Schema : projects
Type:
array
An array of project names associated with this test suite. The projects must be in the same workspace as the test suite.
Show Source
Nested Schema : testSuiteTagSummary
Type:
object
Additional Properties Allowed:
true
Nested Schema : testSuiteTestSummary
Type:
Show Source
object
-
testsActive: number
(double)
Read Only:
true
The number of tests that are marked as active in the test suite. -
testsTotal: number
(double)
Read Only:
true
The total number of tests in the test suite.
Nested Schema : testRun
Type:
Show Source
object
-
deployments: object
testRunDeployments
-
projects: object
testRunProjects
-
runNumber: number
(double)
Read Only:
true
The identity number of the test run. -
status: string
The status of this test run.
-
summary: object
testRunSummary
-
type: string
The type of this test run.
Nested Schema : testRunSummary
Type:
Show Source
object
-
error: number
(double)
The number of tests that encountered and error for the test run.
-
failed: number
(double)
The number of tests that have failed for the test run.
-
passed: number
(double)
The number of tests that have passed for the test run.
-
pending: number
(double)
The number of tests that are pending for the test run.
-
total: number
(double)
The total number of tests for the test run.
Nested Schema : testRunDeployment
Type:
Show Source
object
-
name: string
Read Only:
true
The name of the tested deployment. -
results: object
testRunDeploymentResults
-
summary: object
testRunDeploymentSummary
-
version: number
(double)
Read Only:
true
The version of the tested deployment.
Nested Schema : testRunDeploymentSummary
Type:
Show Source
object
-
error: number
(double)
The number of tests that encountered and error for the tested deployment.
-
failed: number
(double)
The number of tests that have failed for the tested deployment.
-
passed: number
(double)
The number of tests that have passed for the tested deployment.
-
pending: number
(double)
The number of tests that are pending for the tested deployment.
-
total: number
(double)
The total number of tests for the tested deployment.
Nested Schema : testCaseResult
Type:
Show Source
object
-
actualOutput: object
testCaseResultActualOutput
Additional Properties Allowed:
true
-
expectedOutput: object
testCaseResultExpectedOutput
Additional Properties Allowed:
true
-
input: object
testCaseResultInput
Additional Properties Allowed:
true
-
name: string
Read Only:
true
The name of the test case result. -
outcome: object
testCaseResultOutcome
Additional Properties Allowed:
true
-
status: string
Read Only:
true
The status of the test case result.
Nested Schema : testCaseResultActualOutput
Type:
object
Additional Properties Allowed:
true
Nested Schema : testCaseResultExpectedOutput
Type:
object
Additional Properties Allowed:
true
Nested Schema : testCaseResultInput
Type:
object
Additional Properties Allowed:
true
Nested Schema : testCaseResultOutcome
Type:
object
Additional Properties Allowed:
true
Nested Schema : testRunProject
Type:
Show Source
object
-
name: string
Read Only:
true
The name of the tested project. -
results: object
testRunProjectResults
-
summary: object
testRunProjectSummary
-
version: number
(double)
Read Only:
true
The version of the tested project.
Nested Schema : testRunProjectSummary
Type:
Show Source
object
-
error: number
(double)
The number of tests that encountered and error for the tested project.
-
failed: number
(double)
The number of tests that have failed for the tested project.
-
passed: number
(double)
The number of tests that have passed for the tested project.
-
pending: number
(double)
The number of tests that are pending for the tested project.
-
total: number
(double)
The total number of tests for the tested project.
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.