// Type definitions for non-npm package Google Google Cloud Testing API v1 1.0 // Project: https://developers.google.com/cloud-test-lab/ // Definitions by: Bolisov Alexey // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 // IMPORTANT // This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. // In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator // Generated from: https://testing.googleapis.com/$discovery/rest?version=v1 /// declare namespace gapi.client { /** Load Google Cloud Testing API v1 */ function load(name: "testing", version: "v1"): PromiseLike; function load(name: "testing", version: "v1", callback: () => any): void; const projects: testing.ProjectsResource; const testEnvironmentCatalog: testing.TestEnvironmentCatalogResource; namespace testing { interface Account { /** An automatic google login account */ googleAuto?: any; } interface AndroidDevice { /** * The id of the Android device to be used. * Use the EnvironmentDiscoveryService to get supported options. * Required */ androidModelId?: string; /** * The id of the Android OS version to be used. * Use the EnvironmentDiscoveryService to get supported options. * Required */ androidVersionId?: string; /** * The locale the test device used for testing. * Use the EnvironmentDiscoveryService to get supported options. * Required */ locale?: string; /** * How the device is oriented during the test. * Use the EnvironmentDiscoveryService to get supported options. * Required */ orientation?: string; } interface AndroidDeviceCatalog { /** * The set of supported Android device models. * @OutputOnly */ models?: AndroidModel[]; /** * The set of supported runtime configurations. * @OutputOnly */ runtimeConfiguration?: AndroidRuntimeConfiguration; /** * The set of supported Android OS versions. * @OutputOnly */ versions?: AndroidVersion[]; } interface AndroidDeviceList { /** * A list of Android devices * Required */ androidDevices?: AndroidDevice[]; } interface AndroidInstrumentationTest { /** * The APK for the application under test. * Required */ appApk?: FileReference; /** * The java package for the application under test. * Optional, default is determined by examining the application's manifest. */ appPackageId?: string; /** * The option of whether running each test within its own invocation of * instrumentation with Android Test Orchestrator or not. * ** Orchestrator is only compatible with AndroidJUnitRunner version 1.0 or * higher! ** * Orchestrator offers the following benefits: * - No shared state * - Crashes are isolated * - Logs are scoped per test * * See * * for more information about Android Test Orchestrator. * * Optional, if empty, test will be run without orchestrator. */ orchestratorOption?: string; /** * The APK containing the test code to be executed. * Required */ testApk?: FileReference; /** * The java package for the test to be executed. * Optional, default is determined by examining the application's manifest. */ testPackageId?: string; /** * The InstrumentationTestRunner class. * Optional, default is determined by examining the application's manifest. */ testRunnerClass?: string; /** * Each target must be fully qualified with the package name or class name, * in one of these formats: * - "package package_name" * - "class package_name.class_name" * - "class package_name.class_name#method_name" * * Optional, if empty, all targets in the module will be run. */ testTargets?: string[]; } interface AndroidMatrix { /** * The ids of the set of Android device to be used. * Use the EnvironmentDiscoveryService to get supported options. * Required */ androidModelIds?: string[]; /** * The ids of the set of Android OS version to be used. * Use the EnvironmentDiscoveryService to get supported options. * Required */ androidVersionIds?: string[]; /** * The set of locales the test device will enable for testing. * Use the EnvironmentDiscoveryService to get supported options. * Required */ locales?: string[]; /** * The set of orientations to test with. * Use the EnvironmentDiscoveryService to get supported options. * Required */ orientations?: string[]; } interface AndroidModel { /** * The company that this device is branded with. * Example: "Google", "Samsung" * @OutputOnly */ brand?: string; /** * The name of the industrial design. * This corresponds to android.os.Build.DEVICE * @OutputOnly */ codename?: string; /** * Whether this device is virtual or physical. * @OutputOnly */ form?: string; /** * The unique opaque id for this model. * Use this for invoking the TestExecutionService. * @OutputOnly */ id?: string; /** * The manufacturer of this device. * @OutputOnly */ manufacturer?: string; /** * The human-readable marketing name for this device model. * Examples: "Nexus 5", "Galaxy S5" * @OutputOnly */ name?: string; /** * Screen density in DPI. * This corresponds to ro.sf.lcd_density * @OutputOnly */ screenDensity?: number; /** * Screen size in the horizontal (X) dimension measured in pixels. * @OutputOnly */ screenX?: number; /** * Screen size in the vertical (Y) dimension measured in pixels. * @OutputOnly */ screenY?: number; /** * The list of supported ABIs for this device. * This corresponds to either android.os.Build.SUPPORTED_ABIS (for API level * 21 and above) or android.os.Build.CPU_ABI/CPU_ABI2. * The most preferred ABI is the first element in the list. * * Elements are optionally prefixed by "version_id:" (where version_id is * the id of an AndroidVersion), denoting an ABI that is supported only on * a particular version. * @OutputOnly */ supportedAbis?: string[]; /** * The set of Android versions this device supports. * @OutputOnly */ supportedVersionIds?: string[]; /** * Tags for this dimension. * Examples: "default", "preview", "deprecated" */ tags?: string[]; } interface AndroidRoboTest { /** * The APK for the application under test. * Required */ appApk?: FileReference; /** * The initial activity that should be used to start the app. * Optional */ appInitialActivity?: string; /** * The java package for the application under test. * Optional, default is determined by examining the application's manifest. */ appPackageId?: string; /** * The max depth of the traversal stack Robo can explore. Needs to be at least * 2 to make Robo explore the app beyond the first activity. * Default is 50. * Optional */ maxDepth?: number; /** * The max number of steps Robo can execute. * Default is no limit. * Optional */ maxSteps?: number; /** * A set of directives Robo should apply during the crawl. * This allows users to customize the crawl. For example, the username and * password for a test account can be provided. * Optional */ roboDirectives?: RoboDirective[]; } interface AndroidRuntimeConfiguration { /** * The set of available locales. * @OutputOnly */ locales?: Locale[]; /** * The set of available orientations. * @OutputOnly */ orientations?: Orientation[]; } interface AndroidTestLoop { /** * The APK for the application under test. * Required */ appApk?: FileReference; /** * The java package for the application under test. * Optional, default is determined by examining the application's manifest. */ appPackageId?: string; /** * The list of scenario labels that should be run during the test. * The scenario labels should map to labels defined in the application's * manifest. For example, player_experience and * com.google.test.loops.player_experience add all of the loops labeled in the * manifest with the com.google.test.loops.player_experience name to the * execution. * Optional. Scenarios can also be specified in the scenarios field. */ scenarioLabels?: string[]; /** * The list of scenarios that should be run during the test. * Optional, default is all test loops, derived from the application's * manifest. */ scenarios?: number[]; } interface AndroidVersion { /** * The API level for this Android version. * Examples: 18, 19 * @OutputOnly */ apiLevel?: number; /** * The code name for this Android version. * Examples: "JellyBean", "KitKat" * @OutputOnly */ codeName?: string; /** * Market share for this version. * @OutputOnly */ distribution?: Distribution; /** * An opaque id for this Android version. * Use this id to invoke the TestExecutionService. * @OutputOnly */ id?: string; /** * The date this Android version became available in the market. * @OutputOnly */ releaseDate?: Date; /** * Tags for this dimension. * Examples: "default", "preview", "deprecated" */ tags?: string[]; /** * A string representing this version of the Android OS. * Examples: "4.3", "4.4" * @OutputOnly */ versionString?: string; } interface CancelTestMatrixResponse { /** * The current rolled-up state of the test matrix. * If this state is already final, then the cancelation request will * have no effect. */ testState?: string; } interface ClientInfo { /** The list of detailed information about client. */ clientInfoDetails?: ClientInfoDetail[]; /** * Client name, such as gcloud. * Required */ name?: string; } interface ClientInfoDetail { /** * The key of detailed client information. * Required */ key?: string; /** * The value of detailed client information. * Required */ value?: string; } interface Date { /** * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 * if specifying a year/month where the day is not significant. */ day?: number; /** Month of year. Must be from 1 to 12. */ month?: number; /** * Year of date. Must be from 1 to 9999, or 0 if specifying a date without * a year. */ year?: number; } interface DeviceFile { /** A reference to an opaque binary blob file */ obbFile?: ObbFile; } interface Distribution { /** * The estimated fraction (0-1) of the total market with this configuration. * @OutputOnly */ marketShare?: number; /** * The time this distribution was measured. * @OutputOnly */ measurementTime?: string; } interface Environment { /** An Android device which must be used with an Android test. */ androidDevice?: AndroidDevice; } interface EnvironmentMatrix { /** * A list of Android devices; the test will be run only on the specified * devices. */ androidDeviceList?: AndroidDeviceList; /** A matrix of Android devices. */ androidMatrix?: AndroidMatrix; } interface EnvironmentVariable { /** Key for the environment variable */ key?: string; /** Value for the environment variable */ value?: string; } interface FileReference { /** * A path to a file in Google Cloud Storage. * Example: gs://build-app-1414623860166/app-debug-unaligned.apk */ gcsPath?: string; } interface GoogleCloudStorage { /** * The path to a directory in GCS that will * eventually contain the results for this test. * The requesting user must have write access on the bucket in the supplied * path. * Required */ gcsPath?: string; } interface Locale { /** * The id for this locale. * Example: "en_US" * @OutputOnly */ id?: string; /** * A human-friendly name for this language/locale. * Example: "English" * @OutputOnly */ name?: string; /** * A human-friendy string representing the region for this locale. * Example: "United States" * Not present for every locale. * @OutputOnly */ region?: string; /** * Tags for this dimension. * Examples: "default" */ tags?: string[]; } interface NetworkConfiguration { /** The emulation rule applying to the download traffic */ downRule?: TrafficRule; /** * The unique opaque id for this network traffic configuration * @OutputOnly */ id?: string; /** The emulation rule applying to the upload traffic */ upRule?: TrafficRule; } interface NetworkConfigurationCatalog { configurations?: NetworkConfiguration[]; } interface ObbFile { /** * Opaque Binary Blob (OBB) file(s) to install on the device * Required */ obb?: FileReference; /** * OBB file name which must conform to the format as specified by * Android * e.g. [main|patch].0300110.com.example.android.obb * which will be installed into * /Android/obb// * on the device * Required */ obbFileName?: string; } interface Orientation { /** * The id for this orientation. * Example: "portrait" * @OutputOnly */ id?: string; /** * A human-friendly name for this orientation. * Example: "portrait" * @OutputOnly */ name?: string; /** * Tags for this dimension. * Examples: "default" */ tags?: string[]; } interface ResultStorage { /** Required. */ googleCloudStorage?: GoogleCloudStorage; /** * The tool results execution that results are written to. * @OutputOnly */ toolResultsExecution?: ToolResultsExecution; /** * The tool results history that contains the tool results execution that * results are written to. * * Optional, if not provided the service will choose an appropriate value. */ toolResultsHistory?: ToolResultsHistory; } interface RoboDirective { /** * The type of action that Robo should perform on the specified element. * Required. */ actionType?: string; /** * The text that Robo is directed to set. If left empty, the directive will be * treated as a CLICK on the element matching the resource_name. * Optional */ inputText?: string; /** * The android resource name of the target UI element * For example, * in Java: R.string.foo * in xml: @string/foo * Only the “foo” part is needed. * Reference doc: * https://developer.android.com/guide/topics/resources/accessing-resources.html * Required */ resourceName?: string; } interface TestDetails { /** * If the TestState is ERROR, then this string will contain human-readable * details about the error. * @OutputOnly */ errorMessage?: string; /** * Human-readable, detailed descriptions of the test's progress. * For example: "Provisioning a device", "Starting Test". * * During the course of execution new data may be appended * to the end of progress_messages. * @OutputOnly */ progressMessages?: string[]; } interface TestEnvironmentCatalog { /** Android devices suitable for running Android Instrumentation Tests. */ androidDeviceCatalog?: AndroidDeviceCatalog; /** Supported network configurations */ networkConfigurationCatalog?: NetworkConfigurationCatalog; } interface TestExecution { /** * How the host machine(s) are configured. * @OutputOnly */ environment?: Environment; /** * Unique id set by the backend. * @OutputOnly */ id?: string; /** * Id of the containing TestMatrix. * @OutputOnly */ matrixId?: string; /** * The cloud project that owns the test execution. * @OutputOnly */ projectId?: string; /** * Indicates the current progress of the test execution (e.g., FINISHED). * @OutputOnly */ state?: string; /** * Additional details about the running test. * @OutputOnly */ testDetails?: TestDetails; /** * How to run the test. * @OutputOnly */ testSpecification?: TestSpecification; /** * The time this test execution was initially created. * @OutputOnly */ timestamp?: string; /** * Where the results for this execution are written. * @OutputOnly */ toolResultsStep?: ToolResultsStep; } interface TestMatrix { /** * Information about the client which invoked the test. * Optional */ clientInfo?: ClientInfo; /** * How the host machine(s) are configured. * Required */ environmentMatrix?: EnvironmentMatrix; /** * Describes why the matrix is considered invalid. * Only useful for matrices in the INVALID state. * @OutputOnly */ invalidMatrixDetails?: string; /** * The cloud project that owns the test matrix. * @OutputOnly */ projectId?: string; /** * Where the results for the matrix are written. * Required */ resultStorage?: ResultStorage; /** * Indicates the current progress of the test matrix (e.g., FINISHED) * @OutputOnly */ state?: string; /** * The list of test executions that the service creates for this matrix. * @OutputOnly */ testExecutions?: TestExecution[]; /** * Unique id set by the service. * @OutputOnly */ testMatrixId?: string; /** * How to run the test. * Required */ testSpecification?: TestSpecification; /** * The time this test matrix was initially created. * @OutputOnly */ timestamp?: string; } interface TestSetup { /** * The device will be logged in on this account for the duration of the test. * Optional */ account?: Account; /** * The directories on the device to upload to GCS at the end of the test; * they must be absolute, whitelisted paths. * Refer to RegularFile for whitelisted paths. * Optional */ directoriesToPull?: string[]; /** * Environment variables to set for the test (only applicable for * instrumentation tests). */ environmentVariables?: EnvironmentVariable[]; /** Optional */ filesToPush?: DeviceFile[]; /** * The network traffic profile used for running the test. * Optional */ networkProfile?: string; } interface TestSpecification { /** An Android instrumentation test. */ androidInstrumentationTest?: AndroidInstrumentationTest; /** An Android robo test. */ androidRoboTest?: AndroidRoboTest; /** An Android Application with a Test Loop */ androidTestLoop?: AndroidTestLoop; /** * Enables automatic Google account login. * If set, the service will automatically generate a Google test account and * add it to the device, before executing the test. Note that test accounts * might be reused. * Many applications show their full set of functionalities when an account is * present on the device. Logging into the device with these generated * accounts allows testing more functionalities. * Default is false. * Optional */ autoGoogleLogin?: boolean; /** Disables performance metrics recording; may reduce test latency. */ disablePerformanceMetrics?: boolean; /** Disables video recording; may reduce test latency. */ disableVideoRecording?: boolean; /** * Test setup requirements e.g. files to install, bootstrap scripts * Optional */ testSetup?: TestSetup; /** * Max time a test execution is allowed to run before it is * automatically cancelled. * Optional, default is 5 min. */ testTimeout?: string; } interface ToolResultsExecution { /** * A tool results execution ID. * @OutputOnly */ executionId?: string; /** * A tool results history ID. * @OutputOnly */ historyId?: string; /** * The cloud project that owns the tool results execution. * @OutputOnly */ projectId?: string; } interface ToolResultsHistory { /** * A tool results history ID. * Required */ historyId?: string; /** * The cloud project that owns the tool results history. * Required */ projectId?: string; } interface ToolResultsStep { /** * A tool results execution ID. * @OutputOnly */ executionId?: string; /** * A tool results history ID. * @OutputOnly */ historyId?: string; /** * The cloud project that owns the tool results step. * @OutputOnly */ projectId?: string; /** * A tool results step ID. * @OutputOnly */ stepId?: string; } interface TrafficRule { /** Bandwidth in kbits/second */ bandwidth?: number; /** Burst size in kbits */ burst?: number; /** Packet delay, must be >= 0 */ delay?: string; /** Packet duplication ratio (0.0 - 1.0) */ packetDuplicationRatio?: number; /** Packet loss ratio (0.0 - 1.0) */ packetLossRatio?: number; } interface TestMatricesResource { /** * Cancels unfinished test executions in a test matrix. * This call returns immediately and cancellation proceeds asychronously. * If the matrix is already final, this operation will have no effect. * * May return any of the following canonical error codes: * * - PERMISSION_DENIED - if the user is not authorized to read project * - INVALID_ARGUMENT - if the request is malformed * - NOT_FOUND - if the Test Matrix does not exist */ cancel(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Cloud project that owns the test. */ projectId: 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. */ quotaUser?: string; /** Test matrix that will be canceled. */ testMatrixId: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; /** * Request to run a matrix of tests according to the given specifications. * Unsupported environments will be returned in the state UNSUPPORTED. * Matrices are limited to at most 200 supported executions. * * 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 expands * to more than 200 supported executions */ create(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** The GCE project under which this job will run. */ projectId: 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. */ quotaUser?: 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. */ requestId?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; /** * Check the status of a test matrix. * * May return any of the following canonical error codes: * * - PERMISSION_DENIED - if the user is not authorized to read project * - INVALID_ARGUMENT - if the request is malformed * - NOT_FOUND - if the Test Matrix does not exist */ get(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** Selector specifying which fields to include in a partial response. */ fields?: 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** Cloud project that owns the test matrix. */ projectId: 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. */ quotaUser?: string; /** Unique test matrix id which was assigned by the service. */ testMatrixId: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; } interface ProjectsResource { testMatrices: TestMatricesResource; } interface TestEnvironmentCatalogResource { /** * Get the catalog of supported test environments. * * May return any of the following canonical error codes: * * - INVALID_ARGUMENT - if the request is malformed * - NOT_FOUND - if the environment type does not exist * - INTERNAL - if an internal error occurred */ get(request: { /** V1 error format. */ "$.xgafv"?: string; /** OAuth access token. */ access_token?: string; /** Data format for response. */ alt?: string; /** OAuth bearer token. */ bearer_token?: string; /** JSONP */ callback?: string; /** * The type of environment that should be listed. * Required */ environmentType: string; /** Selector specifying which fields to include in a partial response. */ fields?: 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. */ key?: string; /** OAuth 2.0 token for the current user. */ oauth_token?: string; /** Pretty-print response. */ pp?: boolean; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * For authorization, the cloud project requesting the TestEnvironmentCatalog. * Optional */ projectId?: 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. */ quotaUser?: string; /** Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; }): Request; } } }