示例#1
0
 def test_uninstall(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)
     comm.app_uninstall(pkg_name, self)
 def test_uninstall(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)
     comm.app_uninstall(pkg_name, self)
 def test_uninstall(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)
     comm.app_uninstall(pkg_name, self)
    def test_uninstall_withAppRunning(self):
        comm.setUp()
        app_name = "Hangonman"
        cmdfind = "adb -s " + comm.device + \
            " shell pm list packages |grep org.xwalk.%s" % (app_name.lower())
        # print "cmdfind: ", cmdfind
        pmstatus = commands.getstatusoutput(cmdfind)
        # print "pmstatus: ", pmstatus

        if pmstatus[0] != 0:
            print "Uninstall APK ----------------> %s App haven't installed, need to install it!" % app_name
            os.chdir(comm.const_path + "/../testapp/")
            apk_file = commands.getstatusoutput("ls | grep %s" % app_name)[1]
            cmdinst = "adb -s " + comm.device + " install -r " + apk_file
            comm.app_install(cmdinst, cmdfind, self)

        # Make sure the app is running
        cmd = "adb -s " + comm.device + " shell am start -n org.xwalk.%s/.%sActivity" % \
            (app_name.lower(), app_name)
        comm.app_launch(cmd, self)
        time.sleep(2)

        # Uninstall the app
        cmduninst = "adb -s " + comm.device + \
            " uninstall org.xwalk.%s" % (app_name.lower())
        comm.app_uninstall(cmduninst, self)
示例#5
0
 def test_uninstall(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)
     comm.app_uninstall(pkg_name, self)
    def test_uninstall(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_uninstall(app_name, pkg_name, self)
示例#7
0
    def test_uninstall(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_uninstall(app_name, 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, 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_uninstall(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)
     comm.app_uninstall(pkg_name, self)
    def test_uninstall_withAppRunning(self):
        comm.setUp()
        app_name = "Gallery"
        cmdfind = "adb -s " + comm.device + " shell pm list packages |grep org.xwalk.%s" % (
            app_name.lower())
        #print "cmdfind: ", cmdfind
        pmstatus = commands.getstatusoutput(cmdfind)
        #print "pmstatus: ", pmstatus

        if pmstatus[0] != 0:
            print "Uninstall APK ----------------> %s App haven't installed, need to install it!" % app_name
            os.chdir(comm.const_path + "/../testapp/")
            apk_file = commands.getstatusoutput("ls | grep %s" % app_name)[1]
            cmdinst = "adb -s " + comm.device + " install -r " + apk_file
            comm.app_install(cmdinst, cmdfind, self)

        # Make sure the app is running
        cmd = "adb -s " + comm.device + " shell am start -n org.xwalk.%s/.%sActivity" % \
        (app_name.lower(), app_name)
        comm.app_launch(cmd, self)
        time.sleep(2)

        # Uninstall the app
        cmduninst = "adb -s " + comm.device + " uninstall org.xwalk.%s" % (
            app_name.lower())
        comm.app_uninstall(cmduninst, self)
示例#11
0
 def test_uninstall(self):
     comm.setUp()
     app_name = "spacedodge"
     pkg_name = "com.example." + app_name.lower()
     if not comm.check_app_installed(pkg_name, self):
         comm.app_install(app_name, pkg_name, self)
     comm.app_uninstall(pkg_name, self)
    def test_uninstall_withAppRunning(self):
        comm.setUp()
        comm.check_appname()
        cmdfind = "adb -s " + comm.device + \
            " shell pm list packages |grep org.crosswalkproject.sample"
        # print "cmdfind: ", cmdfind
        pmstatus = commands.getstatusoutput(cmdfind)
        # print "pmstatus: ", pmstatus

        if pmstatus[0] != 0:
            print "Uninstall APK ----------------> %s App haven't installed,"\
            " need to install it!" % comm.app_name
            os.chdir(comm.const_path + "/../testapp/")
            apk_file = commands.getstatusoutput("ls | grep %s | grep %s" % \
                (comm.app_name.lower(), comm.ARCH))[1]
            cmdinst = "adb -s " + comm.device + " install -r " + apk_file
            comm.app_install(cmdinst, cmdfind, self)

        # Make sure the app is running
        cmd = "adb -s " + comm.device + " shell am start -n "\
        "org.crosswalkproject.sample/.%sActivity" % comm.app_name
        comm.app_launch(cmd, self)
        time.sleep(2)

        # Uninstall the app
        cmduninst = "adb -s " + comm.device + \
            " uninstall org.crosswalkproject.sample"
        comm.app_uninstall(cmduninst, self)
示例#13
0
 def test_uninstall(self):
     comm.setUp()
     app_name = "privateNotes"
     pkg_name = "com.example." + app_name
     if not comm.check_app_installed(pkg_name, self):
         comm.app_install(app_name, 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_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)
示例#16
0
    def test_run(self):
        comm.setUp()
        app_name = "helloworld"
        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)

        if comm.check_app_installed(pkg_name, self):
            comm.app_uninstall(pkg_name, self)
        comm.run(app_name, self)
示例#17
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_uninstall_withAppRunning(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)

        # Make sure the app is running
        comm.app_launch(app_name, pkg_name, self)
        time.sleep(2)

        # Uninstall the app
        comm.app_uninstall(pkg_name, self)
示例#19
0
 def test_run(self):
     comm.setUp()
     app_name = "helloworld"
     pkg_name = "com.example." + app_name.lower()
     cmd_create = "bin/create " + app_name + " com.example." + app_name + " " + app_name
     comm.create(cmd_create, app_name, self)
     if not comm.replace_key(os.path.join(comm.pack_tool, app_name, "assets", "www", "index.html"), 
             "<a href='http://www.intel.com'>Intel</a>\n</body>",
             "</body>"):
         return False
     cmd_run = "./cordova/run"
     if comm.check_app_installed(pkg_name, self):
         comm.app_uninstall(pkg_name, self)
     comm.run(cmd_run, app_name, self)
示例#20
0
    def test_uninstall_withAppRunning(self):
        comm.setUp()
        app_name = "privateNotes"
        pkg_name = "com.example." + app_name

        if not comm.check_app_installed(pkg_name, self):
            comm.app_install(app_name, pkg_name, self)

        # Make sure the app is running
        comm.app_launch(app_name, pkg_name, self)
        time.sleep(2)

        # Uninstall the app
        comm.app_uninstall(pkg_name, self)
 def test_uninstall(self):
     comm.setUp()
     app_name = "Hangonman"
     cmdfind = "adb -s " + comm.device + " shell pm list packages |grep org.xwalk.%s" % (app_name.lower())
     #print "cmdfind: ", cmdfind
     pmstatus = commands.getstatusoutput(cmdfind)
     #print "pmstatus: ", pmstatus
     if pmstatus[0] != 0:
         print "Uninstall APK ----------------> %s App haven't installed, need to install it!" % app_name
         os.chdir(comm.const_path + "/../testapp/")
         apk_file = commands.getstatusoutput("ls | grep %s" % app_name)[1]
         cmdinst = "adb -s " + comm.device + " install -r " + apk_file
         comm.app_install(cmdinst, cmdfind, self)
     cmduninst = "adb -s " + comm.device + " uninstall org.xwalk.%s" % (app_name.lower()) 
     comm.app_uninstall(cmduninst, self)
 def test_uninstall(self):
     comm.setUp()
     app_name = "Simd"
     cmdfind = "adb -s " + comm.device + " shell pm list packages |grep org.xwalk.%s" % (app_name.lower())
     #print "cmdfind: ", cmdfind
     pmstatus = commands.getstatusoutput(cmdfind)
     #print "pmstatus: ", pmstatus
     if pmstatus[0] != 0:
         print "Uninstall APK ----------------> %s App haven't installed, need to install it!" % app_name
         os.chdir(comm.const_path + "/../testapp/")
         apk_file = commands.getstatusoutput("ls | grep %s" % app_name)[1]
         cmdinst = "adb -s " + comm.device + " install -r " + apk_file
         comm.app_install(cmdinst, cmdfind, self)
     cmduninst = "adb -s " + comm.device + " uninstall org.xwalk.%s" % (app_name.lower()) 
     comm.app_uninstall(cmduninst, self)
示例#23
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_uninstall_withAppRunning(self):
        comm.setUp()
        app_name = "gallery"
        pkg_name = "com.example." + app_name.lower()
        cmd_launch = "adb -s " + comm.device + " shell am start -n %s/.%s" % \
                (pkg_name, app_name)
        if not comm.check_app_installed(pkg_name, self):
            comm.app_install(app_name, pkg_name, self)

        # Make sure the app is running
        comm.app_launch(cmd_launch, self)
        time.sleep(2)

        # Uninstall the app
        comm.app_uninstall(pkg_name, self)
示例#25
0
    def test_uninstall_withAppRunning(self):
        comm.setUp()
        app_name = "gallery"
        pkg_name = "com.example." + app_name.lower()
        cmd_launch = "adb -s " + comm.device + " shell am start -n %s/.%s" % \
                (pkg_name, app_name)
        if not comm.check_app_installed(pkg_name, self):
            comm.app_install(app_name, pkg_name, self)

        # Make sure the app is running
        comm.app_launch(cmd_launch, self)
        time.sleep(2)

        # Uninstall the app
        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)
    def test_run(self):
        comm.setUp()
        app_name = "helloworld"
        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)

        if comm.check_app_installed(pkg_name, self):
            comm.app_uninstall(pkg_name, self)
        comm.run(app_name, self)
 def test_uninstall(self):
     comm.setUp()
     comm.check_appname()
     cmdfind = "adb -s " + comm.device + \
         " shell pm list packages |grep org.crosswalkproject.sample"
     # print "cmdfind: ", cmdfind
     pmstatus = commands.getstatusoutput(cmdfind)
     # print "pmstatus: ", pmstatus
     if pmstatus[0] != 0:
         print "Uninstall APK ----------------> %s App haven't installed,"\
         " need to install it!" % comm.app_name
         os.chdir(comm.const_path + "/../testapp/")
         apk_file = commands.getstatusoutput("ls | grep %s" % \
             comm.app_name)[1]
         cmdinst = "adb -s " + comm.device + " install -r " + apk_file
         comm.app_install(cmdinst, cmdfind, self)
     cmduninst = "adb -s " + comm.device + \
         " uninstall org.crosswalkproject.sample"
     comm.app_uninstall(cmduninst, self)
 def test_uninstall(self):
     comm.setUp()
     comm.check_appname()
     cmdfind = "adb -s " + comm.device + \
         " shell pm list packages |grep org.crosswalkproject.sample"
     # print "cmdfind: ", cmdfind
     pmstatus = commands.getstatusoutput(cmdfind)
     # print "pmstatus: ", pmstatus
     if pmstatus[0] != 0:
         print "Uninstall APK ----------------> %s App haven't installed,"\
         " need to install it!" % comm.app_name
         os.chdir(comm.const_path + "/../testapp/")
         apk_file = commands.getstatusoutput("ls | grep %s" % \
             comm.app_name)[1]
         cmdinst = "adb -s " + comm.device + " install -r " + apk_file
         comm.app_install(cmdinst, cmdfind, self)
     cmduninst = "adb -s " + comm.device + \
         " uninstall org.crosswalkproject.sample"
     comm.app_uninstall(cmduninst, 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)