#37 楼 @tongshanshanshan 492497451,但公司上不了 QQ。你的 github 最近还会更新吗?方便剧透一下吗?
#35 楼 @tongshanshanshan
config.ini
appiumPath =C:\Program Files\nodejs\node_modules\appium
platformName=Android
appPackage=com.w.m
appActivity=.welcome
baseUrl=http://127.0.0.1:4723/wd/hub
findElementTimes=10
run.py
def __init__(self):
global casePath, caseListLpath, caseList, suiteList, appiumPath,log,logger
self.caseListPath = os.path.join(readConfig.prjDir, "caseList.txt")
self.casePath = os.path.join(readConfig.prjDir, "testSet\\")
self.caseList = []
self.suiteList = []
self.appiumPath = readConfigLocal.getConfigValue("appiumPath")
self.myServer = AppiumServer()
def createSuite(self):
"""from the caseList,get caseName,According to the caseName to search the testSuite
:return:testSuite
"""
self.setCaseList()
testSuite = unittest.TestSuite()
if len(self.caseList) > 0:
for caseName in self.caseList:
discover = unittest.defaultTestLoader.discover(start_dir=self.casePath, pattern=caseName+'.py', top_level_dir=None)
self.suiteList.append(discover)
文件存放的位置应该没有问题,case 放在 testSet 下,caseList 在上一级 testApp 下
以上的这些涉及到 case 路径的我也没动过。
注:我的系统是 win10.
我在使用的时候报以下错误,请教一下是咋回事,感觉是没获取到 case,但是不知道咋改
est01 (unittest.loader._FailedTest) ... ERROR
======================================================================
ERROR: test01 (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test01
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\unittest\loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\unittest\loader.py", line 369, in _get_module_from_name
__import__(name)
帮助文档非常详细,赞!
阿拉伯语就是从左往右读的,所以 android 系统在显示这类语言时,就会自动居右展示。
run cts --plan Monkey --p packagename --a activityname
赞!
具体地址在哪?
公司屏蔽了 taobao.com~~~
想想还有很多支持者,testerhome 应该会越来越好。
#7 楼 @wcy19881213 #8 楼 @mads nodejs 现在最高版本是 0.12.7,我安装了依然报错版本低。原因是安装的 appium 中自带了 nodejs,并不使用安装的最新版本,到 appium 目录下替换 nodejs 相关文件就 OK 了。或者修改 appium 目录 nodevars.bat 文件里面的内容。
好贴,我最开始用 re-sign.jar 也有这样的问题,没有深究,改用 jarsigner 了。