See the supported connectors for Application Integration.
Manage test cases
This document describes how to manage test cases for your integrations. You can manage your test cases in the following ways:
For information about test cases, supported test configurations, and its limitations, see Introduction to test cases.Before you begin
-
To get the permissions that you need to manage test cases, ask your administrator to grant you the Application Integration Editor (
roles/integrations.integrationEditor
) IAM role on project. For more information about granting roles, see Manage access to projects, folders, and organizations.This predefined role contains the permissions required to manage test cases. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to manage test cases:
-
List test cases:
integrations.googleapis.com/testCases.get
-
Copy a test case:
-
integrations.googleapis.com/testCases.get
-
integrations.googleapis.com/testCases.create
-
-
Delete a test case:
integrations.googleapis.com/testCases.delete
You might also be able to get these permissions with custom roles or other predefined roles.
-
List test cases:
- Ensure that your integration is in the
DRAFT
state. If your integration is in thePUBLISHED
state, click Enable Editing. A new version in theDRAFT
state is created in the integration for you. The following figure shows the edit lock in the integration editor. - Ensure that you have a test case in the integration. For information about how to create a test case, see Create Test Cases.
Test Case edit locks
In Application Integration, test cases are design-time entities that are often developed in collaboration with multiple authors. Although a test case can only be actively edited by one author at a time, teams can collaborate on a test case.
If you open the test case that is being edited by another user, the following message appears in the integration editor because only one user can update the test case at a given time:
test-user@gmail.com is currently editing the test case. Edit features are temporarily disabled.
To edit the test case, click Take Over. The following figure shows the edit lock.
List test cases
To list test cases, select one of the following options:
Console
- In the Google Cloud console, go to the Application Integration page.
- In the navigation menu, click Integrations.
The Integrations page appears listing all the integrations available in the Google Cloud project.
- Select an existing integration that contains test cases.
This opens the integration in the integration editor.
- Click Test Case and then click Open test cases. The Test Cases pane appears with a list of test cases for the current integration version.
API
Call the projects.locations.integrations.versions.testCases.list
method and provide any relevant parameters. For example:
GET https://integrations.googleapis.com/v1/{parent=projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/versions/INTEGRATION_VERSION}/testCases
Replace the following:
PROJECT_ID
: the ID of the Google Cloud projectLOCATION
: the region where the integration is locatedINTEGRATION_NAME
: the name of the integrationINTEGRATION_VERSION
: the version of the integration
Edit a test case
To edit a test case, follow these steps:
- In the Google Cloud console, go to the Application Integration page.
- In the navigation menu, click Integrations.
The Integrations page appears listing all the integrations available in the Google Cloud project.
- Select an existing integration that contains test cases.
This opens the integration in the integration editor.
- Click Test Case and then click Open test cases. The Test Cases pane appears with a list of test cases for the current integration version.
- Select the test case that you want to edit.
In the Integration editor page, the designer canvas displays Test case mode is active.
If a task in the integration is deleted, the test case becomes invalid as shown in the following image:
- If a task in the integration is deleted, click Delete to update the test case.
- Update the configuration details of the test case and run the test case.
Copy a test case
To create a copy a test case in the same integration, select one of the following options:
Console
- In the Google Cloud console, go to the Application Integration page.
- In the navigation menu, click Integrations.
The Integrations page appears listing all the integrations available in the Google Cloud project.
- Select an existing integration that contains test cases.
This opens the integration in the integration editor.
- Click Test Case and then click Open test cases. The Test Cases pane appears with a list of test cases for the current integration version.
- Select the test case that you want to copy.
In the Integration editor page, the designer canvas displays Test case mode is active.
- Click
- In the Test name field, enter the name of the test case.
- Optionally, in the Description field, enter a description of the test case.
- Click Create. The test case is created in the same integration.
Duplicate. The Duplicate the test case page appears. Then, do the following:
API
Follow these steps:
- Call the
projects.locations.integrations.versions.testCases.get
method and provide any relevant parameters. For example:GET https://integrations.googleapis.com/v1/{parent=projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/versions/INTEGRATION_VERSION}/testCases/TEST_CASE_ID
Replace the following:
PROJECT_ID
: the ID of the Google Cloud projectLOCATION
: the region where the integration is locatedINTEGRATION_NAME
: the name of the integrationINTEGRATION_VERSION
: the version of the integrationTEST_CASE_ID
: the ID of the test case
- Call the
projects.locations.integrations.versions.testCases.create
method and provide the text proto that you copied in the preceding step.For example:
POST https://integrations.googleapis.com/v1/{parent=projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/versions/INTEGRATION_VERSION}/testCases
In the output response, copy the text proto of the test case.
Delete a test case
To delete a test case, select one of the following options:
Console
- In the Google Cloud console, go to the Application Integration page.
- In the navigation menu, click Integrations.
The Integrations page appears listing all the integrations available in the Google Cloud project.
- Select an existing integration for which you want to create a test.
This opens the integration in the integration editor.
- Click Test Case and then click Open test cases. The Test Cases pane appears with a list of test cases for the current integration version.
- Select the test case that you want to delete.
In the Integration editor page, the designer canvas displays Test case mode is active.
- Click Delete.
API
Call the projects.locations.integrations.versions.testCases.delete
method. For example:
DELETE https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/versions/INTEGRATION_VERSION/testCases/TEST_CASE_ID
Replace the following:
PROJECT_ID
: the ID of the Google Cloud projectLOCATION
: the region where the integration is locatedINTEGRATION_NAME
: the name of the integrationINTEGRATION_VERSION
: the version of the integrationTEST_CASE_ID
: the ID of the test case that you want delete
What's next
- Learn about test cases.
Learn how to do the following:
- Create test cases.
- Configure test cases.
- Run a test case and view test case execution logs.
- Upload and download test cases.