Java 8 はサポートが終了しており、2026 年 1 月 31 日に
非推奨になります。非推奨になると、過去に組織のポリシーを使用して以前のランタイムのデプロイを再度有効にしていた場合でも、Java 8 アプリケーションをデプロイできなくなります。既存の Java 8 アプリケーションは、
非推奨になる日付以降も引き続き実行され、トラフィックを受信します。
サポートされている最新バージョンの Java に移行することをおすすめします。
機能サービスのテストの構成
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
機能のテスト機能は、テスト目的で App Engine 開発用ウェブサーバーで実行するように設計されています。これにより、データストア、blobstore などのサービスのステータスを変更して、サービスのさまざまなステータスに遭遇したときにアプリケーションが適切に動作するかどうかを判断できます。たとえば、データストア サービスのステータスを無効に変更することで、アプリでデータストアを正常に処理できるかどうかをテストできます。
機能のテスト機能を使用するには、いくつかの方法があります。
コンソールを使用して機能のステータスを変更する
コンソールで機能を変更する手順は次のとおりです。
- 開発用サーバーでアプリを実行している場合は、サーバーの URL
/_ah/admin
(例: http://localhost:8888/_ah/admin)にアクセスしてコンソールにアクセスします。
- コンソールで、左下にある [Capabilities Status] をクリックします。
- [Capabilities Status Configuration] ページで、アプリで使用されていて、ステータスを変更するサービスを特定します。サービス名の横にあるメニューをクリックし、そのサービスでテストするステータスを選択します。
次にアプリでアクセスするときに、選択した設定がサービスに反映されます。アプリを実行し、動作を観察します。
コマンドラインを使用して機能のステータスを変更する
Eclipse を使用する場合は、debug コマンドライン オプションを使用して 1 つまたは複数の機能を設定できます。
Eclipse で VM コマンドライン引数を使用して機能設定を変更するには
- Eclipse を開いた状態で、プロジェクトを選択して右クリックし、[Debug As] > [Debug Configurations] を選択します。
- [Arguments] タブに移動し、[VM arguments] テキスト ボックスに目的のオプションを入力します。オプションの形式は、以下のとおりです。
-Dcapability.status.capabilityname.*=statusname
capabilityname
はサービス名に置き換えます(機能(サービス)名を参照)。statusname
は使用する機能のステータス(機能のステータス値を参照)に置き換えます。
注: データストア書き込み機能の場合は、capabilityname
を datastore_v3
に置き換え、アスタリスク(*
)を write
に置き換えます。置き換え後は Dcapability.status.datastore_v3.write
のようになります。他の機能については、アスタリスクをそのままにしておきます。
以下の画面キャプチャには、コマンドラインで無効にした 2 つの機能(データストアとイメージ)が表示されています。

- [Apply] をクリックして、変更を保存します。
- [Debug]をクリックして、これらの設定でアプリを実行します。
機能(サービス)名
API での機能名 |
コンソールに表示される機能名 |
説明 |
blobstore |
BLOBSTORE |
blobstore サービス |
datastore_v3 |
DATASTORE |
クエリのデータストア サービス |
datastore_v3,write |
DATASTORE_WRITE |
書き込みリクエストのデータストアサービス |
images |
IMAGES |
画像サービス |
mail |
MAIL |
メールサービス |
memcache |
MEMCACHE |
memcache サービス |
taskqueue |
TASKQUEUE |
タスクキュー サービス |
urlfetch |
URLFETCH |
urlfetch サービス |
機能のステータス値
すべての機能のステータス値 |
説明 |
DISABLED |
機能は無効になっています。 |
ENABLED |
機能は使用可能であり、現時点でメンテナンスは予定されていません。 |
SCHEDULED_MAINTENANCE |
機能は使用可能ですが、メンテナンスが予定されています。 |
UNKNOWN |
このサービスのステータスは不明です。 |
Capabilities API を使用して機能のステータスを変更する
API のローカル サービスの機能テストを使用するには、LocalCapabilitiesServiceTestConfig クラスを使用します。詳細とコードサンプルについては、ローカル サービスの機能テストを作成するをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-04 UTC。
[[["わかりやすい","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\u003eThe capabilities test feature allows you to modify the status of App Engine services (like datastore and blobstore) on the development web server to test how your application handles different service states.\u003c/p\u003e\n"],["\u003cp\u003eYou can change the status of services using the console by accessing \u003ccode\u003e/_ah/admin\u003c/code\u003e on your development server and navigating to the \u003cstrong\u003eCapabilities Status\u003c/strong\u003e page.\u003c/p\u003e\n"],["\u003cp\u003eEclipse users can adjust capability statuses by adding specific VM arguments in the \u003cstrong\u003eDebug Configurations\u003c/strong\u003e dialog, allowing you to disable or change the status of services such as \u003ccode\u003edatastore_v3.write\u003c/code\u003e or \u003ccode\u003eimages\u003c/code\u003e for testing.\u003c/p\u003e\n"],["\u003cp\u003eThe available capability status values are \u003ccode\u003eDISABLED\u003c/code\u003e, \u003ccode\u003eENABLED\u003c/code\u003e, \u003ccode\u003eSCHEDULED_MAINTENANCE\u003c/code\u003e, and \u003ccode\u003eUNKNOWN\u003c/code\u003e, providing various testing scenarios for service availability.\u003c/p\u003e\n"],["\u003cp\u003eThe LocalCapabilitiesServiceTestConfig class is available in the API to use the local service capabilities test feature.\u003c/p\u003e\n"]]],[],null,["# Capabilities Service Test Configuration\n\nThe capabilities test feature is designed to run against the App Engine [development web server](/appengine/docs/legacy/standard/java/tools/using-local-server) for testing purposes. It enables you to change the status of services, such as datastore, blobstore, etc., to determine whether your application behaves properly when it encounters the various possible statuses of the service. For example, by changing the datastore service status to disabled, you can test whether your app handles datastore unavailability in a graceful manner.\n\nThere are several ways to use the capabilities test feature:\n\nChange Capabilities Status Using the Console\n--------------------------------------------\n\nTo change capabilities in the console,\n\n1. With your app running on the development server, access the console by visiting the URL `/_ah/admin` on your server, for example: \u003chttp://localhost:8888/_ah/admin\u003e.\n2. In the console, click **Capabilities Status** in the bottom left of the console.\n3. In the **Capabilities Status Configuration** page, locate the service or services that are used by your app and whose status you wish to change; click the dropdown menu next to the service name and select the status you want to test on that service:\n\nThe services now reflect the settings you have chosen the next time your app accesses them. Run your app and observe its behavior.\n\nChange Capabilities Status Using the Command Line\n-------------------------------------------------\n\nIf you use Eclipse, you can set one or more capabilities using the debug command line options.\n\nTo change capability settings using the VM command line arguments in Eclipse\n\n1. With Eclipse open, select your project, right-click, then select **Debug As \\\u003e Debug Configurations**.\n2. Go to the **Arguments** tab and enter the desired option in the **VM arguments** textbox. The format of the option is\n\n `-Dcapability.status.`*capabilityname* `.*=`*statusname*\n , where *capabilityname* is replaced by the name of the service (see [Capability (Service) Names](#Capability_(Service)_Names)) and `statusname` is replaced by the capability status you want to use (see [Capability Status Values](#Capability_Status_Values)).\n\n \u003cbr /\u003e\n\n **Note:** For the datastore write capability, replace *capabilityname* with `datastore_v3` and the asterisk (`*`) with `write`, like this: `Dcapability.status.datastore_v3.write`. For the other capabilities, leave the asterisk as shown.\n\n The screen capture below shows two capabilities (datastore and images) being disabled from the command line:\n\n3. Click **Apply** to save your changes\n4. Click **Debug** to run your app with those settings.\n\n### Capability (Service) Names\n\n### Capability Status Values\n\nChange Capabilities Status Using the Capabilities API\n-----------------------------------------------------\n\nTo use the local service capabilities test feature in the API, you use the [LocalCapabilitiesServiceTestConfig](/appengine/docs/legacy/standard/java/tools/localunittesting/javadoc/com/google/appengine/tools/development/testing/LocalCapabilitiesServiceTestConfig) class. For more information and a code sample, see [Writing Local Service Capabilities Tests](/appengine/docs/legacy/standard/java/tools/localunittesting#capabilities-testing)."]]