Ejemplo n.º 1
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_launch(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)
     comm.app_launch(app_name, pkg_name, self)
 def test_launch(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_launch(app_name, pkg_name, self)
Ejemplo n.º 4
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)
Ejemplo n.º 5
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)
Ejemplo n.º 8
0
 def test_launch(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_launch(app_name, pkg_name, self)
Ejemplo n.º 9
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)
Ejemplo n.º 10
0
 def test_launch(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)
     comm.app_launch(app_name, pkg_name, self)
Ejemplo n.º 11
0
 def test_launch(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)
     comm.app_launch(cmd_launch, self)
 def test_launch(self):
     comm.setUp()
     app_name = "mobilespec"
     pkg_name = "org.apache." + 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)
     comm.app_launch(cmd_launch, self)
Ejemplo n.º 13
0
 def test_launch(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)
     comm.app_launch(cmd_launch, self)
 def test_launch(self):
     comm.setUp()
     app_name = "mobilespec"
     pkg_name = "org.apache." + 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)
     comm.app_launch(cmd_launch, self)
Ejemplo n.º 15
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)
Ejemplo n.º 16
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)
Ejemplo n.º 17
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)
Ejemplo n.º 19
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)
 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)
Ejemplo n.º 21
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)
Ejemplo n.º 22
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)
Ejemplo n.º 23
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_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)
    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)
Ejemplo n.º 26
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)
Ejemplo n.º 27
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)
Ejemplo n.º 28
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)
Ejemplo n.º 29
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)