- NAME
-
- gcloud alpha device-run sessions submit xctest - submit a Device Run session with an iOS XCTest job
- SYNOPSIS
-
-
gcloud alpha device-run sessions submit xctest--device=[DEVICE,…]--test=TEST_PATH[--apps=[APP_PATH,…]] [--async] [--bucket-name=BUCKET_NAME] [--flaky-test-attempts=FLAKY_TEST_ATTEMPTS] [--labels=[KEY=VALUE,…]] [--location=LOCATION] [--other-files-to-push=[SOURCE=BUNDLE_ID:DEST,…]] [--paths-to-pull=[BUNDLE_ID:DEVICE_PATH,…]] [--video=VIDEO] [--xctest-timeout=XCTEST_TIMEOUT] [--xctestrun-file=XCTESTRUN_FILE] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(ALPHA)Submit a Device Run session with an iOS XCTest job. - EXAMPLES
-
To submit an XCTest session on an iPhone 15 Pro, run:
gcloud alpha device-run sessions submit xctest --device=iphone15pro-17.2 --test=gs://my-bucket/SmokeTests.zip --bucket-name=my-bucketTo submit an XCTest session asynchronously without waiting for it to complete, run:
gcloud alpha device-run sessions submit xctest --device=iphone15pro-17.2 --test=gs://my-bucket/SmokeTests.zip --bucket-name=my-bucket --async - REQUIRED FLAGS
-
--device=[DEVICE,…]- Id of the device type to run the test on. Can be repeated to specify multiple device types. A job will be created for each specified device type.
--test=TEST_PATH-
The path to the .zip file containing the iOS app and XCTest files. Supports both
Google Cloud Storage (
gs://…) paths and local filesystem paths. Any local file will be uploaded to Google Cloud Storage prior to test execution.
- OPTIONAL FLAGS
-
--apps=[APP_PATH,…]-
A list of additional application binary files (.ipa) to install before running
the test. The order of the applications in the list determines their
installation order on the device. Supports both Google Cloud Storage
(
gs://…) paths and local filesystem paths. Any local file will be uploaded to Google Cloud Storage prior to test execution. --async- Return immediately, without waiting for the operation in progress to complete.
--bucket-name=BUCKET_NAME-
The name of a Google Cloud Storage bucket to store test artifacts, including
local input files and test output files. If not specified, a default bucket
named
gs://[PROJECT_ID]-devicerunwill be used or created. --flaky-test-attempts=FLAKY_TEST_ATTEMPTS- Specify the maximum number of execution attempts per job to handle flakiness. If not specified, defaults to 1.
--labels=[KEY=VALUE,…]- A dictionary of user-defined key-value labels to attach to the session.
-
Location resource - Location to submit session. This represents a Cloud
resource. (NOTE) Some attributes are not given arguments in this group but can
be set in other ways.
To set the
projectattribute:-
provide the argument
--locationon the command line with a fully specified name; -
The default is
globalwith a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
-
provide the argument
--location=LOCATION-
ID of the location or fully qualified identifier for the location.
To set the
locationattribute:-
provide the argument
--locationon the command line; -
The default is
global.
-
provide the argument
--other-files-to-push=[SOURCE=BUNDLE_ID:DEST,…]- A dictionary of additional files to be pushed to the device before running the test. The key is the source path of the file (supports both Google Cloud Storage and local paths; local files will be uploaded to Google Cloud Storage prior to test execution), and the value is the destination path in the format BUNDLE_ID:DEVICE_PATH.
--paths-to-pull=[BUNDLE_ID:DEVICE_PATH,…]- A list of file or directory paths to pull from the device following test completion, in the format BUNDLE_ID:DEVICE_PATH.
--video=VIDEO-
Specify when to record video of the device screen during the test run. Accepted
values are
alwaysoron-failure.VIDEOmust be one of:always,on-failure. --xctest-timeout=XCTEST_TIMEOUT-
Specify the maximum duration allowed for the XCTest run (e.g.,
10m,15m,1h). The valid range is1mto1h. If not specified, defaults to5m. It does not include any time necessary to prepare and clean up the target device. --xctestrun-file=XCTESTRUN_FILE-
The path to the custom .xctestrun file. Supports both Google Cloud Storage
(
gs://…) paths and local filesystem paths. Any local file will be uploaded to Google Cloud Storage prior to test execution.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
gcloud alpha device-run sessions submit xctest
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-08-26 UTC.