Module: ADB::Instrumentation

Included in:
ADB
Defined in:
lib/ADB/instrumentation.rb

Instance Method Summary collapse

Instance Method Details

#instrument(runner, args = {}) ⇒ Object

send instrumentation requests

Examples:

instrument "com.example/android.test.InstrumentationTestRunner"
# will run all of the tests within the 'com.example' package using the 'android.test.InstrumentationTestRunner'
instrument "com.example/android.test.InstrumentationTestRunner", :class => "com.example.test.SomeTestClass"

# will execute all of the tests within 'com.example.test.SomeTestClass'

Parameters:

  • runner (String)

    indicates the package/runner to instrument

  • collection (Hash)

    of key/value pairs to be sent as arguments to the instrumentation runner

Raises:



20
21
22
23
# File 'lib/ADB/instrumentation.rb', line 20

def instrument(runner, args = {})
  with(the(args) << using_the(runner))
  raise ADBError, last_stdout unless last_stdout.empty?
end