@maxim_mazurok/gapi.client.testing-v1 0.0.20220806

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,976 @@
1
+ /* Type definitions for non-npm package Cloud Testing API v1 0.0 */
2
+ // Project: https://developers.google.com/cloud-test-lab/
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://testing.googleapis.com/$discovery/rest?version=v1
13
+ // Revision: 20220806
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Cloud Testing API v1 */
19
+ function load(urlOrObject: "https://testing.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "testing", version: "v1"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "testing", version: "v1", callback: () => any): void;
24
+
25
+ namespace testing {
26
+ interface Account {
27
+ /** An automatic google login account. */
28
+ googleAuto?: any;
29
+ }
30
+ interface AndroidDevice {
31
+ /** Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options. */
32
+ androidModelId?: string;
33
+ /** Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options. */
34
+ androidVersionId?: string;
35
+ /** Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options. */
36
+ locale?: string;
37
+ /** Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options. */
38
+ orientation?: string;
39
+ }
40
+ interface AndroidDeviceCatalog {
41
+ /** The set of supported Android device models. */
42
+ models?: AndroidModel[];
43
+ /** The set of supported runtime configurations. */
44
+ runtimeConfiguration?: AndroidRuntimeConfiguration;
45
+ /** The set of supported Android OS versions. */
46
+ versions?: AndroidVersion[];
47
+ }
48
+ interface AndroidDeviceList {
49
+ /** Required. A list of Android devices. */
50
+ androidDevices?: AndroidDevice[];
51
+ }
52
+ interface AndroidInstrumentationTest {
53
+ /** The APK for the application under test. */
54
+ appApk?: FileReference;
55
+ /** A multi-apk app bundle for the application under test. */
56
+ appBundle?: AppBundle;
57
+ /** The java package for the application under test. The default value is determined by examining the application's manifest. */
58
+ appPackageId?: string;
59
+ /**
60
+ * The option of whether running each test within its own invocation of instrumentation with Android Test Orchestrator or not. ** Orchestrator is only compatible with
61
+ * AndroidJUnitRunner version 1.1 or higher! ** Orchestrator offers the following benefits: - No shared state - Crashes are isolated - Logs are scoped per test See for more information
62
+ * about Android Test Orchestrator. If not set, the test will be run without the orchestrator.
63
+ */
64
+ orchestratorOption?: string;
65
+ /** The option to run tests in multiple shards in parallel. */
66
+ shardingOption?: ShardingOption;
67
+ /** Required. The APK containing the test code to be executed. */
68
+ testApk?: FileReference;
69
+ /** The java package for the test to be executed. The default value is determined by examining the application's manifest. */
70
+ testPackageId?: string;
71
+ /** The InstrumentationTestRunner class. The default value is determined by examining the application's manifest. */
72
+ testRunnerClass?: string;
73
+ /**
74
+ * 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
75
+ * package_name.class_name#method_name" If empty, all targets in the module will be run.
76
+ */
77
+ testTargets?: string[];
78
+ }
79
+ interface AndroidMatrix {
80
+ /** Required. The ids of the set of Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options. */
81
+ androidModelIds?: string[];
82
+ /** Required. The ids of the set of Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options. */
83
+ androidVersionIds?: string[];
84
+ /** Required. The set of locales the test device will enable for testing. Use the TestEnvironmentDiscoveryService to get supported options. */
85
+ locales?: string[];
86
+ /** Required. The set of orientations to test with. Use the TestEnvironmentDiscoveryService to get supported options. */
87
+ orientations?: string[];
88
+ }
89
+ interface AndroidModel {
90
+ /** The company that this device is branded with. Example: "Google", "Samsung". */
91
+ brand?: string;
92
+ /** The name of the industrial design. This corresponds to android.os.Build.DEVICE. */
93
+ codename?: string;
94
+ /** Whether this device is virtual or physical. */
95
+ form?: string;
96
+ /** Whether this device is a phone, tablet, wearable, etc. */
97
+ formFactor?: string;
98
+ /** The unique opaque id for this model. Use this for invoking the TestExecutionService. */
99
+ id?: string;
100
+ /** True if and only if tests with this model are recorded by stitching together screenshots. See use_low_spec_video_recording in device config. */
101
+ lowFpsVideoRecording?: boolean;
102
+ /** The manufacturer of this device. */
103
+ manufacturer?: string;
104
+ /** The human-readable marketing name for this device model. Examples: "Nexus 5", "Galaxy S5". */
105
+ name?: string;
106
+ /** Screen density in DPI. This corresponds to ro.sf.lcd_density */
107
+ screenDensity?: number;
108
+ /** Screen size in the horizontal (X) dimension measured in pixels. */
109
+ screenX?: number;
110
+ /** Screen size in the vertical (Y) dimension measured in pixels. */
111
+ screenY?: number;
112
+ /**
113
+ * 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
114
+ * 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
115
+ * supported only on a particular version.
116
+ */
117
+ supportedAbis?: string[];
118
+ /** The set of Android versions this device supports. */
119
+ supportedVersionIds?: string[];
120
+ /** Tags for this dimension. Examples: "default", "preview", "deprecated". */
121
+ tags?: string[];
122
+ /** URL of a thumbnail image (photo) of the device. */
123
+ thumbnailUrl?: string;
124
+ }
125
+ interface AndroidRoboTest {
126
+ /** The APK for the application under test. */
127
+ appApk?: FileReference;
128
+ /** A multi-apk app bundle for the application under test. */
129
+ appBundle?: AppBundle;
130
+ /** The initial activity that should be used to start the app. */
131
+ appInitialActivity?: string;
132
+ /** The java package for the application under test. The default value is determined by examining the application's manifest. */
133
+ appPackageId?: string;
134
+ /** 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. */
135
+ maxDepth?: number;
136
+ /** The max number of steps Robo can execute. Default is no limit. */
137
+ maxSteps?: number;
138
+ /** 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. */
139
+ roboDirectives?: RoboDirective[];
140
+ /** The mode in which Robo should run. Most clients should allow the server to populate this field automatically. */
141
+ roboMode?: string;
142
+ /** A JSON file with a sequence of actions Robo should perform as a prologue for the crawl. */
143
+ roboScript?: FileReference;
144
+ /**
145
+ * The intents used to launch the app for the crawl. If none are provided, then the main launcher activity is launched. If some are provided, then only those provided are launched (the
146
+ * main launcher activity must be provided explicitly).
147
+ */
148
+ startingIntents?: RoboStartingIntent[];
149
+ }
150
+ interface AndroidRuntimeConfiguration {
151
+ /** The set of available locales. */
152
+ locales?: Locale[];
153
+ /** The set of available orientations. */
154
+ orientations?: Orientation[];
155
+ }
156
+ interface AndroidTestLoop {
157
+ /** The APK for the application under test. */
158
+ appApk?: FileReference;
159
+ /** A multi-apk app bundle for the application under test. */
160
+ appBundle?: AppBundle;
161
+ /** The java package for the application under test. The default is determined by examining the application's manifest. */
162
+ appPackageId?: string;
163
+ /**
164
+ * 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
165
+ * 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. Scenarios can also be
166
+ * specified in the scenarios field.
167
+ */
168
+ scenarioLabels?: string[];
169
+ /** The list of scenarios that should be run during the test. The default is all test loops, derived from the application's manifest. */
170
+ scenarios?: number[];
171
+ }
172
+ interface AndroidVersion {
173
+ /** The API level for this Android version. Examples: 18, 19. */
174
+ apiLevel?: number;
175
+ /** The code name for this Android version. Examples: "JellyBean", "KitKat". */
176
+ codeName?: string;
177
+ /** Market share for this version. */
178
+ distribution?: Distribution;
179
+ /** An opaque id for this Android version. Use this id to invoke the TestExecutionService. */
180
+ id?: string;
181
+ /** The date this Android version became available in the market. */
182
+ releaseDate?: Date;
183
+ /** Tags for this dimension. Examples: "default", "preview", "deprecated". */
184
+ tags?: string[];
185
+ /** A string representing this version of the Android OS. Examples: "4.3", "4.4". */
186
+ versionString?: string;
187
+ }
188
+ interface Apk {
189
+ /** The path to an APK to be installed on the device before the test begins. */
190
+ location?: FileReference;
191
+ /** The java package for the APK to be installed. Value is determined by examining the application's manifest. */
192
+ packageName?: string;
193
+ }
194
+ interface ApkDetail {
195
+ apkManifest?: ApkManifest;
196
+ }
197
+ interface ApkManifest {
198
+ /** User-readable name for the application. */
199
+ applicationLabel?: string;
200
+ intentFilters?: IntentFilter[];
201
+ /** Maximum API level on which the application is designed to run. */
202
+ maxSdkVersion?: number;
203
+ /** Minimum API level required for the application to run. */
204
+ minSdkVersion?: number;
205
+ /** Full Java-style package name for this application, e.g. "com.example.foo". */
206
+ packageName?: string;
207
+ /** Specifies the API Level on which the application is designed to run. */
208
+ targetSdkVersion?: number;
209
+ /** Permissions declared to be used by the application */
210
+ usesPermission?: string[];
211
+ }
212
+ interface AppBundle {
213
+ /** .aab file representing the app bundle under test. */
214
+ bundleLocation?: FileReference;
215
+ }
216
+ interface CancelTestMatrixResponse {
217
+ /** The current rolled-up state of the test matrix. If this state is already final, then the cancelation request will have no effect. */
218
+ testState?: string;
219
+ }
220
+ interface ClientInfo {
221
+ /** The list of detailed information about client. */
222
+ clientInfoDetails?: ClientInfoDetail[];
223
+ /** Required. Client name, such as gcloud. */
224
+ name?: string;
225
+ }
226
+ interface ClientInfoDetail {
227
+ /** Required. The key of detailed client information. */
228
+ key?: string;
229
+ /** Required. The value of detailed client information. */
230
+ value?: string;
231
+ }
232
+ interface Date {
233
+ /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */
234
+ day?: number;
235
+ /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */
236
+ month?: number;
237
+ /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */
238
+ year?: number;
239
+ }
240
+ interface DeviceFile {
241
+ /** A reference to an opaque binary blob file. */
242
+ obbFile?: ObbFile;
243
+ /** A reference to a regular file. */
244
+ regularFile?: RegularFile;
245
+ }
246
+ interface DeviceIpBlock {
247
+ /** The date this block was added to Firebase Test Lab */
248
+ addedDate?: Date;
249
+ /** An IP address block in CIDR notation eg: 34.68.194.64/29 */
250
+ block?: string;
251
+ /** Whether this block is used by physical or virtual devices */
252
+ form?: string;
253
+ }
254
+ interface DeviceIpBlockCatalog {
255
+ /** The device IP blocks used by Firebase Test Lab */
256
+ ipBlocks?: DeviceIpBlock[];
257
+ }
258
+ interface Distribution {
259
+ /** Output only. The estimated fraction (0-1) of the total market with this configuration. */
260
+ marketShare?: number;
261
+ /** Output only. The time this distribution was measured. */
262
+ measurementTime?: string;
263
+ }
264
+ interface Environment {
265
+ /** An Android device which must be used with an Android test. */
266
+ androidDevice?: AndroidDevice;
267
+ /** An iOS device which must be used with an iOS test. */
268
+ iosDevice?: IosDevice;
269
+ }
270
+ interface EnvironmentMatrix {
271
+ /** A list of Android devices; the test will be run only on the specified devices. */
272
+ androidDeviceList?: AndroidDeviceList;
273
+ /** A matrix of Android devices. */
274
+ androidMatrix?: AndroidMatrix;
275
+ /** A list of iOS devices. */
276
+ iosDeviceList?: IosDeviceList;
277
+ }
278
+ interface EnvironmentVariable {
279
+ /** Key for the environment variable. */
280
+ key?: string;
281
+ /** Value for the environment variable. */
282
+ value?: string;
283
+ }
284
+ interface FileReference {
285
+ /** A path to a file in Google Cloud Storage. Example: gs://build-app-1414623860166/app%40debug-unaligned.apk These paths are expected to be url encoded (percent encoding) */
286
+ gcsPath?: string;
287
+ }
288
+ interface GetApkDetailsResponse {
289
+ /** Details of the Android APK. */
290
+ apkDetail?: ApkDetail;
291
+ }
292
+ // tslint:disable-next-line:no-empty-interface
293
+ interface GoogleAuto {
294
+ }
295
+ interface GoogleCloudStorage {
296
+ /** Required. 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. */
297
+ gcsPath?: string;
298
+ }
299
+ interface IntentFilter {
300
+ /** The android:name value of the tag. */
301
+ actionNames?: string[];
302
+ /** The android:name value of the tag. */
303
+ categoryNames?: string[];
304
+ /** The android:mimeType value of the tag. */
305
+ mimeType?: string;
306
+ }
307
+ interface IosDevice {
308
+ /** Required. The id of the iOS device to be used. Use the TestEnvironmentDiscoveryService to get supported options. */
309
+ iosModelId?: string;
310
+ /** Required. The id of the iOS major software version to be used. Use the TestEnvironmentDiscoveryService to get supported options. */
311
+ iosVersionId?: string;
312
+ /** Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options. */
313
+ locale?: string;
314
+ /** Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options. */
315
+ orientation?: string;
316
+ }
317
+ interface IosDeviceCatalog {
318
+ /** The set of supported iOS device models. */
319
+ models?: IosModel[];
320
+ /** The set of supported runtime configurations. */
321
+ runtimeConfiguration?: IosRuntimeConfiguration;
322
+ /** The set of supported iOS software versions. */
323
+ versions?: IosVersion[];
324
+ /** The set of supported Xcode versions. */
325
+ xcodeVersions?: XcodeVersion[];
326
+ }
327
+ interface IosDeviceFile {
328
+ /** The bundle id of the app where this file lives. iOS apps sandbox their own filesystem, so app files must specify which app installed on the device. */
329
+ bundleId?: string;
330
+ /** The source file */
331
+ content?: FileReference;
332
+ /** Location of the file on the device, inside the app's sandboxed filesystem */
333
+ devicePath?: string;
334
+ }
335
+ interface IosDeviceList {
336
+ /** Required. A list of iOS devices. */
337
+ iosDevices?: IosDevice[];
338
+ }
339
+ interface IosModel {
340
+ /**
341
+ * Device capabilities. Copied from
342
+ * https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html
343
+ */
344
+ deviceCapabilities?: string[];
345
+ /** Whether this device is a phone, tablet, wearable, etc. */
346
+ formFactor?: string;
347
+ /** The unique opaque id for this model. Use this for invoking the TestExecutionService. */
348
+ id?: string;
349
+ /** The human-readable name for this device model. Examples: "iPhone 4s", "iPad Mini 2". */
350
+ name?: string;
351
+ /** Screen density in DPI. */
352
+ screenDensity?: number;
353
+ /** Screen size in the horizontal (X) dimension measured in pixels. */
354
+ screenX?: number;
355
+ /** Screen size in the vertical (Y) dimension measured in pixels. */
356
+ screenY?: number;
357
+ /** The set of iOS major software versions this device supports. */
358
+ supportedVersionIds?: string[];
359
+ /** Tags for this dimension. Examples: "default", "preview", "deprecated". */
360
+ tags?: string[];
361
+ }
362
+ interface IosRuntimeConfiguration {
363
+ /** The set of available locales. */
364
+ locales?: Locale[];
365
+ /** The set of available orientations. */
366
+ orientations?: Orientation[];
367
+ }
368
+ interface IosTestLoop {
369
+ /** Output only. The bundle id for the application under test. */
370
+ appBundleId?: string;
371
+ /** Required. The .ipa of the application to test. */
372
+ appIpa?: FileReference;
373
+ /** The list of scenarios that should be run during the test. Defaults to the single scenario 0 if unspecified. */
374
+ scenarios?: number[];
375
+ }
376
+ interface IosTestSetup {
377
+ /** iOS apps to install in addition to those being directly tested. */
378
+ additionalIpas?: FileReference[];
379
+ /**
380
+ * The network traffic profile used for running the test. Available network profiles can be queried by using the NETWORK_CONFIGURATION environment type when calling
381
+ * TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog.
382
+ */
383
+ networkProfile?: string;
384
+ /**
385
+ * List of directories on the device to upload to Cloud Storage at the end of the test. Directories should either be in a shared directory (such as /private/var/mobile/Media) or within
386
+ * an accessible directory inside the app's filesystem (such as /Documents) by specifying the bundle ID.
387
+ */
388
+ pullDirectories?: IosDeviceFile[];
389
+ /** List of files to push to the device before starting the test. */
390
+ pushFiles?: IosDeviceFile[];
391
+ }
392
+ interface IosVersion {
393
+ /** An opaque id for this iOS version. Use this id to invoke the TestExecutionService. */
394
+ id?: string;
395
+ /** An integer representing the major iOS version. Examples: "8", "9". */
396
+ majorVersion?: number;
397
+ /** An integer representing the minor iOS version. Examples: "1", "2". */
398
+ minorVersion?: number;
399
+ /** The available Xcode versions for this version. */
400
+ supportedXcodeVersionIds?: string[];
401
+ /** Tags for this dimension. Examples: "default", "preview", "deprecated". */
402
+ tags?: string[];
403
+ }
404
+ interface IosXcTest {
405
+ /** Output only. The bundle id for the application under test. */
406
+ appBundleId?: string;
407
+ /**
408
+ * The option to test special app entitlements. Setting this would re-sign the app having special entitlements with an explicit application-identifier. Currently supports testing
409
+ * aps-environment entitlement.
410
+ */
411
+ testSpecialEntitlements?: boolean;
412
+ /**
413
+ * Required. The .zip containing the .xctestrun file and the contents of the DerivedData/Build/Products directory. The .xctestrun file in this zip is ignored if the xctestrun field is
414
+ * specified.
415
+ */
416
+ testsZip?: FileReference;
417
+ /**
418
+ * The Xcode version that should be used for the test. Use the TestEnvironmentDiscoveryService to get supported options. Defaults to the latest Xcode version Firebase Test Lab
419
+ * supports.
420
+ */
421
+ xcodeVersion?: string;
422
+ /**
423
+ * An .xctestrun file that will override the .xctestrun file in the tests zip. Because the .xctestrun file contains environment variables along with test methods to run and/or ignore,
424
+ * this can be useful for sharding tests. Default is taken from the tests zip.
425
+ */
426
+ xctestrun?: FileReference;
427
+ }
428
+ // tslint:disable-next-line:no-empty-interface
429
+ interface LauncherActivityIntent {
430
+ }
431
+ interface Locale {
432
+ /** The id for this locale. Example: "en_US". */
433
+ id?: string;
434
+ /** A human-friendly name for this language/locale. Example: "English". */
435
+ name?: string;
436
+ /** A human-friendly string representing the region for this locale. Example: "United States". Not present for every locale. */
437
+ region?: string;
438
+ /** Tags for this dimension. Example: "default". */
439
+ tags?: string[];
440
+ }
441
+ interface ManualSharding {
442
+ /**
443
+ * Required. Group of packages, classes, and/or test methods to be run for each manually-created shard. You must specify at least one shard if this field is present. When you select
444
+ * one or more physical devices, the number of repeated test_targets_for_shard must be <= 50. When you select one or more ARM virtual devices, it must be <= 50. When you select only
445
+ * x86 virtual devices, it must be <= 500.
446
+ */
447
+ testTargetsForShard?: TestTargetsForShard[];
448
+ }
449
+ interface NetworkConfiguration {
450
+ /** The emulation rule applying to the download traffic. */
451
+ downRule?: TrafficRule;
452
+ /** The unique opaque id for this network traffic configuration. */
453
+ id?: string;
454
+ /** The emulation rule applying to the upload traffic. */
455
+ upRule?: TrafficRule;
456
+ }
457
+ interface NetworkConfigurationCatalog {
458
+ configurations?: NetworkConfiguration[];
459
+ }
460
+ interface ObbFile {
461
+ /** Required. Opaque Binary Blob (OBB) file(s) to install on the device. */
462
+ obb?: FileReference;
463
+ /**
464
+ * Required. 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
465
+ * the device.
466
+ */
467
+ obbFileName?: string;
468
+ }
469
+ interface Orientation {
470
+ /** The id for this orientation. Example: "portrait". */
471
+ id?: string;
472
+ /** A human-friendly name for this orientation. Example: "portrait". */
473
+ name?: string;
474
+ /** Tags for this dimension. Example: "default". */
475
+ tags?: string[];
476
+ }
477
+ interface ProvidedSoftwareCatalog {
478
+ /**
479
+ * A string representing the current version of AndroidX Test Orchestrator that is used in the environment. The package is available at
480
+ * https://maven.google.com/web/index.html#androidx.test:orchestrator.
481
+ */
482
+ androidxOrchestratorVersion?: string;
483
+ /**
484
+ * Deprecated: Use AndroidX Test Orchestrator going forward. A string representing the current version of Android Test Orchestrator that is used in the environment. The package is
485
+ * available at https://maven.google.com/web/index.html#com.android.support.test:orchestrator.
486
+ */
487
+ orchestratorVersion?: string;
488
+ }
489
+ interface RegularFile {
490
+ /** Required. The source file. */
491
+ content?: FileReference;
492
+ /**
493
+ * Required. Where to put the content on the device. Must be an absolute, allowlisted path. If the file exists, it will be replaced. The following device-side directories and any of
494
+ * their subdirectories are allowlisted: ${EXTERNAL_STORAGE}, /sdcard, or /storage ${ANDROID_DATA}/local/tmp, or /data/local/tmp Specifying a path outside of these directory trees is
495
+ * invalid. The paths /sdcard and /data will be made available and treated as implicit path substitutions. E.g. if /sdcard on a particular device does not map to external storage, the
496
+ * system will replace it with the external storage path prefix for that device and copy the file there. It is strongly advised to use the Environment API in app and test code to
497
+ * access files on the device in a portable way.
498
+ */
499
+ devicePath?: string;
500
+ }
501
+ interface ResultStorage {
502
+ /** Required. */
503
+ googleCloudStorage?: GoogleCloudStorage;
504
+ /** Output only. URL to the results in the Firebase Web Console. */
505
+ resultsUrl?: string;
506
+ /** Output only. The tool results execution that results are written to. */
507
+ toolResultsExecution?: ToolResultsExecution;
508
+ /** The tool results history that contains the tool results execution that results are written to. If not provided, the service will choose an appropriate value. */
509
+ toolResultsHistory?: ToolResultsHistory;
510
+ }
511
+ interface RoboDirective {
512
+ /** Required. The type of action that Robo should perform on the specified element. */
513
+ actionType?: string;
514
+ /** 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. */
515
+ inputText?: string;
516
+ /**
517
+ * Required. 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:
518
+ * https://developer.android.com/guide/topics/resources/accessing-resources.html
519
+ */
520
+ resourceName?: string;
521
+ }
522
+ interface RoboStartingIntent {
523
+ /** An intent that starts the main launcher activity. */
524
+ launcherActivity?: any;
525
+ /** An intent that starts an activity with specific details. */
526
+ startActivity?: StartActivityIntent;
527
+ /** Timeout in seconds for each intent. */
528
+ timeout?: string;
529
+ }
530
+ interface Shard {
531
+ /** Output only. The total number of shards. */
532
+ numShards?: number;
533
+ /** Output only. The index of the shard among all the shards. */
534
+ shardIndex?: number;
535
+ /** Output only. Test targets for each shard. Only set for manual sharding. */
536
+ testTargetsForShard?: TestTargetsForShard;
537
+ }
538
+ interface ShardingOption {
539
+ /** Shards test cases into the specified groups of packages, classes, and/or methods. */
540
+ manualSharding?: ManualSharding;
541
+ /** Uniformly shards test cases given a total number of shards. */
542
+ uniformSharding?: UniformSharding;
543
+ }
544
+ interface StartActivityIntent {
545
+ /** Action name. Required for START_ACTIVITY. */
546
+ action?: string;
547
+ /** Intent categories to set on the intent. */
548
+ categories?: string[];
549
+ /** URI for the action. */
550
+ uri?: string;
551
+ }
552
+ interface SystraceSetup {
553
+ /** Systrace duration in seconds. Should be between 1 and 30 seconds. 0 disables systrace. */
554
+ durationSeconds?: number;
555
+ }
556
+ interface TestDetails {
557
+ /** Output only. If the TestState is ERROR, then this string will contain human-readable details about the error. */
558
+ errorMessage?: string;
559
+ /**
560
+ * Output only. 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
561
+ * appended to the end of progress_messages.
562
+ */
563
+ progressMessages?: string[];
564
+ }
565
+ interface TestEnvironmentCatalog {
566
+ /** Supported Android devices. */
567
+ androidDeviceCatalog?: AndroidDeviceCatalog;
568
+ /** The IP blocks used by devices in the test environment. */
569
+ deviceIpBlockCatalog?: DeviceIpBlockCatalog;
570
+ /** Supported iOS devices. */
571
+ iosDeviceCatalog?: IosDeviceCatalog;
572
+ /** Supported network configurations. */
573
+ networkConfigurationCatalog?: NetworkConfigurationCatalog;
574
+ /** The software test environment provided by TestExecutionService. */
575
+ softwareCatalog?: ProvidedSoftwareCatalog;
576
+ }
577
+ interface TestExecution {
578
+ /** Output only. How the host machine(s) are configured. */
579
+ environment?: Environment;
580
+ /** Output only. Unique id set by the service. */
581
+ id?: string;
582
+ /** Output only. Id of the containing TestMatrix. */
583
+ matrixId?: string;
584
+ /** Output only. The cloud project that owns the test execution. */
585
+ projectId?: string;
586
+ /** Output only. Details about the shard. */
587
+ shard?: Shard;
588
+ /** Output only. Indicates the current progress of the test execution (e.g., FINISHED). */
589
+ state?: string;
590
+ /** Output only. Additional details about the running test. */
591
+ testDetails?: TestDetails;
592
+ /** Output only. How to run the test. */
593
+ testSpecification?: TestSpecification;
594
+ /** Output only. The time this test execution was initially created. */
595
+ timestamp?: string;
596
+ /** Output only. Where the results for this execution are written. */
597
+ toolResultsStep?: ToolResultsStep;
598
+ }
599
+ interface TestMatrix {
600
+ /** Information about the client which invoked the test. */
601
+ clientInfo?: ClientInfo;
602
+ /** Required. The devices the tests are being executed on. */
603
+ environmentMatrix?: EnvironmentMatrix;
604
+ /**
605
+ * 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
606
+ * 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
607
+ * and support is more limited because of that expectation.
608
+ */
609
+ failFast?: boolean;
610
+ /**
611
+ * 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
612
+ * implies no reruns.
613
+ */
614
+ flakyTestAttempts?: number;
615
+ /** Output only. Describes why the matrix is considered invalid. Only useful for matrices in the INVALID state. */
616
+ invalidMatrixDetails?: string;
617
+ /** Output Only. The overall outcome of the test. Only set when the test matrix state is FINISHED. */
618
+ outcomeSummary?: string;
619
+ /** The cloud project that owns the test matrix. */
620
+ projectId?: string;
621
+ /** Required. Where the results for the matrix are written. */
622
+ resultStorage?: ResultStorage;
623
+ /** Output only. Indicates the current progress of the test matrix. */
624
+ state?: string;
625
+ /** Output only. The list of test executions that the service creates for this matrix. */
626
+ testExecutions?: TestExecution[];
627
+ /** Output only. Unique id set by the service. */
628
+ testMatrixId?: string;
629
+ /** Required. How to run the test. */
630
+ testSpecification?: TestSpecification;
631
+ /** Output only. The time this test matrix was initially created. */
632
+ timestamp?: string;
633
+ }
634
+ interface TestSetup {
635
+ /** The device will be logged in on this account for the duration of the test. */
636
+ account?: Account;
637
+ /** APKs to install in addition to those being directly tested. Currently capped at 100. */
638
+ additionalApks?: Apk[];
639
+ /**
640
+ * List of directories on the device to upload to GCS at the end of the test; they must be absolute paths under /sdcard, /storage or /data/local/tmp. Path names are restricted to
641
+ * characters a-z A-Z 0-9 _ - . + and / Note: The paths /sdcard and /data will be made available and treated as implicit path substitutions. E.g. if /sdcard on a particular device does
642
+ * not map to external storage, the system will replace it with the external storage path prefix for that device.
643
+ */
644
+ directoriesToPull?: string[];
645
+ /** Whether to prevent all runtime permissions to be granted at app install */
646
+ dontAutograntPermissions?: boolean;
647
+ /** Environment variables to set for the test (only applicable for instrumentation tests). */
648
+ environmentVariables?: EnvironmentVariable[];
649
+ /** List of files to push to the device before starting the test. */
650
+ filesToPush?: DeviceFile[];
651
+ /**
652
+ * The network traffic profile used for running the test. Available network profiles can be queried by using the NETWORK_CONFIGURATION environment type when calling
653
+ * TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog.
654
+ */
655
+ networkProfile?: string;
656
+ /**
657
+ * Deprecated: Systrace uses Python 2 which has been sunset 2020-01-01. Support of Systrace may stop at any time, at which point no Systrace file will be provided in the results.
658
+ * Systrace configuration for the run. If set a systrace will be taken, starting on test start and lasting for the configured duration. The systrace file thus obtained is put in the
659
+ * results bucket together with the other artifacts from the run.
660
+ */
661
+ systrace?: SystraceSetup;
662
+ }
663
+ interface TestSpecification {
664
+ /** An Android instrumentation test. */
665
+ androidInstrumentationTest?: AndroidInstrumentationTest;
666
+ /** An Android robo test. */
667
+ androidRoboTest?: AndroidRoboTest;
668
+ /** An Android Application with a Test Loop. */
669
+ androidTestLoop?: AndroidTestLoop;
670
+ /** Disables performance metrics recording. May reduce test latency. */
671
+ disablePerformanceMetrics?: boolean;
672
+ /** Disables video recording. May reduce test latency. */
673
+ disableVideoRecording?: boolean;
674
+ /** An iOS application with a test loop. */
675
+ iosTestLoop?: IosTestLoop;
676
+ /** Test setup requirements for iOS. */
677
+ iosTestSetup?: IosTestSetup;
678
+ /** An iOS XCTest, via an .xctestrun file. */
679
+ iosXcTest?: IosXcTest;
680
+ /** Test setup requirements for Android e.g. files to install, bootstrap scripts. */
681
+ testSetup?: TestSetup;
682
+ /** Max time a test execution is allowed to run before it is automatically cancelled. The default value is 5 min. */
683
+ testTimeout?: string;
684
+ }
685
+ interface TestTargetsForShard {
686
+ /**
687
+ * Group of packages, classes, and/or test methods to be run for each shard. The targets need to be specified in AndroidJUnitRunner argument format. For example, "package
688
+ * com.my.packages" "class com.my.package.MyClass". The number of test_targets must be greater than 0.
689
+ */
690
+ testTargets?: string[];
691
+ }
692
+ interface ToolResultsExecution {
693
+ /** Output only. A tool results execution ID. */
694
+ executionId?: string;
695
+ /** Output only. A tool results history ID. */
696
+ historyId?: string;
697
+ /** Output only. The cloud project that owns the tool results execution. */
698
+ projectId?: string;
699
+ }
700
+ interface ToolResultsHistory {
701
+ /** Required. A tool results history ID. */
702
+ historyId?: string;
703
+ /** Required. The cloud project that owns the tool results history. */
704
+ projectId?: string;
705
+ }
706
+ interface ToolResultsStep {
707
+ /** Output only. A tool results execution ID. */
708
+ executionId?: string;
709
+ /** Output only. A tool results history ID. */
710
+ historyId?: string;
711
+ /** Output only. The cloud project that owns the tool results step. */
712
+ projectId?: string;
713
+ /** Output only. A tool results step ID. */
714
+ stepId?: string;
715
+ }
716
+ interface TrafficRule {
717
+ /** Bandwidth in kbits/second. */
718
+ bandwidth?: number;
719
+ /** Burst size in kbits. */
720
+ burst?: number;
721
+ /** Packet delay, must be >= 0. */
722
+ delay?: string;
723
+ /** Packet duplication ratio (0.0 - 1.0). */
724
+ packetDuplicationRatio?: number;
725
+ /** Packet loss ratio (0.0 - 1.0). */
726
+ packetLossRatio?: number;
727
+ }
728
+ interface UniformSharding {
729
+ /**
730
+ * Required. The total number of shards to create. This must always be a positive number that is no greater than the total number of test cases. When you select one or more physical
731
+ * devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 50. When you select only x86 virtual devices, it must be <= 500.
732
+ */
733
+ numShards?: number;
734
+ }
735
+ interface XcodeVersion {
736
+ /** Tags for this Xcode version. Example: "default". */
737
+ tags?: string[];
738
+ /** The id for this version. Example: "9.2". */
739
+ version?: string;
740
+ }
741
+ interface ApplicationDetailServiceResource {
742
+ /** Gets the details of an Android application APK. */
743
+ getApkDetails(request: {
744
+ /** V1 error format. */
745
+ "$.xgafv"?: string;
746
+ /** OAuth access token. */
747
+ access_token?: string;
748
+ /** Data format for response. */
749
+ alt?: string;
750
+ /** JSONP */
751
+ callback?: string;
752
+ /** Selector specifying which fields to include in a partial response. */
753
+ fields?: string;
754
+ /** 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. */
755
+ key?: string;
756
+ /** OAuth 2.0 token for the current user. */
757
+ oauth_token?: string;
758
+ /** Returns response with indentations and line breaks. */
759
+ prettyPrint?: boolean;
760
+ /** 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. */
761
+ quotaUser?: string;
762
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
763
+ upload_protocol?: string;
764
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
765
+ uploadType?: string;
766
+ /** Request body */
767
+ resource: FileReference;
768
+ }): Request<GetApkDetailsResponse>;
769
+ getApkDetails(request: {
770
+ /** V1 error format. */
771
+ "$.xgafv"?: string;
772
+ /** OAuth access token. */
773
+ access_token?: string;
774
+ /** Data format for response. */
775
+ alt?: string;
776
+ /** JSONP */
777
+ callback?: string;
778
+ /** Selector specifying which fields to include in a partial response. */
779
+ fields?: string;
780
+ /** 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. */
781
+ key?: string;
782
+ /** OAuth 2.0 token for the current user. */
783
+ oauth_token?: string;
784
+ /** Returns response with indentations and line breaks. */
785
+ prettyPrint?: boolean;
786
+ /** 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. */
787
+ quotaUser?: string;
788
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
789
+ upload_protocol?: string;
790
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
791
+ uploadType?: string;
792
+ },
793
+ body: FileReference): Request<GetApkDetailsResponse>;
794
+ }
795
+ interface TestMatricesResource {
796
+ /**
797
+ * Cancels unfinished test executions in a test matrix. This call returns immediately and cancellation proceeds asynchronously. If the matrix is already final, this operation will have
798
+ * 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
799
+ * malformed - NOT_FOUND - if the Test Matrix does not exist
800
+ */
801
+ cancel(request?: {
802
+ /** V1 error format. */
803
+ "$.xgafv"?: string;
804
+ /** OAuth access token. */
805
+ access_token?: string;
806
+ /** Data format for response. */
807
+ alt?: string;
808
+ /** JSONP */
809
+ callback?: string;
810
+ /** Selector specifying which fields to include in a partial response. */
811
+ fields?: string;
812
+ /** 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. */
813
+ key?: string;
814
+ /** OAuth 2.0 token for the current user. */
815
+ oauth_token?: string;
816
+ /** Returns response with indentations and line breaks. */
817
+ prettyPrint?: boolean;
818
+ /** Cloud project that owns the test. */
819
+ projectId: string;
820
+ /** 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. */
821
+ quotaUser?: string;
822
+ /** Test matrix that will be canceled. */
823
+ testMatrixId: string;
824
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
825
+ upload_protocol?: string;
826
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
827
+ uploadType?: string;
828
+ }): Request<CancelTestMatrixResponse>;
829
+ /**
830
+ * 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
831
+ * 2000 devices in parallel. 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
832
+ * request is malformed or if the matrix tries to use too many simultaneous devices.
833
+ */
834
+ create(request: {
835
+ /** V1 error format. */
836
+ "$.xgafv"?: string;
837
+ /** OAuth access token. */
838
+ access_token?: string;
839
+ /** Data format for response. */
840
+ alt?: string;
841
+ /** JSONP */
842
+ callback?: string;
843
+ /** Selector specifying which fields to include in a partial response. */
844
+ fields?: string;
845
+ /** 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. */
846
+ key?: string;
847
+ /** OAuth 2.0 token for the current user. */
848
+ oauth_token?: string;
849
+ /** Returns response with indentations and line breaks. */
850
+ prettyPrint?: boolean;
851
+ /** The GCE project under which this job will run. */
852
+ projectId: string;
853
+ /** 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. */
854
+ quotaUser?: string;
855
+ /**
856
+ * 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,
857
+ * but strongly recommended.
858
+ */
859
+ requestId?: string;
860
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
861
+ upload_protocol?: string;
862
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
863
+ uploadType?: string;
864
+ /** Request body */
865
+ resource: TestMatrix;
866
+ }): Request<TestMatrix>;
867
+ create(request: {
868
+ /** V1 error format. */
869
+ "$.xgafv"?: string;
870
+ /** OAuth access token. */
871
+ access_token?: string;
872
+ /** Data format for response. */
873
+ alt?: string;
874
+ /** JSONP */
875
+ callback?: string;
876
+ /** Selector specifying which fields to include in a partial response. */
877
+ fields?: string;
878
+ /** 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. */
879
+ key?: string;
880
+ /** OAuth 2.0 token for the current user. */
881
+ oauth_token?: string;
882
+ /** Returns response with indentations and line breaks. */
883
+ prettyPrint?: boolean;
884
+ /** The GCE project under which this job will run. */
885
+ projectId: string;
886
+ /** 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. */
887
+ quotaUser?: string;
888
+ /**
889
+ * 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,
890
+ * but strongly recommended.
891
+ */
892
+ requestId?: string;
893
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
894
+ upload_protocol?: string;
895
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
896
+ uploadType?: string;
897
+ },
898
+ body: TestMatrix): Request<TestMatrix>;
899
+ /**
900
+ * Checks 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 -
901
+ * if the request is malformed - NOT_FOUND - if the Test Matrix does not exist
902
+ */
903
+ get(request?: {
904
+ /** V1 error format. */
905
+ "$.xgafv"?: string;
906
+ /** OAuth access token. */
907
+ access_token?: string;
908
+ /** Data format for response. */
909
+ alt?: string;
910
+ /** JSONP */
911
+ callback?: string;
912
+ /** Selector specifying which fields to include in a partial response. */
913
+ fields?: string;
914
+ /** 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. */
915
+ key?: string;
916
+ /** OAuth 2.0 token for the current user. */
917
+ oauth_token?: string;
918
+ /** Returns response with indentations and line breaks. */
919
+ prettyPrint?: boolean;
920
+ /** Cloud project that owns the test matrix. */
921
+ projectId: string;
922
+ /** 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. */
923
+ quotaUser?: string;
924
+ /** Unique test matrix id which was assigned by the service. */
925
+ testMatrixId: string;
926
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
927
+ upload_protocol?: string;
928
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
929
+ uploadType?: string;
930
+ }): Request<TestMatrix>;
931
+ }
932
+ interface ProjectsResource {
933
+ testMatrices: TestMatricesResource;
934
+ }
935
+ interface TestEnvironmentCatalogResource {
936
+ /**
937
+ * Gets 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
938
+ * environment type does not exist - INTERNAL - if an internal error occurred
939
+ */
940
+ get(request?: {
941
+ /** V1 error format. */
942
+ "$.xgafv"?: string;
943
+ /** OAuth access token. */
944
+ access_token?: string;
945
+ /** Data format for response. */
946
+ alt?: string;
947
+ /** JSONP */
948
+ callback?: string;
949
+ /** Required. The type of environment that should be listed. */
950
+ environmentType: string;
951
+ /** Selector specifying which fields to include in a partial response. */
952
+ fields?: string;
953
+ /** 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. */
954
+ key?: string;
955
+ /** OAuth 2.0 token for the current user. */
956
+ oauth_token?: string;
957
+ /** Returns response with indentations and line breaks. */
958
+ prettyPrint?: boolean;
959
+ /** For authorization, the cloud project requesting the TestEnvironmentCatalog. */
960
+ projectId?: string;
961
+ /** 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. */
962
+ quotaUser?: string;
963
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
964
+ upload_protocol?: string;
965
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
966
+ uploadType?: string;
967
+ }): Request<TestEnvironmentCatalog>;
968
+ }
969
+
970
+ const applicationDetailService: ApplicationDetailServiceResource;
971
+
972
+ const projects: ProjectsResource;
973
+
974
+ const testEnvironmentCatalog: TestEnvironmentCatalogResource;
975
+ }
976
+ }