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.create permission, 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 theDRAFT state. If your integration is in thePUBLISHED state, clickEnable 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.

    Integrations edit lockIntegrations edit lock

Create a test case

To create a test case, select one of the following options:

Console

  1. In the Google Cloud console, go to theApplication Integration page.

    Go to Application Integration

  2. In the navigation menu, clickIntegrations.

    TheIntegrations page appears listing all the integrations available in the Google Cloud project.

  3. Select an existing integration for which you want to create a test.

    This opens the integration in theintegration editor.

  4. ClickTest Case and then click+ Create a new test case. TheCreate test case pane appears:

    image showing the Create  test case paneiimage showing the Create test case pane

    Then, do the following:

    1. From theTrigger list, select a trigger.
    2. In theTest name field, enter a name for your test.
    3. Optionally, in theDescription field, enter a description for your test.
    4. ClickCreate.

      In the Integration editor page, the designer canvas displaysTest case mode is active.

  5. 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}/testCases

Replace the following:

  • PROJECT_ID: the ID of the Google Cloud project
  • LOCATION: the region where the integration is located
  • INTEGRATION_NAME: the name of the integration
  • INTEGRATION_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"    }],}
Note: You cannot edit your integration when the Test Case mode is enabled.

Configure test configurations

After creating a test case, you canconfigure test configurations for your triggers and tasks.

What's next

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.