Class: Dryrun::TestApplicationCommand
- Inherits:
-
Object
- Object
- Dryrun::TestApplicationCommand
- Defined in:
- lib/dryrun/test_application_command.rb
Instance Method Summary collapse
- #get_execution_command_line(package) ⇒ Object
- #run(builder, package, launcher_activity, custom_module, flavour, device) ⇒ Object
Instance Method Details
#get_execution_command_line(package) ⇒ Object
24 25 26 |
# File 'lib/dryrun/test_application_command.rb', line 24 def get_execution_command_line(package) "adb shell am instrument -w #{package}" end |
#run(builder, package, launcher_activity, custom_module, flavour, device) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/dryrun/test_application_command.rb', line 7 def run(builder, package, launcher_activity, custom_module, flavour, device) execute_line = get_execution_command_line(package) builder.clean if device.nil? puts 'No devices picked/available, proceeding with unit tests instead'.green builder.run_unit_tests(custom_module, flavour) else builder.run_android_tests(custom_module, flavour) end unless device.nil? AndroidUtils.clear_app_data(package) AndroidUtils.pretty_run(execute_line, package) end end |