Application Integration을 사용하면 Google Cloud 서비스 및 기타 비즈니스 애플리케이션을 연결하고 관리하는 복잡한 통합에 대해 여러 테스트 사례를 만들고 실행할 수 있습니다. 통합 흐름을 테스트하면 통합이 의도한 대로 작동하는지 확인할 수 있습니다. 여러 입력 변수를 사용하여 통합을 테스트하면 통합 흐름의 오류를 식별할 수 있습니다. 테스트 사례를 만드는 방법에 대한 자세한 내용은 테스트 사례 만들기를 참조하세요.
테스트 구성
Application Integration을 사용하면 통합에 여러 테스트 사례를 추가할 수 있습니다. 트리거의 경우 테스트 사례에서 입력 값을 구성할 수 있습니다. 태스크의 경우 다음과 같은 테스트 구성을 업데이트할 수 있습니다.
모의 전략 유형: 태크스에 설정할 수 있는 세 가지 옵션이 있습니다.
모의 없음: 이 전략을 사용하면 태스크를 실행할 수 있습니다.
모의 실행: 이 전략을 사용하면 태스크 실행을 성공 또는 실패로 모의 처리할 수 있습니다.
모의 출력: 이 전략을 사용하면 태스크의 출력을 모의 처리할 수 있습니다.
어설션 유형: 테스트에서 선택한 태스크에 여러 어설션을 추가할 수 있습니다. 다음과 같이 다양한 어설션 유형을 사용할 수 있습니다.
실행 어설션: 이 어설션 유형을 사용하면 태스크가 성공적으로 실행되었는지, 실패했는지 또는 실행되지 않았는지 확인할 수 있습니다.
매개변수 어설션: 이 어설션 유형을 사용하면 어설션할 매개변수를 선택하고 비교할 값을 제공할 수 있습니다.
어설션 조건: 이 어설션 유형을 사용하면 태스크 실행 조건을 추가할 수 있습니다. 자세한 내용은 어설션 조건을 참조하세요.
어설션 조건
태스크의 테스트 구성에서 태스크 실행에 충족되어야 하는 조건을 추가할 수 있습니다. 태스크는 지정된 조건이 충족되는 경우에만 실행됩니다.
지원되는 연산자
다음 표에서는 어설션된 조건에서 사용할 수 있는 지원되는 연산자를 설명합니다.
연산자
설명
예시
=
두 값 간의 균등성 확인
$var$ = "value"
!=
두 값 사이의 불일치 검사
$var$ != "value"
<
값이 다른 값보다 작은지 확인
5 < 10
<=
값이 다른 값보다 작거나 같은지 확인
$var$ <= 5
>
값이 다른 값보다 큰지 확인
1 > 0
>=
값이 다른 값보다 크거나 같은지 확인
$var$ >= 0
:
문자열에 하위 문자열이 포함되었는지 확인하거나 목록에 특정 원시 값이 포함되었는지 확인합니다.
$longString$ : "substring"
$list of values$ : "value"
AND
두 표현식을 확인하여 두 표현식 모두 true이면 true를 반환합니다.
$a$ > $b$ AND $b$ < $c$
또는
두 표현식을 확인하여 표현식 중 하나라도 true이면 true를 반환합니다.
$a$ > $b$ OR $b$ < $c$
NOT
부정 연산자. 표현식의 결과를 부정합니다.
NOT($var$ = "value")
지원되는 함수
다음 표에서는 어설션된 조건에서 사용할 수 있는 지원되는 함수를 설명합니다.
기능
설명
exists(VARIABLE)
특정 변수가 존재하는지 확인
does_not_exist(VARIABLE)
특정 변수가 존재하지 않는지 확인
is_empty(VARIABLE)
지정된 변수가 목록이며 비어 있는지 확인합니다. JSON 배열을 제외한 배열 변수 유형을 지원합니다.
is_not_empty(VARIABLE)
지정된 변수가 목록인지, 비어 있지 않은지 확인합니다. JSON 배열을 제외한 배열 변수 유형을 지원합니다.
권장사항
다음 섹션에는 조건을 지정할 때의 권장사항이 나와 있습니다.
변수 값을 참조하려면 변수 이름 앞 뒤에 달러 기호 표시($)를 사용합니다.
예를 들어 productId 변수가 10보다 큰지 확인하려는 경우의 구문은 $productId$ > 10입니다.
달러 기호 표시가 없는 텍스트는 리터럴 값으로 해석됩니다. 예를 들어 텍스트 customerId는 리터럴 값으로 해석됩니다.
여러 조건을 확인하려면 조건을 개별 검사 항목으로 분할하고 AND 또는 OR을 사용하여 결합합니다. 예를 들어 $productId$ > 5 AND < 9 를 사용하는 대신 $productId$ > 5 AND $productId$ < 9를 사용합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eApplication Integration allows creating and running multiple test cases to validate complex integrations with Google Cloud services and other applications.\u003c/p\u003e\n"],["\u003cp\u003eTest configurations include setting mock strategies (no mock, mock execution, mock output) and various assertion types like assert execution, assert parameters, and assert condition.\u003c/p\u003e\n"],["\u003cp\u003eTask execution in tests can be conditional, based on conditions that use a variety of operators (e.g., \u003ccode\u003e=\u003c/code\u003e, \u003ccode\u003e!=\u003c/code\u003e, \u003ccode\u003e<\u003c/code\u003e, \u003ccode\u003e>\u003c/code\u003e, \u003ccode\u003e:\u003c/code\u003e, \u003ccode\u003eAND\u003c/code\u003e, \u003ccode\u003eOR\u003c/code\u003e, \u003ccode\u003eNOT\u003c/code\u003e) and functions (e.g., \u003ccode\u003eexists\u003c/code\u003e, \u003ccode\u003edoes_not_exist\u003c/code\u003e, \u003ccode\u003eis_empty\u003c/code\u003e, \u003ccode\u003eis_not_empty\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThere are specific limitations to test cases, such as not being able to add assertions for integration output variables or create test cases for published integrations, and they are not downloaded when downloading the integration.\u003c/p\u003e\n"],["\u003cp\u003eThere is no additional cost for managing functional test for Application Integration.\u003c/p\u003e\n"]]],[],null,["# Introduction to test cases\n\nSee the [supported connectors](/integration-connectors/docs/connector-reference-overview) for Application Integration.\n\nIntroduction to test cases\n==========================\n\n|\n| **Preview\n| --- Test cases**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\n\nWith Application Integration, you can create and run multiple test cases on your complex integrations that\nconnect and manage Google Cloud services and other business applications. By testing your integration flow, you can ensure that your integration is working as intended. You can test your integration using different input variables to identify the faults in the integration flow. For information about how to create test cases, see [Create test cases](/application-integration/docs/create-test-cases).\n\nTest configurations\n-------------------\n\nApplication Integration enables you to add multiple test cases for your integration. For triggers, you can configure the input values in a test case. For tasks, you can update the following test configurations:\n\n- **Mock strategy type:** There are three options that you can set for your task:\n - **No mock:** This strategy lets you execute the task.\n - **Mock execution:** This strategy lets you mock your task as successfully executed or failed.\n - **Mock output:** This strategy lets you mock the output of the task.\n- **Assertion type:** You can add multiple assertions for a selected task in a test. There are various assertion types available:\n - **Assert execution:** This assertion type lets you check if the task is executed successfully, with failure, or if the task didn't get executed.\n - **Assert parameters:** This assertion type lets you select the parameter that you want to assert and provide a value to compare it with.\n - **Assert condition:** This assertion type lets you add conditions for the execution of the task. For more information, see [Assertion conditions](#assertion-conditions).\n\n\u003cbr /\u003e\n\nAssert conditions\n-----------------\n\nIn test configuration for tasks, you can choose to add conditions that must be met for the execution\nof the task. The task is run only if the specified conditions are met.\n\n### Supported operators\n\n\nThe following table describes the supported operators available for use in asserted conditions.\n\n### Supported functions\n\n\nThe following table describes the supported functions available for use in asserted conditions.\n\n### Best practices\n\nThe following section lists the best practices when specifying conditions:\n\n- To reference a variable value, use dollar sign notation (`$`) before and after the variable name. For example, if you want to check if a variable `productId` is greater than 10, the syntax is `$productId$ \u003e 10`.\n- Text without dollar sign notation is interpreted as a literal value. For example the text `customerId` is interpreted as a literal value.\n- To check multiple conditions, split the conditions into individual checks and combine them using **AND** or **OR** . For example, instead of using `$productId$ \u003e 5 AND \u003c 9 `, use ` $productId$ \u003e 5 AND $productId$ \u003c 9`.\n\nPricing\n-------\n\nThere is no additional cost for managing fuctional tests. For more information about pricing, see [Application Integration pricing](/application-integration/pricing).\n\nLimitations\n-----------\n\nTest cases are subject to the following limitations:\n\n- When you download integrations, the test cases are not downloaded along with the integration. For information about how to download test cases, see [Download test cases](/application-integration/docs/upload-download-test-cases).\n- You cannot add assertions for output variables for the integration. As a workaround, you can add assertions on the last task executed for output variables.\n- You cannot create test cases for published integrations. To create test cases, click **Enable Editing** . A new version in the `DRAFT` state is created in the integration for you. The following figure shows the edit lock in the integration editor.\n\n \u003cbr /\u003e\n\n\nWhat's next\n-----------\n\nLearn how to do the following:\n\n- [Create test cases](/application-integration/docs/create-test-cases).\n- [Copy](/application-integration/docs/manage-test-cases#copy) and [delete](/application-integration/docs/manage-test-cases#delete) test cases.\n- [Run a test case](/application-integration/docs/run-test-cases) and [view test case execution logs](/application-integration/docs/integration-execution-logs#view-integration-execution-logs).\n- [Configure test cases](/application-integration/docs/configure-test-cases).\n- [Upload and download test cases](/application-integration/docs/upload-download-test-cases)."]]