Show / Hide Table of Contents

Class AndroidInstrumentationTest

The configuration of an Android instrumentation test. See https://developer.android.com/training/testing/instrumented-tests for more information on Android instrumentation tests.

Inheritance
object
AndroidInstrumentationTest
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.DeviceRun.v1alpha.Data
Assembly: Google.Apis.DeviceRun.v1alpha.dll
Syntax
public class AndroidInstrumentationTest : IDirectResponseSchema

Properties

AdditionalTestOptions

Optional. Additional test options to pass to the test runner. Passed to am instrument command as -e options, which will be passed to the instrumentation test runner using its onCreate() method. Formats supported in test_targets are not allowed to be used here. Limits: - Maximum number of entries: 32. - Maximum key size: 64 bytes (UTF-8). - Maximum value size: 1024 bytes (UTF-8).

Declaration
[JsonProperty("additionalTestOptions")]
public virtual IDictionary<string, string> AdditionalTestOptions { get; set; }
Property Value
Type Description
IDictionary<string, string>

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

EnableCodeCoverage

Optional. Whether to enable code coverage collection for the test. A coverage file coverage.ec will be uploaded to the results folder. For this to work, your classes have to be instrumented offline (build time) by EMMA/JaCoCo.

Declaration
[JsonProperty("enableCodeCoverage")]
public virtual bool? EnableCodeCoverage { get; set; }
Property Value
Type Description
bool?

InstrumentationTimeout

Optional. The timeout of the instrumentation test. Default value: 5 min. Range: [1 min, 3 hours].

Declaration
[JsonProperty("instrumentationTimeout")]
public virtual object InstrumentationTimeout { get; set; }
Property Value
Type Description
object

OrchestratorVersion

Optional. The version of the Android Test Orchestrator to use for the test. The available orchestrator versions can be retrieved from the catalog service. If set to "auto", the default orchestrator is used. If not set, no orchestrator is used.

Declaration
[JsonProperty("orchestratorVersion")]
public virtual string OrchestratorVersion { get; set; }
Property Value
Type Description
string

SmartSharding

Optional. Smart sharding strategy to split the job into multiple shards based on the test methods and their execution time.

Declaration
[JsonProperty("smartSharding")]
public virtual AndroidInstrumentationTestSmartSharding SmartSharding { get; set; }
Property Value
Type Description
AndroidInstrumentationTestSmartSharding

TestInstallable

Required. The test package to install and run the test.

Declaration
[JsonProperty("testInstallable")]
public virtual AndroidInstallable TestInstallable { get; set; }
Property Value
Type Description
AndroidInstallable

TestRunnerClass

Optional. Full class name of the test runner class. The class must be androidx.test.runner.AndroidJUnitRunner or a subclass of it. The default value is determined by examining the application's manifest. If multiple instrumentations are found, the first one in the manifest will be used.

Declaration
[JsonProperty("testRunnerClass")]
public virtual string TestRunnerClass { get; set; }
Property Value
Type Description
string

TestTargets

Optional. A list of test targets or target filters to run. Each target must be fully qualified with the package name or class name, in one of these formats: - package package_name - notPackage com.package.to.skip - class package_name.class_name - class package_name.class_name#method_name - notClass com.foo.ClassToSkip - notClass com.foo.ClassName#testMethodToSkip - annotation com.foo.AnnotationToRun - notAnnotation com.foo.AnnotationToSkip - size [small|medium|large] Formats like testfile or notTestfile won't be supported. If empty, all targets in the module will be run. Limits: - Maximum number of entries: 1024.

Declaration
[JsonProperty("testTargets")]
public virtual IList<string> TestTargets { get; set; }
Property Value
Type Description
IList<string>

UniformSharding

Optional. Uniform sharding strategy to split the job into multiple shards with equal number of test methods.

Declaration
[JsonProperty("uniformSharding")]
public virtual AndroidInstrumentationTestUniformSharding UniformSharding { get; set; }
Property Value
Type Description
AndroidInstrumentationTestUniformSharding

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX