Test Suite
Use the test suite to define test cases, test scenarios, and assertions to validate the behavior of Trust Framework and policy entities.
Building a library of test cases supports a test-driven approach to policy and Trust Framework development. This library can serve as a suite of regression checks, ensuring consistent behavior with each new version of your policies or Trust Framework.
Test scenarios include the subject, resources, actions, and attributes relevant to a decision, as well as optional overrides for attribute and service values. Test cases build on test scenarios by:
-
specifying which policy, rule, or Trust Framework definition to test, and
-
adding optional assertions to validate the decision result.
After you define a test scenario, you can reference that scenario by ID in your test cases.
For more information about each test suite entity type, refer to Test Suite in the PingAuthorize Policy Administration Guide.
The test suite endpoint provides operations for creating, reading, updating, and deleting test suite entities. Each operation requires either a branch ID or a statement ID in the request URL.
Test suite data model
Test case data model
| Property | Type | Required | Mutable | Description |
|---|---|---|---|---|
|
UUID |
N/A |
Read-only |
Specifies the ID of the test case. |
|
UUID |
N/A |
Read-only |
Specifies the version ID of the test scenario. |
|
String |
Required |
Mutable |
Specifies the unique name of the test case. |
|
String |
Optional |
Mutable |
Provides a description for the test case. |
|
UUID |
Optional |
Mutable |
Specifies the ID of the test case parent. |
|
String |
N/A |
Mutable |
Specifies the type of the entity being created or updated. Always set to |
|
JSON[] |
Optional |
Mutable |
Provides a collection of permissions as |
|
Boolean |
Optional |
Mutable |
Specifies whether the test case inherits permissions from its parent or not. |
|
Optional |
Mutable |
Provides a collection of entities to include in the test case. |
|
|
Optional |
Mutable |
Specifies an assertion object to include with the test case. |
|
|
String |
Optional |
Mutable |
Specifies the ID of a test scenario to reference in the test case. |
|
String |
Optional |
Mutable |
Specifies the ID of a domain to include in the test request. |
|
String |
Optional |
Mutable |
Specifies the ID of a service to include in the test request. |
|
String |
Optional |
Mutable |
Specifies the ID of an identity provider to include in the test request. |
|
String |
Optional |
Mutable |
Specifies the ID of an action to include in the test request. |
|
JSON |
Optional |
Mutable |
Specifies how to override attribute values with a list of key-value pairs. For example, |
|
JSON |
Optional |
Mutable |
Specifies how to override service values with a list of key-value pairs. For example, |
Test scenario data model
| Property | Type | Required | Mutable | Description |
|---|---|---|---|---|
|
UUID |
N/A |
Read-only |
Specifies the ID of the test scenario. |
|
UUID |
N/A |
Read-only |
Specifies the version ID of the test scenario. |
|
String |
Required |
Mutable |
Specifies the unique name of the test scenario. |
|
String |
Optional |
Mutable |
Provides a description for the test scenario. |
|
UUID |
Optional |
Mutable |
Specifies the ID of the test scenario parent. |
|
String |
N/A |
Mutable |
Specifies the type of the entity being created or updated. Always set to |
|
JSON[] |
Optional |
Mutable |
Provides a collection of permissions as |
|
Boolean |
Optional |
Mutable |
Specifies whether the test scenario inherits permissions from its parent or not. |
|
String |
Optional |
Mutable |
Specifies the ID of a domain to include in the test request. |
|
String |
Optional |
Mutable |
Specifies the ID of the service to include in the test request. |
|
String |
Optional |
Mutable |
Specifies the ID of the identity provider to include in the test request. |
|
String |
Optional |
Mutable |
Specifies the ID of the action to include in the test request. |
|
JSON |
Optional |
Mutable |
Specifies how to override attribute values with a list of key-value pairs. For example, {"3577dd53-a71a-4ce8-ab40-c9c083c7c5b9": "override-value"}. |
|
JSON |
Optional |
Mutable |
Specifies how to override service values with a list of key-value pairs. For example, {"3553dd53-a71a-4ce8-fb40-c9c083c7c5g9": "override-value"}. |
Test entity data model
| Property | Type | Required | Mutable | Description |
|---|---|---|---|---|
|
UUID |
N/A |
Read-only |
Specifies the unique ID of the entity to include in the test case. |
|
String |
Required |
Immutable |
Specifies the type of the entity to include in the test case. For example, |
|
Optional |
Mutable |
Provides a collection of assertions to include in the test case. |
Assertion data model
| Property | Type | Required | Mutable | Description |
|---|---|---|---|---|
|
UUID |
N/A |
Read-only |
Specifies the ID of the assertion. |
|
UUID |
N/A |
Read-only |
Specifies the version ID of the assertion. |
|
UUID |
Optional |
Mutable |
Specifies the ID of a parent for the assertion. |
|
String |
Required |
Mutable |
Specifies the unique name of the assertion. |
|
String |
Optional |
Mutable |
Provides a description for the assertion. |
|
String |
N/A |
Mutable |
Specifies the type of the entity being created or updated. Always set to |
|
Boolean |
Optional |
Mutable |
Determines whether the assertion inherits permissions from its parent. |
|
JSON[] |
Optional |
Mutable |
Provides a collection of permissions as |
|
String |
Required |
Mutable |
Specifies the assertion type. For example, |
|
String |
Required |
Mutable |
Specifies a JSONPath accessor to extract information from the response. |
|
String |
Optional |
Mutable |
Specifies a comparison to perform between the extracted value and the expected value. Defaults to |
|
String |
Required |
Mutable |
Specifies the type of the expected value. For example, |
|
String |
Required |
Mutable |
Specifies the expected value. |