Pub/Sub 統合テスト
bookmark_borderbookmark
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Pub/Sub によってトリガーされた関数を統合テストする方法を示します。
コードサンプル
Cloud Run functions に対する認証を行うには、アプリケーションのデフォルト認証情報を設定します。詳細については、ローカル開発環境の認証を設定するをご覧ください。
Cloud Run functions に対する認証を行うには、アプリケーションのデフォルト認証情報を設定します。詳細については、ローカル開発環境の認証を設定するをご覧ください。
Cloud Run functions に対する認証を行うには、アプリケーションのデフォルト認証情報を設定します。詳細については、ローカル開発環境の認証を設定するをご覧ください。
Cloud Run functions に対する認証を行うには、アプリケーションのデフォルト認証情報を設定します。詳細については、ローカル開発環境の認証を設定するをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],[],[[["This document provides instructions and code examples for integration testing functions triggered by Pub/Sub events in Java, Node.js, PHP, and Python."],["The examples utilize the Functions Framework to run and test functions locally, ensuring they behave as expected when deployed."],["Each code sample showcases how to simulate a Pub/Sub message via an HTTP request to the locally running function, and verifies that the function correctly processes the message."],["The code uses methods to set up and tear down the local testing environment, and utilize libraries such as `resilience4j` for Java, `wait-port` for Node.js, `Symfony` for PHP, and `requests` for Python, to handle retries, server processes and other tasks."],["Instructions on setting up Application Default Credentials for authenticating to Cloud Run functions are provided, along with links to further documentation."]]],[]]