Sha256: 0911f8e10aa0f714de9d7c7f9f943261164b11c674b753fa29e59e6ef8248701
Contents?: true
Size: 860 Bytes
Versions: 4
Compression:
Stored size: 860 Bytes
Contents
module Acouchi class TestRunner def initialize configuration @configuration = configuration end def start apk_installer = ApkInstaller.new(@configuration) apk_installer.uninstall_apk apk_installer.install_apk ProcessLauncher.new(Executables.adb, "forward", "tcp:7103", "tcp:7103").start_and_crash_if_process_fails @test_runner_process = ProcessLauncher.new(Executables.adb, "shell", "am", "instrument", "-w", "#{@configuration.target_package}/android.test.InstrumentationTestRunner") @test_runner_process.start_in_background while ready? == false sleep 0.1 end end def stop HTTParty.get("http://127.0.0.1:7103/finish") rescue nil end private def ready? HTTParty.get("http://127.0.0.1:7103/").body == "Acouchi" rescue false end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
acouchi-0.0.8 | lib/acouchi/test_runner.rb |
acouchi-0.0.7 | lib/acouchi/test_runner.rb |
acouchi-0.0.6 | lib/acouchi/test_runner.rb |
acouchi-0.0.5 | lib/acouchi/test_runner.rb |