Exemple #1
0
 def test_06_kill_process(self):
     if not Adb.is_application_installed(self.emu.id, "com.wdiodemoapp"):
         Adb.install(self.apk_path, self.emu.id)
     Adb.start_application(self.emu.id, "com.wdiodemoapp")
     time.sleep(5)
     Adb.kill_process(self.emu.id, "com.wdiodemoapp")
     time.sleep(5)
     service_info = Adb.get_active_services(self.emu.id, "com.wdiodemoapp").replace("\r", "").replace("\n", "")
     pid = Adb.get_process_pid(self.emu.id, "com.wdiodemoapp")
     assert pid == "", "Application not killed! PID " + pid
     error_message = "Service is not killed. Log: " + service_info
     assert service_info == "ACTIVITY MANAGER SERVICES (dumpsys activity services)  (nothing)", error_message
Exemple #2
0
 def test_03_get_active_services(self):
     services = Adb.get_active_services(self.emu.id)
     assert "ACTIVITY MANAGER SERVICES" in services