Resource: TestCase
Defines the test case for Application Integration. Next available id: 15
JSON representation |
---|
{ "name": string, "displayName": string, "description": string, "triggerId": string, "testInputParameters": [ { object ( |
Fields | |
---|---|
name |
Output only. Auto-generated primary key. |
displayName |
Required. The display name of test case. |
description |
Optional. Description of the test case. |
triggerId |
Required. This defines the trigger ID in workflow which is considered to be executed as starting point of the test case |
testInputParameters[] |
Optional. Parameters that are expected to be passed to the test case when the test case is triggered. This gives the user the ability to provide default values. This should include all the output variables of the trigger as input variables. |
testTaskConfigs[] |
Optional. However, the test case doesn't mock or assert anything without testTaskConfigs. |
databasePersistencePolicy |
Optional. Various policies for how to persist the test execution info including execution info, execution export info, execution metadata index and execution param index.. |
creatorEmail |
Optional. The creator's email address. Generated based on the End User Credentials/LOAS role of the user making the call. |
createTime |
Auto-generated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
lastModifierEmail |
The last modifier's email address. Generated based on the End User Credentials/LOAS role of the user making the call. |
updateTime |
Auto-generated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
lockHolderEmail |
Optional. The edit lock holder's email address. Generated based on the End User Credentials/LOAS role of the user making the call. |
triggerConfig |
Optional. Auto-generated. |
TestTaskConfig
The task mock configuration details and assertions for test cases. Next available id: 6
JSON representation |
---|
{ "taskNumber": string, "mockConfig": { object ( |
Fields | |
---|---|
taskNumber |
Required. This defines in the test case, the task in integration which will be mocked by this test task config |
mockConfig |
Optional. Defines how to mock the given task during test execution |
assertions[] |
Optional. List of conditions or expressions which should be evaluated to true unless there is a bug/problem in the integration. These are evaluated one the task execution is completed as per the mock strategy in test case |
task |
Required. This defines in the test case, the task name in integration which will be mocked by this test task config |
taskConfig |
Optional. Auto-generated. |
MockConfig
The configuration for mocking of a task during test execution Next available id: 4
JSON representation |
---|
{ "mockStrategy": enum ( |
Fields | |
---|---|
mockStrategy |
Mockstrategy defines how the particular task should be mocked during test execution |
parameters[] |
Optional. List of key-value pairs for specific mock strategy |
failedExecutions |
Optional. Number of times the given task should fail for failure mock strategy |
MockStrategy
Possible values for mock strategy
Enums | |
---|---|
MOCK_STRATEGY_UNSPECIFIED |
This should never be used to annotate a field |
NO_MOCK_STRATEGY |
Execute actual task |
SPECIFIC_MOCK_STRATEGY |
Don't execute actual task, instead use the values specified by user for output of the task |
FAILURE_MOCK_STRATEGY |
Don't execute actual task, instead return task failure |
SKIP_MOCK_STRATEGY |
Don't execute actual task, instead mark it as successful |
Assertion
An assertion which will check for a condition over task execution status or an expression for task output variables Next available id: 5
JSON representation |
---|
{ "assertionStrategy": enum ( |
Fields | |
---|---|
assertionStrategy |
The type of assertion to perform. |
Union field
|
|
parameter |
Optional. Key-value pair for ASSERT_EQUALS, ASSERT_NOT_EQUALS, ASSERT_CONTAINS to succeed |
condition |
Optional. Standard filter expression for ASSERT_CONDITION to succeed |
retryCount |
Number of times given task should be retried in case of ASSERT_FAILED_EXECUTION |
AssertionStrategy
Enum for possible Assertion strategies.
Enums | |
---|---|
ASSERTION_STRATEGY_UNSPECIFIED |
Unspecified Assertion strategy |
ASSERT_SUCCESSFUL_EXECUTION |
Test a successful execution |
ASSERT_FAILED_EXECUTION |
Test a failed execution |
ASSERT_NO_EXECUTION |
Test that the task was never executed |
ASSERT_EQUALS |
Test the parameter selected is equal to the expected value |
ASSERT_NOT_EQUALS |
Test the parameter selected is not equal to the expected value |
ASSERT_CONTAINS |
Test the parameter selected contains the configured value |
ASSERT_CONDITION |
Test a specific condition |
Methods |
|
---|---|
|
Creates a new test case |
|
Deletes a test case |
|
Downloads a test case. |
|
Executes a test case |
|
Get a test case |
|
Lists all the test cases that satisfy the filters. |
|
Lists the results of all test case executions. |
|
Updates a test case |
|
Clear the lock fields and assign them to current user |
|
Uploads a test case. |