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 http://developer.android.com/tools/testing/testing_android.html for more information on types of Android tests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AndroidInstrumentationTest

Returns a new instance of AndroidInstrumentationTest



222
223
224
# File 'generated/google/apis/testing_v1/classes.rb', line 222

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



162
163
164
# File 'generated/google/apis/testing_v1/classes.rb', line 162

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



170
171
172
# File 'generated/google/apis/testing_v1/classes.rb', line 170

def app_bundle
  @app_bundle
end

#app_package_idString

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

Returns:

  • (String)


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

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

Returns:

  • (String)


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

def orchestrator_option
  @orchestrator_option
end

#test_apkGoogle::Apis::TestingV1::FileReference

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



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

def test_apk
  @test_apk
end

#test_package_idString

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

Returns:

  • (String)


204
205
206
# File 'generated/google/apis/testing_v1/classes.rb', line 204

def test_package_id
  @test_package_id
end

#test_runner_classString

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

Returns:

  • (String)


210
211
212
# File 'generated/google/apis/testing_v1/classes.rb', line 210

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

Returns:

  • (Array<String>)


220
221
222
# File 'generated/google/apis/testing_v1/classes.rb', line 220

def test_targets
  @test_targets
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



227
228
229
230
231
232
233
234
235
236
# File 'generated/google/apis/testing_v1/classes.rb', line 227

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)
  @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