Skip to content

Commit

Permalink
feat(testing): update the API
Browse files Browse the repository at this point in the history
#### testing:v1
The following keys were added:
- schemas.TestSetup.properties.dontAutograntPermissions.description
- schemas.TestSetup.properties.dontAutograntPermissions.type

The following keys were changed:
- schemas.AndroidModel.properties.form.enum
- schemas.AndroidModel.properties.form.enumDescriptions
- schemas.ManualSharding.properties.testTargetsForShard.description
- schemas.RegularFile.properties.devicePath.description
- schemas.TestSetup.properties.directoriesToPull.description
- schemas.UniformSharding.properties.numShards.description
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jul 10, 2020
1 parent 3c12d1a commit 29b315e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
22 changes: 14 additions & 8 deletions discovery/testing-v1.json
Expand Up @@ -273,7 +273,7 @@
}
}
},
"revision": "20200603",
"revision": "20200708",
"rootUrl": "https://testing.googleapis.com/",
"schemas": {
"Account": {
Expand Down Expand Up @@ -457,12 +457,14 @@
"enum": [
"DEVICE_FORM_UNSPECIFIED",
"VIRTUAL",
"PHYSICAL"
"PHYSICAL",
"EMULATOR"
],
"enumDescriptions": [
"Do not use. For proto versioning only.",
"A software stack that simulates the device.",
"Actual hardware."
"Android virtual device using Compute Engine native virtualization. Firebase\nTest Lab only.",
"Actual hardware.",
"Android virtual device using emulator in nested virtualization. Equivalent\nto Android Studio."
],
"type": "string"
},
Expand Down Expand Up @@ -1285,7 +1287,7 @@
"id": "ManualSharding",
"properties": {
"testTargetsForShard": {
"description": "Required. Group of packages, classes, and/or test methods to be run for\neach shard. The number of shard_test_targets must be >= 1 and <= 50.",
"description": "Required. Group of packages, classes, and/or test methods to be run for\neach shard. When any physical devices are selected, the number of\ntest_targets_for_shard must be >= 1 and <= 50. When no physical devices are\nselected, the number must be >= 1 and <= 250.",
"items": {
"$ref": "TestTargetsForShard"
},
Expand Down Expand Up @@ -1381,7 +1383,7 @@
"description": "Required. The source file."
},
"devicePath": {
"description": "Required. Where to put the content on the device. Must be an absolute,\nwhitelisted path. If the file exists, it will be replaced.\nThe following device-side directories and any of their subdirectories are\nwhitelisted:\n<p>${EXTERNAL_STORAGE}, or /sdcard</p>\n<p>${ANDROID_DATA}/local/tmp, or /data/local/tmp</p>\n<p>Specifying a path outside of these directory trees is invalid.\n\n<p> The paths /sdcard and /data will be made available and treated as\nimplicit path substitutions. E.g. if /sdcard on a particular device does\nnot map to external storage, the system will replace it with the external\nstorage path prefix for that device and copy the file there.\n\n<p> It is strongly advised to use the <a href=\n\"http://developer.android.com/reference/android/os/Environment.html\">\nEnvironment API</a> in app and test code to access files on the device in a\nportable way.",
"description": "Required. Where to put the content on the device. Must be an absolute,\nallowlisted path. If the file exists, it will be replaced.\nThe following device-side directories and any of their subdirectories are\nallowlisted:\n<p>${EXTERNAL_STORAGE}, /sdcard, or /storage</p>\n<p>${ANDROID_DATA}/local/tmp, or /data/local/tmp</p>\n<p>Specifying a path outside of these directory trees is invalid.\n\n<p> The paths /sdcard and /data will be made available and treated as\nimplicit path substitutions. E.g. if /sdcard on a particular device does\nnot map to external storage, the system will replace it with the external\nstorage path prefix for that device and copy the file there.\n\n<p> It is strongly advised to use the <a href=\n\"http://developer.android.com/reference/android/os/Environment.html\">\nEnvironment API</a> in app and test code to access files on the device in a\nportable way.",
"type": "string"
}
},
Expand Down Expand Up @@ -1835,12 +1837,16 @@
"type": "array"
},
"directoriesToPull": {
"description": "List of directories on the device to upload to GCS at the end of the test;\nthey must be absolute paths under /sdcard or /data/local/tmp.\nPath names are restricted to characters a-z A-Z 0-9 _ - . + and /\n\nNote: The paths /sdcard and /data will be made available and treated as\nimplicit path substitutions. E.g. if /sdcard on a particular device does\nnot map to external storage, the system will replace it with the external\nstorage path prefix for that device.",
"description": "List of directories on the device to upload to GCS at the end of the test;\nthey must be absolute paths under /sdcard, /storage or /data/local/tmp.\nPath names are restricted to characters a-z A-Z 0-9 _ - . + and /\n\nNote: The paths /sdcard and /data will be made available and treated as\nimplicit path substitutions. E.g. if /sdcard on a particular device does\nnot map to external storage, the system will replace it with the external\nstorage path prefix for that device.",
"items": {
"type": "string"
},
"type": "array"
},
"dontAutograntPermissions": {
"description": "Whether to prevent all runtime permissions to be granted at app install",
"type": "boolean"
},
"environmentVariables": {
"description": "Environment variables to set for the test (only applicable for\ninstrumentation tests).",
"items": {
Expand Down Expand Up @@ -2022,7 +2028,7 @@
"id": "UniformSharding",
"properties": {
"numShards": {
"description": "Required. Total number of shards. The number must be >= 1 and <= 50.",
"description": "Required. Total number of shards. When any physical devices are selected,\nthe number must be >= 1 and <= 50. When no physical devices are selected,\nthe number must be >= 1 and <= 250.",
"format": "int32",
"type": "integer"
}
Expand Down
12 changes: 8 additions & 4 deletions src/apis/testing/v1.ts
Expand Up @@ -864,7 +864,7 @@ export namespace testing_v1 {
*/
export interface Schema$ManualSharding {
/**
* Required. Group of packages, classes, and/or test methods to be run for each shard. The number of shard_test_targets must be &gt;= 1 and &lt;= 50.
* Required. Group of packages, classes, and/or test methods to be run for each shard. When any physical devices are selected, the number of test_targets_for_shard must be &gt;= 1 and &lt;= 50. When no physical devices are selected, the number must be &gt;= 1 and &lt;= 250.
*/
testTargetsForShard?: Schema$TestTargetsForShard[];
}
Expand Down Expand Up @@ -933,7 +933,7 @@ export namespace testing_v1 {
*/
content?: Schema$FileReference;
/**
* Required. Where to put the content on the device. Must be an absolute, whitelisted path. If the file exists, it will be replaced. The following device-side directories and any of their subdirectories are whitelisted: &lt;p&gt;${EXTERNAL_STORAGE}, or /sdcard&lt;/p&gt; &lt;p&gt;${ANDROID_DATA}/local/tmp, or /data/local/tmp&lt;/p&gt; &lt;p&gt;Specifying a path outside of these directory trees is invalid. &lt;p&gt; 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 system will replace it with the external storage path prefix for that device and copy the file there. &lt;p&gt; It is strongly advised to use the &lt;a href= &quot;http://developer.android.com/reference/android/os/Environment.html&quot;&gt; Environment API&lt;/a&gt; in app and test code to access files on the device in a portable way.
* 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 their subdirectories are allowlisted: &lt;p&gt;${EXTERNAL_STORAGE}, /sdcard, or /storage&lt;/p&gt; &lt;p&gt;${ANDROID_DATA}/local/tmp, or /data/local/tmp&lt;/p&gt; &lt;p&gt;Specifying a path outside of these directory trees is invalid. &lt;p&gt; 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 system will replace it with the external storage path prefix for that device and copy the file there. &lt;p&gt; It is strongly advised to use the &lt;a href= &quot;http://developer.android.com/reference/android/os/Environment.html&quot;&gt; Environment API&lt;/a&gt; in app and test code to access files on the device in a portable way.
*/
devicePath?: string | null;
}
Expand Down Expand Up @@ -1190,9 +1190,13 @@ export namespace testing_v1 {
*/
additionalApks?: Schema$Apk[];
/**
* List of directories on the device to upload to GCS at the end of the test; they must be absolute paths under /sdcard or /data/local/tmp. Path names are restricted to 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 not map to external storage, the system will replace it with the external storage path prefix for that device.
* 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 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 not map to external storage, the system will replace it with the external storage path prefix for that device.
*/
directoriesToPull?: string[] | null;
/**
* Whether to prevent all runtime permissions to be granted at app install
*/
dontAutograntPermissions?: boolean | null;
/**
* Environment variables to set for the test (only applicable for instrumentation tests).
*/
Expand Down Expand Up @@ -1345,7 +1349,7 @@ export namespace testing_v1 {
*/
export interface Schema$UniformSharding {
/**
* Required. Total number of shards. The number must be &gt;= 1 and &lt;= 50.
* Required. Total number of shards. When any physical devices are selected, the number must be &gt;= 1 and &lt;= 50. When no physical devices are selected, the number must be &gt;= 1 and &lt;= 250.
*/
numShards?: number | null;
}
Expand Down

0 comments on commit 29b315e

Please sign in to comment.