Class: Google::Apis::TestingV1::AndroidInstrumentationTest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/testing_v1/classes.rb,
generated/google/apis/testing_v1/representations.rb,
generated/google/apis/testing_v1/representations.rb

Overview

A test of an Android application that can control an Android component independently of its normal lifecycle. Android instrumentation tests run an application APK and test APK inside the same process on a virtual or physical AndroidDevice. They also specify a test runner class, such as com.google. GoogleTestRunner, which can vary on the specific instrumentation framework chosen. See for more information on types of Android tests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AndroidInstrumentationTest

Returns a new instance of AndroidInstrumentationTest.



208
209
210
# File 'generated/google/apis/testing_v1/classes.rb', line 208

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#app_apkGoogle::Apis::TestingV1::FileReference

A reference to a file, used for user inputs. Corresponds to the JSON property appApk



152
153
154
# File 'generated/google/apis/testing_v1/classes.rb', line 152

def app_apk
  @app_apk
end

#app_bundleGoogle::Apis::TestingV1::AppBundle

An Android App Bundle file format, containing a BundleConfig.pb file, a base module directory, zero or more dynamic feature module directories. See https:// developer.android.com/guide/app-bundle/build for guidance on building App Bundles. Corresponds to the JSON property appBundle



160
161
162
# File 'generated/google/apis/testing_v1/classes.rb', line 160

def app_bundle
  @app_bundle
end

#app_package_idString

The java package for the application under test. The default value is determined by examining the application's manifest. Corresponds to the JSON property appPackageId

Returns:

  • (String)


166
167
168
# File 'generated/google/apis/testing_v1/classes.rb', line 166

def app_package_id
  @app_package_id
end

#orchestrator_optionString

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. If not set, the test will be run without the orchestrator. Corresponds to the JSON property orchestratorOption

Returns:

  • (String)


176
177
178
# File 'generated/google/apis/testing_v1/classes.rb', line 176

def orchestrator_option
  @orchestrator_option
end

#sharding_optionGoogle::Apis::TestingV1::ShardingOption

Options for enabling sharding. Corresponds to the JSON property shardingOption



181
182
183
# File 'generated/google/apis/testing_v1/classes.rb', line 181

def sharding_option
  @sharding_option
end

#test_apkGoogle::Apis::TestingV1::FileReference

A reference to a file, used for user inputs. Corresponds to the JSON property testApk



186
187
188
# File 'generated/google/apis/testing_v1/classes.rb', line 186

def test_apk
  @test_apk
end

#test_package_idString

The java package for the test to be executed. The default value is determined by examining the application's manifest. Corresponds to the JSON property testPackageId

Returns:

  • (String)


192
193
194
# File 'generated/google/apis/testing_v1/classes.rb', line 192

def test_package_id
  @test_package_id
end

#test_runner_classString

The InstrumentationTestRunner class. The default value is determined by examining the application's manifest. Corresponds to the JSON property testRunnerClass

Returns:

  • (String)


198
199
200
# File 'generated/google/apis/testing_v1/classes.rb', line 198

def test_runner_class
  @test_runner_class
end

#test_targetsArray<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" If empty, all targets in the module will be run. Corresponds to the JSON property testTargets

Returns:

  • (Array<String>)


206
207
208
# File 'generated/google/apis/testing_v1/classes.rb', line 206

def test_targets
  @test_targets
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



213
214
215
216
217
218
219
220
221
222
223
# File 'generated/google/apis/testing_v1/classes.rb', line 213

def update!(**args)
  @app_apk = args[:app_apk] if args.key?(:app_apk)
  @app_bundle = args[:app_bundle] if args.key?(:app_bundle)
  @app_package_id = args[:app_package_id] if args.key?(:app_package_id)
  @orchestrator_option = args[:orchestrator_option] if args.key?(:orchestrator_option)
  @sharding_option = args[:sharding_option] if args.key?(:sharding_option)
  @test_apk = args[:test_apk] if args.key?(:test_apk)
  @test_package_id = args[:test_package_id] if args.key?(:test_package_id)
  @test_runner_class = args[:test_runner_class] if args.key?(:test_runner_class)
  @test_targets = args[:test_targets] if args.key?(:test_targets)
end