Sha256: 66ee55853459045328d152f5da8ebc1090a40a5fdee6cc3e28eeb6e6123b745c

Contents?: true

Size: 764 Bytes

Versions: 11

Compression:

Stored size: 764 Bytes

Contents

require_relative 'dryrun_utils'
require_relative 'android_utils'

module Dryrun
  class TestApplicationCommand

    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

    def get_execution_command_line(package)
      "adb shell am instrument -w #{package}"
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
dryrun-1.3.2 lib/dryrun/test_application_command.rb
dryrun-1.3.0 lib/dryrun/test_application_command.rb
dryrun-1.2.1 lib/dryrun/test_application_command.rb
dryrun-1.2.0 lib/dryrun/test_application_command.rb
dryrun-1.1.6 lib/dryrun/test_application_command.rb
dryrun-1.1.5 lib/dryrun/test_application_command.rb
dryrun-1.1.4 lib/dryrun/test_application_command.rb
dryrun-1.1.3 lib/dryrun/test_application_command.rb
dryrun-1.1.2 lib/dryrun/test_application_command.rb
dryrun-1.1.1 lib/dryrun/test_application_command.rb
dryrun-1.1.0 lib/dryrun/test_application_command.rb