def test_multiple_apk_true(self):
     comm.setUp()
     app_name = "testMultipleApk"
     pkg_name = " com.example." + app_name.lower()
     content = "<a href='http://www.intel.com'>Intel</a>\n</body>"
     key = "</body>"
     replace_index_list = [key, content]
     comm.create(
         app_name,
         pkg_name,
         comm.MODE,
         None,
         replace_index_list,
         self, None, "true")
     comm.build(app_name, False, self)
     apk_name_arch = "armv7"
     if comm.ARCH == "x86":
         apk_name_arch = "x86"
     apk_path = os.path.join(os.getcwd(), "android-%s-debug.apk" % apk_name_arch)
     if not os.path.exists(apk_path):
         apk_path = os.path.join(os.getcwd(), "%s-%s-debug.apk" % (app_name, apk_name_arch))
     print apk_path
     self.assertTrue(os.path.exists(apk_path))
     comm.do_copy(apk_path, os.path.join(comm.testapp_path, "%s.apk" % app_name))
     comm.app_install(app_name, pkg_name, self)
     comm.app_launch(app_name, pkg_name, self)
     comm.app_uninstall(pkg_name, self)
     comm.app_stop(pkg_name, self)
    def test_stop(self):
        app_name = "testapp"
        pkg_name = "org.xwalk." + app_name

        if not comm.checkInstalled(pkg_name):
            comm.app_install(app_name, pkg_name, self)
        comm.app_launch(app_name, pkg_name, self)
        comm.app_stop(self)
Exemplo n.º 3
0
    def test_stop(self):
        app_name = "testapp"
        pkg_name = "org.xwalk." + app_name

        if not comm.checkInstalled(pkg_name):
            comm.app_install(app_name, pkg_name, self)
        comm.app_launch(app_name, pkg_name, self)
        comm.app_stop(self)
Exemplo n.º 4
0
 def test_close(self):
     comm.setUp()
     app_name = "Eh"
     pkg_name = "com.mmocny.eh.app"
     if not comm.check_app_installed(pkg_name, self):
         comm.app_install(app_name, pkg_name, self)
     if not comm.check_app_launched(pkg_name, self):
         print "Close app ---------------->%s App haven't launched, need to launch it!" % app_name
         comm.app_launch(app_name, pkg_name, self)
         time.sleep(1)
     comm.app_stop(pkg_name, self)
Exemplo n.º 5
0
 def test_close(self):
     comm.setUp()
     app_name = "gallery"
     pkg_name = "com.example." + app_name.lower()
     if not comm.check_app_installed(pkg_name, self):
         comm.app_install(app_name, pkg_name, self)
     if not comm.check_app_launched(pkg_name, self):
         print "Close app ---------------->%s App haven't launched, need to launch it!" % app_name
         comm.app_launch(app_name, pkg_name, self)
         time.sleep(1)
     comm.app_stop(pkg_name, self)
Exemplo n.º 6
0
 def test_close(self):
     comm.setUp()
     app_name = "CIRC"
     pkg_name = "com.github.flackr.Circ"
     if not comm.check_app_installed(pkg_name, self):
         comm.app_install(app_name, pkg_name, self)
     if not comm.check_app_launched(pkg_name, self):
         print "Close app ---------------->%s App haven't launched, need to launch it!" % app_name
         comm.app_launch(app_name, pkg_name, self)
         time.sleep(1)
     comm.app_stop(pkg_name, self)
 def test_build(self):
     comm.setUp()
     app_name = "Demo"
     pkg_name = "com.example.demo"
     comm.create(app_name, pkg_name, self)
     comm.build_gradle(app_name, False, False, self)
     comm.app_install(app_name, pkg_name, self)
     comm.app_launch(app_name, pkg_name, self)
     self.assertTrue(comm.check_app_launched(pkg_name, self))
     comm.app_stop(pkg_name, self)
     comm.app_uninstall(pkg_name, self)
 def test_build(self):
     comm.setUp()
     app_name = "Demo"
     pkg_name = "com.example.demo"
     comm.create(app_name, pkg_name, self)
     comm.build_maven(app_name, pkg_name, True, self)
     comm.app_install(app_name, pkg_name, self)
     comm.app_launch(app_name, pkg_name, self)
     self.assertTrue(comm.check_app_launched(pkg_name, self))
     comm.app_stop(pkg_name, self)
     comm.app_uninstall(pkg_name, self)
 def test_close(self):
     comm.setUp()
     app_name = "mobilespec"
     pkg_name = "org.apache." + app_name.lower()
     if not comm.check_app_installed(pkg_name, self):
         comm.app_install(app_name, pkg_name, self)
     if not comm.check_app_launched(pkg_name, self):
         print "Close app ---------------->%s App haven't launched, need to launch it!" % app_name
         comm.app_launch(app_name, pkg_name, self)
         time.sleep(1)
     comm.app_stop(pkg_name, self)
Exemplo n.º 10
0
 def test_close(self):
     comm.setUp()
     app_name = "CIRC"
     pkg_name = "com.github.flackr.Circ"
     if not comm.check_app_installed(pkg_name, self):
         comm.app_install(app_name, pkg_name, self)
     if not comm.check_app_launched(pkg_name, self):
         print "Close app ---------------->%s App haven't launched, need to launch it!" % app_name
         comm.app_launch(app_name, pkg_name, self)
         time.sleep(1)
     comm.app_stop(pkg_name, self)
 def test_close(self):
     comm.setUp()
     app_name = "helloworld"
     pkg_name = "com.example." + app_name.lower()
     if not comm.check_app_installed(pkg_name, self):
         comm.app_install(app_name, pkg_name, self)
     if not comm.check_app_launched(pkg_name, self):
         print "Close app ---------------->%s App haven't launched, need to launch it!" % app_name
         comm.app_launch(app_name, pkg_name, self)
         time.sleep(1)
     comm.app_stop(pkg_name, self)
Exemplo n.º 12
0
    def test_stop(self):
        comm.setUp()
        app_name = "Sysapps"
        # Find whether the app have launched
        cmdacti = "adb -s " + comm.device + " shell dumpsys activity activities | grep org.xwalk.%s" % app_name.lower()
        launched = commands.getstatusoutput(cmdacti)
        if launched[0] != 0:
            print "Stop APK ---------------->%s App haven't launched, need to launch it!" % app_name
	    cmdstart = "adb -s " + comm.device + " shell am start -n org.xwalk.%s/.%sActivity" % \
            (app_name.lower(), app_name)
            comm.app_launch(cmdstart, self)
            time.sleep(1)
        cmdstop = "adb -s " + comm.device + " shell am force-stop org.xwalk.%s" % app_name.lower()
        comm.app_stop(cmdstop, self)
Exemplo n.º 13
0
 def test_mode_lite(self):
     comm.setUp()
     app_name = "modeLite"
     pkg_name = " com.example." + app_name.lower()
     comm.create(app_name, pkg_name, comm.MODE, None, None, self, None, None)
     project_root = os.path.join(comm.tool_path, app_name)
     comm.replace_key(os.path.join(project_root, 'config.xml'),
             '<preference name="xwalkMode" value="lite"',
             '<preference name="xwalkMode" value="embedded"')
     comm.build(app_name, 0, self, True)
     comm.app_install(app_name, pkg_name, self)
     comm.app_launch(app_name, pkg_name, self)
     comm.app_stop(pkg_name, self)
     comm.app_uninstall(pkg_name, self)
Exemplo n.º 14
0
 def test_mode_lite(self):
     comm.setUp()
     app_name = "modeLite"
     pkg_name = " com.example." + app_name.lower()
     comm.create(app_name, pkg_name, comm.MODE, None, None, self, None,
                 None)
     project_root = os.path.join(comm.tool_path, app_name)
     comm.replace_key(os.path.join(project_root, 'config.xml'),
                      '<preference name="xwalkMode" value="lite"',
                      '<preference name="xwalkMode" value="embedded"')
     comm.build(app_name, 0, self, True)
     comm.app_install(app_name, pkg_name, self)
     comm.app_launch(app_name, pkg_name, self)
     comm.app_stop(pkg_name, self)
     comm.app_uninstall(pkg_name, self)
 def test_multiple_apk_true(self):
     comm.setUp()
     app_name = "testMultipleApk"
     pkg_name = " com.example." + app_name.lower()
     content = "<a href='http://www.intel.com'>Intel</a>\n</body>"
     key = "</body>"
     replace_index_list = [key, content]
     comm.create(app_name, pkg_name, comm.MODE, None, replace_index_list,
                 self, None, "true")
     comm.build(app_name, 0, self, True)
     comm.checkFileSize(
         os.path.join(comm.testapp_path, "%s.apk" % app_name), 10, 15, self)
     comm.app_install(app_name, pkg_name, self)
     comm.app_launch(app_name, pkg_name, self)
     comm.app_stop(pkg_name, self)
     comm.app_uninstall(pkg_name, self)
Exemplo n.º 16
0
 def test_close(self):
     comm.setUp()
     app_name = "gallery"
     pkg_name = "com.example." + app_name.lower()
     if not comm.check_app_installed(pkg_name, self):
         comm.app_install(app_name, pkg_name, self)
     # Find whether the app have launched
     cmd_acti = "adb -s " + comm.device + " shell ps | grep %s" % pkg_name
     launched = commands.getstatusoutput(cmd_acti)
     if launched[0] != 0:
         print "Close app ---------------->%s App haven't launched, need to launch it!" % app_name
         cmd_start = "adb -s " + comm.device + " shell am start -n %s/.%s" % (pkg_name, app_name)
         comm.app_launch(cmd_start, self)
         time.sleep(1)
     cmd_close = "adb -s " + comm.device + " shell am force-stop %s" % pkg_name
     comm.app_stop(cmd_close, self)
Exemplo n.º 17
0
 def test_stop(self):
     comm.setUp()
     app_name = "Webrtc"
     # Find whether the app have launched
     cmdacti = "adb -s " + comm.device + " shell dumpsys activity activities | grep org.xwalk.%s" % app_name.lower(
     )
     launched = commands.getstatusoutput(cmdacti)
     if launched[0] != 0:
         print "Stop APK ---------------->%s App haven't launched, need to launch it!" % app_name
         cmdstart = "adb -s " + comm.device + " shell am start -n org.xwalk.%s/.%sActivity" % \
                (app_name.lower(), app_name)
         comm.app_launch(cmdstart, self)
         time.sleep(1)
     cmdstop = "adb -s " + comm.device + " shell am force-stop org.xwalk.%s" % app_name.lower(
     )
     comm.app_stop(cmdstop, self)
Exemplo n.º 18
0
 def test_close(self):
     comm.setUp()
     app_name = "gallery"
     pkg_name = "com.example." + app_name.lower()
     if not comm.check_app_installed(pkg_name, self):
         comm.app_install(app_name, pkg_name, self)
     # Find whether the app have launched
     cmd_acti = "adb -s " + comm.device + " shell ps | grep %s" % pkg_name
     launched = commands.getstatusoutput(cmd_acti)
     if launched[0] != 0:
         print "Close app ---------------->%s App haven't launched, need to launch it!" % app_name
         cmd_start = "adb -s " + comm.device + " shell am start -n %s/.%s" % (
             pkg_name, app_name)
         comm.app_launch(cmd_start, self)
         time.sleep(1)
     cmd_close = "adb -s " + comm.device + " shell am force-stop %s" % pkg_name
     comm.app_stop(cmd_close, self)
 def test_stop(self):
     comm.setUp()
     comm.check_appname()
     # Find whether the app have launched
     cmdacti = "adb -s " + comm.device + \
         " shell dumpsys activity activities | grep "\
         "org.crosswalkproject.sample"
     launched = commands.getstatusoutput(cmdacti)
     if launched[0] != 0:
         print "Stop APK ---------------->%s App haven't launched,"\
         " need to launch it!" % comm.app_name
         cmdstart = "adb -s " + comm.device + " shell am start -n "\
         "org.crosswalkproject.sample/.%sActivity" % comm.app_name
         comm.app_launch(cmdstart, self)
         time.sleep(1)
     cmdstop = "adb -s " + comm.device + \
         " shell am force-stop org.crosswalkproject.sample"
     comm.app_stop(cmdstop, self)
 def test_multiple_apk_false(self):
     comm.setUp()
     app_name = "testMultipleApk"
     pkg_name = " com.example." + app_name.lower()
     content = "<a href='http://www.intel.com'>Intel</a>\n</body>"
     key = "</body>"
     replace_index_list = [key, content]
     comm.create(
         app_name,
         pkg_name,
         comm.MODE,
         None,
         replace_index_list,
         self, None, "false")
     comm.build(app_name, 0, self, True, False)
     comm.checkFileSize(os.path.join(comm.testapp_path, "%s.apk" % app_name), 20, 25, self)
     comm.app_install(app_name, pkg_name, self)
     comm.app_launch(app_name, pkg_name, self)
     comm.app_stop(pkg_name, self)
     comm.app_uninstall(pkg_name, self)