projects

POST /v1/projects/{projectId}/testMatrices

Changed on

Creates and runs a matrix of tests according to the given specifications. Unsupported environments will be returned in the state UNSUPPORTED. A test matrix is limited to use at most 2000 devices in parallel. The returned matrix will not yet contain the executions that will be created for this matrix. Execution creation happens later on and will require a call to GetTestMatrix. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed or if the matrix tries to use too many simultaneous devices.

Request

  • Base URL
    https://testing.googleapis.com
  • Auth
    OAuth 2 and OAuth 2
    Implicithttps://accounts.google.com/o/oauth2/auth
    Scopeshttps://www.googleapis.com/auth/cloud-platform
    Authorization codehttps://accounts.google.com/o/oauth2/auth
    Token URLhttps://accounts.google.com/o/oauth2/token
    Scopeshttps://www.googleapis.com/auth/cloud-platform

Path parameters

projectId, string required

The GCE project under which this job will run.

Query parameters

$.xgafv, '1' | '2'

V1 error format.

access_token, string

OAuth access token.

alt, 'json' | 'media' | 'proto'

Data format for response.

callback, string

JSONP

fields, string

Selector specifying which fields to include in a partial response.

key, string

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_token, string

OAuth 2.0 token for the current user.

prettyPrint, boolean

Returns response with indentations and line breaks.

quotaUser, string

Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

uploadType, string

Legacy upload protocol for media (e.g. "media", "multipart").

upload_protocol, string

Upload protocol for media (e.g. "raw", "multipart").

requestId, string

A string id used to detect duplicated requests. Ids are automatically scoped to a project, so users should ensure the ID is unique per-project. A UUID is recommended. Optional, but strongly recommended.

Request body

TestMatrix required

TestMatrix captures all details about a test. It contains the environment configuration, test specification, test executions and overall state and outcome.

clientInfo, ClientInfo

Information about the client which invoked the test.

environmentMatrix, EnvironmentMatrix

The matrix of environments in which the test is to be executed.

extendedInvalidMatrixDetails, MatrixErrorDetail[]

Output only. Details about why a matrix was deemed invalid. If multiple checks can be safely performed, they will be reported but no assumptions should be made about the length of this list.

failFast, boolean

If true, only a single attempt at most will be made to run each execution/shard in the matrix. Flaky test attempts are not affected. Normally, 2 or more attempts are made if a potential infrastructure issue is detected. This feature is for latency sensitive workloads. The incidence of execution failures may be significantly greater for fail-fast matrices and support is more limited because of that expectation.

flakyTestAttempts, integer

The number of times a TestExecution should be re-attempted if one or more of its test cases fail for any reason. The maximum number of reruns allowed is 10. Default is 0, which implies no reruns.

invalidMatrixDetails, 'INVALID_MATRIX_DETAILS_UNSPECIFIED' | 'DETAILS_UNAVAILABLE' | 'MALFORMED_APK' | 'MALFORMED_TEST_APK' | 'NO_MANIFEST' | 'NO_PACKAGE_NAME' | 'INVALID_PACKAGE_NAME' | 'TEST_SAME_AS_APP' | 'NO_INSTRUMENTATION' | 'NO_SIGNATURE' | 'INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE' | 'NO_TEST_RUNNER_CLASS' | 'NO_LAUNCHER_ACTIVITY' | 'FORBIDDEN_PERMISSIONS' | 'INVALID_ROBO_DIRECTIVES' | 'INVALID_RESOURCE_NAME' | 'INVALID_DIRECTIVE_ACTION' | 'TEST_LOOP_INTENT_FILTER_NOT_FOUND' | 'SCENARIO_LABEL_NOT_DECLARED' | 'SCENARIO_LABEL_MALFORMED' | 'SCENARIO_NOT_DECLARED' | 'DEVICE_ADMIN_RECEIVER' | 'MALFORMED_XC_TEST_ZIP' | 'BUILT_FOR_IOS_SIMULATOR' | 'NO_TESTS_IN_XC_TEST_ZIP' | 'USE_DESTINATION_ARTIFACTS' | 'TEST_NOT_APP_HOSTED' | 'PLIST_CANNOT_BE_PARSED' | 'TEST_ONLY_APK' | 'MALFORMED_IPA' | 'MISSING_URL_SCHEME' | 'MALFORMED_APP_BUNDLE' | 'NO_CODE_APK' | 'INVALID_INPUT_APK' | 'INVALID_APK_PREVIEW_SDK' | 'MATRIX_TOO_LARGE' | 'TEST_QUOTA_EXCEEDED' | 'SERVICE_NOT_ACTIVATED' | 'UNKNOWN_PERMISSION_ERROR'

Output only. Describes why the matrix is considered invalid. Only useful for matrices in the INVALID state.

outcomeSummary, 'OUTCOME_SUMMARY_UNSPECIFIED' | 'SUCCESS' | 'FAILURE' | 'INCONCLUSIVE' | 'SKIPPED'

Output Only. The overall outcome of the test. Only set when the test matrix state is FINISHED.

projectId, string

The cloud project that owns the test matrix.

resultStorage, ResultStorage

Locations where the results of running the test are stored.

state, 'TEST_STATE_UNSPECIFIED' | 'VALIDATING' | 'PENDING' | 'RUNNING' | 'FINISHED' | 'ERROR' | 'UNSUPPORTED_ENVIRONMENT' | 'INCOMPATIBLE_ENVIRONMENT' | 'INCOMPATIBLE_ARCHITECTURE' | 'CANCELLED' | 'INVALID'

Output only. Indicates the current progress of the test matrix.

testExecutions, TestExecution[]

Output only. The list of test executions that the service creates for this matrix.

testMatrixId, string

Output only. Unique id set by the service.

testSpecification, TestSpecification

A description of how to run the test.

timestamp, string google-datetime

Output only. The time this test matrix was initially created.

Response

Successful response

TestMatrix required

TestMatrix captures all details about a test. It contains the environment configuration, test specification, test executions and overall state and outcome.

clientInfo, ClientInfo

Information about the client which invoked the test.

environmentMatrix, EnvironmentMatrix

The matrix of environments in which the test is to be executed.

extendedInvalidMatrixDetails, MatrixErrorDetail[]

Output only. Details about why a matrix was deemed invalid. If multiple checks can be safely performed, they will be reported but no assumptions should be made about the length of this list.

failFast, boolean

If true, only a single attempt at most will be made to run each execution/shard in the matrix. Flaky test attempts are not affected. Normally, 2 or more attempts are made if a potential infrastructure issue is detected. This feature is for latency sensitive workloads. The incidence of execution failures may be significantly greater for fail-fast matrices and support is more limited because of that expectation.

flakyTestAttempts, integer

The number of times a TestExecution should be re-attempted if one or more of its test cases fail for any reason. The maximum number of reruns allowed is 10. Default is 0, which implies no reruns.

invalidMatrixDetails, 'INVALID_MATRIX_DETAILS_UNSPECIFIED' | 'DETAILS_UNAVAILABLE' | 'MALFORMED_APK' | 'MALFORMED_TEST_APK' | 'NO_MANIFEST' | 'NO_PACKAGE_NAME' | 'INVALID_PACKAGE_NAME' | 'TEST_SAME_AS_APP' | 'NO_INSTRUMENTATION' | 'NO_SIGNATURE' | 'INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE' | 'NO_TEST_RUNNER_CLASS' | 'NO_LAUNCHER_ACTIVITY' | 'FORBIDDEN_PERMISSIONS' | 'INVALID_ROBO_DIRECTIVES' | 'INVALID_RESOURCE_NAME' | 'INVALID_DIRECTIVE_ACTION' | 'TEST_LOOP_INTENT_FILTER_NOT_FOUND' | 'SCENARIO_LABEL_NOT_DECLARED' | 'SCENARIO_LABEL_MALFORMED' | 'SCENARIO_NOT_DECLARED' | 'DEVICE_ADMIN_RECEIVER' | 'MALFORMED_XC_TEST_ZIP' | 'BUILT_FOR_IOS_SIMULATOR' | 'NO_TESTS_IN_XC_TEST_ZIP' | 'USE_DESTINATION_ARTIFACTS' | 'TEST_NOT_APP_HOSTED' | 'PLIST_CANNOT_BE_PARSED' | 'TEST_ONLY_APK' | 'MALFORMED_IPA' | 'MISSING_URL_SCHEME' | 'MALFORMED_APP_BUNDLE' | 'NO_CODE_APK' | 'INVALID_INPUT_APK' | 'INVALID_APK_PREVIEW_SDK' | 'MATRIX_TOO_LARGE' | 'TEST_QUOTA_EXCEEDED' | 'SERVICE_NOT_ACTIVATED' | 'UNKNOWN_PERMISSION_ERROR'

Output only. Describes why the matrix is considered invalid. Only useful for matrices in the INVALID state.

outcomeSummary, 'OUTCOME_SUMMARY_UNSPECIFIED' | 'SUCCESS' | 'FAILURE' | 'INCONCLUSIVE' | 'SKIPPED'

Output Only. The overall outcome of the test. Only set when the test matrix state is FINISHED.

projectId, string

The cloud project that owns the test matrix.

resultStorage, ResultStorage

Locations where the results of running the test are stored.

state, 'TEST_STATE_UNSPECIFIED' | 'VALIDATING' | 'PENDING' | 'RUNNING' | 'FINISHED' | 'ERROR' | 'UNSUPPORTED_ENVIRONMENT' | 'INCOMPATIBLE_ENVIRONMENT' | 'INCOMPATIBLE_ARCHITECTURE' | 'CANCELLED' | 'INVALID'

Output only. Indicates the current progress of the test matrix.

testExecutions, TestExecution[]

Output only. The list of test executions that the service creates for this matrix.

testMatrixId, string

Output only. Unique id set by the service.

testSpecification, TestSpecification

A description of how to run the test.

timestamp, string google-datetime

Output only. The time this test matrix was initially created.

Changes

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status