dos_cmd.py脚本如下:
test_case.py
import unittest
import sys
sys.path.append(‘E:\Appium’)
import HTMLTestRunner
import threading
import multiprocessing
from appium import webdriver
import time
from base.base_driver import BaseDriver
from bussiness.login_bussiness import LoginBussniess
from appium import webdriver
from util.read_init import ReadIni
from base.base_driver import BaseDriver
from util.server import Server
from util.dos_cmd import DosCmd
class CaseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.login_bussiness = LoginBussniess()
print('this is class')
def setUp(self):
print('this is setup\n')
def test_01(self):
# self.login_bussiness.click_forget_password_1()
# print "test case 01"
self.login_bussiness.go_login()
self.login_bussiness.login_pass()
def test_02(self):
print('this is case02')
# self.login_bussiness.login_user_error()
def tearDown(self):
print('this is teardown')
@classmethod
def tearDownClass(cls):
print('this is teardownclass')
def appium_init():
dos = DosCmd()
dos.excute_cmd(‘appium -p 4723’)
# server=Server()
# server.start_server(‘appium -p 4723’)
if name == ‘main’:
appium_init()
# unittest.main()
suite = unittest.TestSuite()
# suite.addTest(CaseTest('test_02', parame=i))
suite.addTest(CaseTest('test_01'))
# suite.addTest(CaseTest('test_02'))
unittest.TextTestRunner().run(suite)
# html_file = "E:/Appium/report/report.html"
# fp = file(html_file, 'wb')
# HTMLTestRunner.HTMLTestRunner(fp).run(suite)
启动appium后一直卡在这里,一直是运行状态,但是不执行case
在命令行中启动appium正常执行case
网上找了很多资料,没有找到原因,求老师解答~~