From c54c68a46ea90a0f8dc746c2e158857160be7ddd Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Wed, 24 May 2023 18:27:16 +0000 Subject: [PATCH] feat(testing): update the api #### testing:v1 The following keys were added: - schemas.ApkManifest.properties.services (Total Keys: 2) - schemas.Service (Total Keys: 5) - schemas.Shard.properties.estimatedShardDuration (Total Keys: 3) - schemas.Shard.properties.numShards.readOnly (Total Keys: 1) - schemas.Shard.properties.shardIndex.readOnly (Total Keys: 1) - schemas.Shard.properties.testTargetsForShard.readOnly (Total Keys: 1) - schemas.ShardingOption.properties.smartSharding.$ref (Total Keys: 1) - schemas.SmartSharding (Total Keys: 4) --- .../testing_v1.applicationDetailService.html | 16 ++++++ .../dyn/testing_v1.projects.testMatrices.html | 21 ++++++++ .../discovery_cache/documents/testing.v1.json | 54 ++++++++++++++++++- 3 files changed, 89 insertions(+), 2 deletions(-) diff --git a/docs/dyn/testing_v1.applicationDetailService.html b/docs/dyn/testing_v1.applicationDetailService.html index 99935a7cde3..7249026fd3a 100644 --- a/docs/dyn/testing_v1.applicationDetailService.html +++ b/docs/dyn/testing_v1.applicationDetailService.html @@ -130,6 +130,22 @@

Method Details

], "minSdkVersion": 42, # Minimum API level required for the application to run. "packageName": "A String", # Full Java-style package name for this application, e.g. "com.example.foo". + "services": [ # Services contained in the tag. + { # The section of an tag. https://developer.android.com/guide/topics/manifest/service-element + "intentFilter": [ # Intent filters in the service + { # The section of an tag. https://developer.android.com/guide/topics/manifest/intent-filter-element.html + "actionNames": [ # The android:name value of the tag. + "A String", + ], + "categoryNames": [ # The android:name value of the tag. + "A String", + ], + "mimeType": "A String", # The android:mimeType value of the tag. + }, + ], + "name": "A String", # The android:name value + }, + ], "targetSdkVersion": 42, # Specifies the API Level on which the application is designed to run. "usesFeature": [ # Feature usage tags defined in the manifest. { # A tag within a manifest. https://developer.android.com/guide/topics/manifest/uses-feature-element.html diff --git a/docs/dyn/testing_v1.projects.testMatrices.html b/docs/dyn/testing_v1.projects.testMatrices.html index 6f215e40224..537068681b7 100644 --- a/docs/dyn/testing_v1.projects.testMatrices.html +++ b/docs/dyn/testing_v1.projects.testMatrices.html @@ -208,6 +208,7 @@

Method Details

"matrixId": "A String", # Output only. Id of the containing TestMatrix. "projectId": "A String", # Output only. The cloud project that owns the test execution. "shard": { # Output only. Details about the shard. # Output only. Details about the shard. + "estimatedShardDuration": "A String", # Output only. The estimated shard duration based on previous test case timing records, if available. "numShards": 42, # Output only. The total number of shards. "shardIndex": 42, # Output only. The index of the shard among all the shards. "testTargetsForShard": { # Test targets for a shard. # Output only. Test targets for each shard. Only set for manual sharding. @@ -245,6 +246,9 @@

Method Details

}, ], }, + "smartSharding": { # Shards test based on previous test case timing records. # Shards test based on previous test case timing records. + "targetedShardDuration": "A String", # The amount of time tests within a shard should take. Default: 300 seconds (5 minutes). The minimum allowed: 120 seconds (2 minutes). The shard count is dynamically set based on time, up to the maximum shard limit (described below). To guarantee at least one test case for each shard, the number of shards will not exceed the number of test cases. Shard duration will be exceeded if: - The maximum shard limit is reached and there is more calculated test time remaining to allocate into shards. - Any individual test is estimated to be longer than the targeted shard duration. Shard duration is not guaranteed because smart sharding uses test case history and default durations which may not be accurate. The rules for finding the test case timing records are: - If the service has seen a test case in the last 30 days, the record of the latest successful one will be used. - For new test cases, the average duration of other known test cases will be used. - If there are no previous test case timing records available, the test case is considered to be 15 seconds long by default. Because the actual shard duration can exceed the targeted shard duration, we recommend setting the targeted value at least 5 minutes less than the maximum allowed test timeout (45 minutes for physical devices and 60 minutes for virtual), or using the custom test timeout value you set. This approach avoids cancelling the shard before all tests can finish. Note that there is a limit for maximum number of shards. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. To guarantee at least one test case for per shard, the number of shards will not exceed the number of test cases. Each shard created will count toward daily test quota. + }, "uniformSharding": { # Uniformly shards test cases given a total number of shards. For instrumentation tests, it will be translated to "-e numShard" and "-e shardIndex" AndroidJUnitRunner arguments. With uniform sharding enabled, specifying either of these sharding arguments via `environment_variables` is invalid. Based on the sharding mechanism AndroidJUnitRunner uses, there is no guarantee that test cases will be distributed uniformly across all shards. # Uniformly shards test cases given a total number of shards. "numShards": 42, # 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 devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. }, @@ -440,6 +444,9 @@

Method Details

}, ], }, + "smartSharding": { # Shards test based on previous test case timing records. # Shards test based on previous test case timing records. + "targetedShardDuration": "A String", # The amount of time tests within a shard should take. Default: 300 seconds (5 minutes). The minimum allowed: 120 seconds (2 minutes). The shard count is dynamically set based on time, up to the maximum shard limit (described below). To guarantee at least one test case for each shard, the number of shards will not exceed the number of test cases. Shard duration will be exceeded if: - The maximum shard limit is reached and there is more calculated test time remaining to allocate into shards. - Any individual test is estimated to be longer than the targeted shard duration. Shard duration is not guaranteed because smart sharding uses test case history and default durations which may not be accurate. The rules for finding the test case timing records are: - If the service has seen a test case in the last 30 days, the record of the latest successful one will be used. - For new test cases, the average duration of other known test cases will be used. - If there are no previous test case timing records available, the test case is considered to be 15 seconds long by default. Because the actual shard duration can exceed the targeted shard duration, we recommend setting the targeted value at least 5 minutes less than the maximum allowed test timeout (45 minutes for physical devices and 60 minutes for virtual), or using the custom test timeout value you set. This approach avoids cancelling the shard before all tests can finish. Note that there is a limit for maximum number of shards. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. To guarantee at least one test case for per shard, the number of shards will not exceed the number of test cases. Each shard created will count toward daily test quota. + }, "uniformSharding": { # Uniformly shards test cases given a total number of shards. For instrumentation tests, it will be translated to "-e numShard" and "-e shardIndex" AndroidJUnitRunner arguments. With uniform sharding enabled, specifying either of these sharding arguments via `environment_variables` is invalid. Based on the sharding mechanism AndroidJUnitRunner uses, there is no guarantee that test cases will be distributed uniformly across all shards. # Uniformly shards test cases given a total number of shards. "numShards": 42, # 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 devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. }, @@ -702,6 +709,7 @@

Method Details

"matrixId": "A String", # Output only. Id of the containing TestMatrix. "projectId": "A String", # Output only. The cloud project that owns the test execution. "shard": { # Output only. Details about the shard. # Output only. Details about the shard. + "estimatedShardDuration": "A String", # Output only. The estimated shard duration based on previous test case timing records, if available. "numShards": 42, # Output only. The total number of shards. "shardIndex": 42, # Output only. The index of the shard among all the shards. "testTargetsForShard": { # Test targets for a shard. # Output only. Test targets for each shard. Only set for manual sharding. @@ -739,6 +747,9 @@

Method Details

}, ], }, + "smartSharding": { # Shards test based on previous test case timing records. # Shards test based on previous test case timing records. + "targetedShardDuration": "A String", # The amount of time tests within a shard should take. Default: 300 seconds (5 minutes). The minimum allowed: 120 seconds (2 minutes). The shard count is dynamically set based on time, up to the maximum shard limit (described below). To guarantee at least one test case for each shard, the number of shards will not exceed the number of test cases. Shard duration will be exceeded if: - The maximum shard limit is reached and there is more calculated test time remaining to allocate into shards. - Any individual test is estimated to be longer than the targeted shard duration. Shard duration is not guaranteed because smart sharding uses test case history and default durations which may not be accurate. The rules for finding the test case timing records are: - If the service has seen a test case in the last 30 days, the record of the latest successful one will be used. - For new test cases, the average duration of other known test cases will be used. - If there are no previous test case timing records available, the test case is considered to be 15 seconds long by default. Because the actual shard duration can exceed the targeted shard duration, we recommend setting the targeted value at least 5 minutes less than the maximum allowed test timeout (45 minutes for physical devices and 60 minutes for virtual), or using the custom test timeout value you set. This approach avoids cancelling the shard before all tests can finish. Note that there is a limit for maximum number of shards. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. To guarantee at least one test case for per shard, the number of shards will not exceed the number of test cases. Each shard created will count toward daily test quota. + }, "uniformSharding": { # Uniformly shards test cases given a total number of shards. For instrumentation tests, it will be translated to "-e numShard" and "-e shardIndex" AndroidJUnitRunner arguments. With uniform sharding enabled, specifying either of these sharding arguments via `environment_variables` is invalid. Based on the sharding mechanism AndroidJUnitRunner uses, there is no guarantee that test cases will be distributed uniformly across all shards. # Uniformly shards test cases given a total number of shards. "numShards": 42, # 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 devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. }, @@ -934,6 +945,9 @@

Method Details

}, ], }, + "smartSharding": { # Shards test based on previous test case timing records. # Shards test based on previous test case timing records. + "targetedShardDuration": "A String", # The amount of time tests within a shard should take. Default: 300 seconds (5 minutes). The minimum allowed: 120 seconds (2 minutes). The shard count is dynamically set based on time, up to the maximum shard limit (described below). To guarantee at least one test case for each shard, the number of shards will not exceed the number of test cases. Shard duration will be exceeded if: - The maximum shard limit is reached and there is more calculated test time remaining to allocate into shards. - Any individual test is estimated to be longer than the targeted shard duration. Shard duration is not guaranteed because smart sharding uses test case history and default durations which may not be accurate. The rules for finding the test case timing records are: - If the service has seen a test case in the last 30 days, the record of the latest successful one will be used. - For new test cases, the average duration of other known test cases will be used. - If there are no previous test case timing records available, the test case is considered to be 15 seconds long by default. Because the actual shard duration can exceed the targeted shard duration, we recommend setting the targeted value at least 5 minutes less than the maximum allowed test timeout (45 minutes for physical devices and 60 minutes for virtual), or using the custom test timeout value you set. This approach avoids cancelling the shard before all tests can finish. Note that there is a limit for maximum number of shards. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. To guarantee at least one test case for per shard, the number of shards will not exceed the number of test cases. Each shard created will count toward daily test quota. + }, "uniformSharding": { # Uniformly shards test cases given a total number of shards. For instrumentation tests, it will be translated to "-e numShard" and "-e shardIndex" AndroidJUnitRunner arguments. With uniform sharding enabled, specifying either of these sharding arguments via `environment_variables` is invalid. Based on the sharding mechanism AndroidJUnitRunner uses, there is no guarantee that test cases will be distributed uniformly across all shards. # Uniformly shards test cases given a total number of shards. "numShards": 42, # 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 devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. }, @@ -1203,6 +1217,7 @@

Method Details

"matrixId": "A String", # Output only. Id of the containing TestMatrix. "projectId": "A String", # Output only. The cloud project that owns the test execution. "shard": { # Output only. Details about the shard. # Output only. Details about the shard. + "estimatedShardDuration": "A String", # Output only. The estimated shard duration based on previous test case timing records, if available. "numShards": 42, # Output only. The total number of shards. "shardIndex": 42, # Output only. The index of the shard among all the shards. "testTargetsForShard": { # Test targets for a shard. # Output only. Test targets for each shard. Only set for manual sharding. @@ -1240,6 +1255,9 @@

Method Details

}, ], }, + "smartSharding": { # Shards test based on previous test case timing records. # Shards test based on previous test case timing records. + "targetedShardDuration": "A String", # The amount of time tests within a shard should take. Default: 300 seconds (5 minutes). The minimum allowed: 120 seconds (2 minutes). The shard count is dynamically set based on time, up to the maximum shard limit (described below). To guarantee at least one test case for each shard, the number of shards will not exceed the number of test cases. Shard duration will be exceeded if: - The maximum shard limit is reached and there is more calculated test time remaining to allocate into shards. - Any individual test is estimated to be longer than the targeted shard duration. Shard duration is not guaranteed because smart sharding uses test case history and default durations which may not be accurate. The rules for finding the test case timing records are: - If the service has seen a test case in the last 30 days, the record of the latest successful one will be used. - For new test cases, the average duration of other known test cases will be used. - If there are no previous test case timing records available, the test case is considered to be 15 seconds long by default. Because the actual shard duration can exceed the targeted shard duration, we recommend setting the targeted value at least 5 minutes less than the maximum allowed test timeout (45 minutes for physical devices and 60 minutes for virtual), or using the custom test timeout value you set. This approach avoids cancelling the shard before all tests can finish. Note that there is a limit for maximum number of shards. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. To guarantee at least one test case for per shard, the number of shards will not exceed the number of test cases. Each shard created will count toward daily test quota. + }, "uniformSharding": { # Uniformly shards test cases given a total number of shards. For instrumentation tests, it will be translated to "-e numShard" and "-e shardIndex" AndroidJUnitRunner arguments. With uniform sharding enabled, specifying either of these sharding arguments via `environment_variables` is invalid. Based on the sharding mechanism AndroidJUnitRunner uses, there is no guarantee that test cases will be distributed uniformly across all shards. # Uniformly shards test cases given a total number of shards. "numShards": 42, # 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 devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. }, @@ -1435,6 +1453,9 @@

Method Details

}, ], }, + "smartSharding": { # Shards test based on previous test case timing records. # Shards test based on previous test case timing records. + "targetedShardDuration": "A String", # The amount of time tests within a shard should take. Default: 300 seconds (5 minutes). The minimum allowed: 120 seconds (2 minutes). The shard count is dynamically set based on time, up to the maximum shard limit (described below). To guarantee at least one test case for each shard, the number of shards will not exceed the number of test cases. Shard duration will be exceeded if: - The maximum shard limit is reached and there is more calculated test time remaining to allocate into shards. - Any individual test is estimated to be longer than the targeted shard duration. Shard duration is not guaranteed because smart sharding uses test case history and default durations which may not be accurate. The rules for finding the test case timing records are: - If the service has seen a test case in the last 30 days, the record of the latest successful one will be used. - For new test cases, the average duration of other known test cases will be used. - If there are no previous test case timing records available, the test case is considered to be 15 seconds long by default. Because the actual shard duration can exceed the targeted shard duration, we recommend setting the targeted value at least 5 minutes less than the maximum allowed test timeout (45 minutes for physical devices and 60 minutes for virtual), or using the custom test timeout value you set. This approach avoids cancelling the shard before all tests can finish. Note that there is a limit for maximum number of shards. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. To guarantee at least one test case for per shard, the number of shards will not exceed the number of test cases. Each shard created will count toward daily test quota. + }, "uniformSharding": { # Uniformly shards test cases given a total number of shards. For instrumentation tests, it will be translated to "-e numShard" and "-e shardIndex" AndroidJUnitRunner arguments. With uniform sharding enabled, specifying either of these sharding arguments via `environment_variables` is invalid. Based on the sharding mechanism AndroidJUnitRunner uses, there is no guarantee that test cases will be distributed uniformly across all shards. # Uniformly shards test cases given a total number of shards. "numShards": 42, # 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 devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. }, diff --git a/googleapiclient/discovery_cache/documents/testing.v1.json b/googleapiclient/discovery_cache/documents/testing.v1.json index 92d65c506cb..6434ab27d5a 100644 --- a/googleapiclient/discovery_cache/documents/testing.v1.json +++ b/googleapiclient/discovery_cache/documents/testing.v1.json @@ -282,7 +282,7 @@ } } }, - "revision": "20230411", + "revision": "20230519", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -778,6 +778,13 @@ "description": "Full Java-style package name for this application, e.g. \"com.example.foo\".", "type": "string" }, + "services": { + "description": "Services contained in the tag.", + "items": { + "$ref": "Service" + }, + "type": "array" + }, "targetSdkVersion": { "description": "Specifies the API Level on which the application is designed to run.", "format": "int32", @@ -1692,23 +1699,50 @@ }, "type": "object" }, + "Service": { + "description": "The section of an tag. https://developer.android.com/guide/topics/manifest/service-element", + "id": "Service", + "properties": { + "intentFilter": { + "description": "Intent filters in the service", + "items": { + "$ref": "IntentFilter" + }, + "type": "array" + }, + "name": { + "description": "The android:name value", + "type": "string" + } + }, + "type": "object" + }, "Shard": { "description": "Output only. Details about the shard.", "id": "Shard", "properties": { + "estimatedShardDuration": { + "description": "Output only. The estimated shard duration based on previous test case timing records, if available.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, "numShards": { "description": "Output only. The total number of shards.", "format": "int32", + "readOnly": true, "type": "integer" }, "shardIndex": { "description": "Output only. The index of the shard among all the shards.", "format": "int32", + "readOnly": true, "type": "integer" }, "testTargetsForShard": { "$ref": "TestTargetsForShard", - "description": "Output only. Test targets for each shard. Only set for manual sharding." + "description": "Output only. Test targets for each shard. Only set for manual sharding.", + "readOnly": true } }, "type": "object" @@ -1721,6 +1755,10 @@ "$ref": "ManualSharding", "description": "Shards test cases into the specified groups of packages, classes, and/or methods." }, + "smartSharding": { + "$ref": "SmartSharding", + "description": "Shards test based on previous test case timing records." + }, "uniformSharding": { "$ref": "UniformSharding", "description": "Uniformly shards test cases given a total number of shards." @@ -1728,6 +1766,18 @@ }, "type": "object" }, + "SmartSharding": { + "description": "Shards test based on previous test case timing records.", + "id": "SmartSharding", + "properties": { + "targetedShardDuration": { + "description": "The amount of time tests within a shard should take. Default: 300 seconds (5 minutes). The minimum allowed: 120 seconds (2 minutes). The shard count is dynamically set based on time, up to the maximum shard limit (described below). To guarantee at least one test case for each shard, the number of shards will not exceed the number of test cases. Shard duration will be exceeded if: - The maximum shard limit is reached and there is more calculated test time remaining to allocate into shards. - Any individual test is estimated to be longer than the targeted shard duration. Shard duration is not guaranteed because smart sharding uses test case history and default durations which may not be accurate. The rules for finding the test case timing records are: - If the service has seen a test case in the last 30 days, the record of the latest successful one will be used. - For new test cases, the average duration of other known test cases will be used. - If there are no previous test case timing records available, the test case is considered to be 15 seconds long by default. Because the actual shard duration can exceed the targeted shard duration, we recommend setting the targeted value at least 5 minutes less than the maximum allowed test timeout (45 minutes for physical devices and 60 minutes for virtual), or using the custom test timeout value you set. This approach avoids cancelling the shard before all tests can finish. Note that there is a limit for maximum number of shards. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. To guarantee at least one test case for per shard, the number of shards will not exceed the number of test cases. Each shard created will count toward daily test quota.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "StartActivityIntent": { "description": "A starting intent specified by an action, uri, and categories.", "id": "StartActivityIntent",