Create test cases
Preview — Test cases
This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.
This document describes how to create test cases for your integrations. For information about test cases, supported test configurations, and its limitations, seeIntroduction to test cases.
Before you begin
To get the permission that you need to create test cases, ask your administrator to grant you theApplication Integration Editor (
roles/integrations.integrationEditor) IAM role on your project. For more information about granting roles, seeManage access to projects, folders, and organizations.This predefined role contains the
integrations.googleapis.com/testCases.createpermission, which is required to create test cases.You might also be able to get this permission withcustom roles or otherpredefined roles.
- Ensure that your integration is in the
DRAFTstate. If your integration is in thePUBLISHEDstate, clickEnable Editing. A new version in theDRAFTstate is created in the integration for you. The following figure shows the edit lock in the integration editor.

Create a test case
To create a test case, select one of the following options:Console
- In the Google Cloud console, go to theApplication Integration page.
- In the navigation menu, clickIntegrations.
TheIntegrations 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 theintegration editor.
- ClickTest Case and then click+ Create a new test case. TheCreate test case pane appears:


Then, do the following:
- From theTrigger list, select a trigger.
- In theTest name field, enter a name for your test.
- Optionally, in theDescription field, enter a description for your test.
- ClickCreate.
In the Integration editor page, the designer canvas displaysTest case mode is active.
- Configure the test configuration for yourtrigger andtasks.
API
Call theprojects.locations.integrations.versions.testCases.create method and provide any relevant parameters. For example:
POST https://integrations.googleapis.com/v1/{parent=projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/versions/INTEGRATION_VERSION}/testCasesReplace 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
The request body contains theTestCase resource. For example:
{ "displayName": "example-test-case", "triggerId": "api_trigger/example-trigger", "testTaskConfigs": [{ "taskNumber": "1", "mockConfig": { "mockStrategy": "NO_MOCK_STRATEGY" }, "task": "FieldMappingTask" }],}Configure test configurations
After creating a test case, you canconfigure test configurations for your triggers and tasks.
What's next
- Learn abouttest cases.
Learn how to do the following:
- Configure test cases.
- Copy anddelete test cases.
- Run a test case andview test case execution logs.
- Upload and download test cases.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.