Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
The capabilities test feature is designed to run against the App Engine development web 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.
There are several ways to use the capabilities test feature:
To change capabilities in the console,
/_ah/admin
on your server, for example: http://localhost:8888/_ah/admin.The services now reflect the settings you have chosen the next time your app accesses them. Run your app and observe its behavior.
If you use Eclipse, you can set one or more capabilities using the debug command line options.
To change capability settings using the VM command line arguments in Eclipse
-Dcapability.status.capabilityname.*=statusname
capabilityname
is replaced by the name of the service (see Capability (Service) Names) and statusname
is replaced by the capability status you want to use (see Capability Status Values).
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.
The screen capture below shows two capabilities (datastore and images) being disabled from the command line:
Capability Name in API | Capability Name displayed in Console | Description |
---|---|---|
blobstore |
BLOBSTORE | The blobstore service |
datastore_v3 |
DATASTORE | The datastore service for queries |
datastore_v3,write |
DATASTORE_WRITE | The datastore service for write requests |
images |
IMAGES | The images service |
mail |
The mail service | |
memcache |
MEMCACHE | The memcache service |
prospective_search |
PROSPECTIVE_SEARCH | The memcache service |
taskqueue |
TASKQUEUE | The taskqueue service |
urlfetch |
URLFETCH | The urlfetch service |
xmpp |
XMPP | The XMPP service |
Status Values for All Capabilities | Description |
---|---|
DISABLED |
The capability is disabled. |
ENABLED |
The capability is available and no maintenance is currently planned. |
SCHEDULED_MAINTENANCE |
The capability is available but scheduled for maintenance. |
UNKNOWN |
The status of this service is unknown. |
To use the local service capabilities test feature in the API, you use the LocalCapabilitiesServiceTestConfig class. For more information and a code sample, see Writing Local Service Capabilities Tests.