def PublishDBOrder(): resultstr=HttpGet() print (resultstr.text) if '"responseType":"0"' in resultstr.text: SaveResult.save_result('货主货源','德邦中标','pass') else: SaveResult.save_result('货主货源','德邦中标','fail')
def CancelDBGoods(): resultstr = HttpGet() print(resultstr.text) if '"responseType":"1"' in resultstr.text: SaveResult.save_result('货主货源', '德邦关闭', 'pass') else: SaveResult.save_result('货主货源', '德邦关闭', 'fail')
def LoginUser(self): resultstr1 = self.HttpLoginDriver() if '2000000' in resultstr1: SaveResult.save_result('用户登录'.decode('utf-8'), '登录司机'.decode('utf-8'), 'pass') else: SaveResult.save_result('用户登录'.decode('utf-8'), '登录司机'.decode('utf-8'), 'fail')
def PublishTDHYGoods(): resultstr = HttpGet() if 'isok' in resultstr: SaveResult.save_result('发货'.decode('utf-8'), '天地华宇'.decode('utf-8'), 'pass') else: SaveResult.save_result('发货'.decode('utf-8'), '天地华宇'.decode('utf-8'), 'fail')
def CancelTDHYGoods(): resultstr = HttpGet().decode() if 'isok' in resultstr: SaveResult.save_result('金牌货主订单', '天地华宇取消', 'pass') else: SaveResult.save_result('金牌货主订单', '天地华宇取消', 'fail')
# -*- coding:utf-8 -*- import sys import ReadCases import RunCases import ReadConfig import SaveResult import log.InterfaceTestLog import ExcelParse arr1 = [] caseFileName = '测试20180518.xlsx'.decode('utf-8') htmlfile = 'test1.html' rc = ReadConfig.ReadConfig() casePath = rc.get_TruckCasePath() cls = [] cls = ReadCases.ReadCases(caseFileName) arr1 = RunCases.runTruckCase(cls) SaveResult.save_result(casePath, caseFileName, arr1) log.InterfaceTestLog.logging.info('验证码获取测试') #ExcelParse.excelParse(casePath+caseFileName,casePath+htmlfile)
def AreaCodeInfo(): resultstr = HttpAreaCodeInfo() if '2000000' in resultstr: SaveResult.save_result('行政区接口', '查询', 'pass') else: SaveResult.save_result('行政区接口', '查询', 'fail')
def SendRegMsg(account): resultstr=httpPost(account) if '2000000' in resultstr: SaveResult.save_result('用户注册','获取验证码','pass') else: SaveResult.save_result('用户注册','获取验证码','fail')
def MoreInfo(): resultstr1 = PostDriverInfo() if '2000000' in resultstr1: SaveResult.save_result('完善资料', '司机', 'pass') else: SaveResult.save_result('完善资料', '司机', 'fail') resultstr2 = PostAgentInfo() if '2000000' in resultstr2: SaveResult.save_result('完善资料', '经纪人', 'pass') else: SaveResult.save_result('完善资料', '经纪人', 'fail') resultstr3 = PostOwnerInfo() if '2000000' in resultstr3: SaveResult.save_result('完善资料', '货主', 'pass') else: SaveResult.save_result('完善资料', '货主', 'fail')
def getLatestVersion(): resultstr1=HttpGetLatestADDriver() if '2000000' in resultstr1: SaveResult.save_result('用户升级','升级安卓司机','pass') else: SaveResult.save_result('用户升级','升级安卓司机','fail') resultstr2=HttpGetLatestADAgent() if '2000000' in resultstr2: SaveResult.save_result('用户升级','升级安卓经纪人','pass') else: SaveResult.save_result('用户升级','升级安卓经纪人','fail') resultstr3=HttpGetLatestADOwner() if '2000000' in resultstr3: SaveResult.save_result('用户升级','升级安卓货主','pass') else: SaveResult.save_result('用户升级','升级安卓货主','fail') resultstr4=HttpGetLatestIOSDriver() if '2000000' in resultstr4: SaveResult.save_result('用户升级','升级IOS司机','pass') else: SaveResult.save_result('用户升级','升级IOS司机','fail') resultstr5=HttpGetLatestIOSAgent() if '2000000' in resultstr5: SaveResult.save_result('用户升级','升级IOS经纪人','pass') else: SaveResult.save_result('用户升级','升级IOS经纪人','fail') resultstr6=HttpGetLatestIOSOwner() if '2000000' in resultstr6: SaveResult.save_result('用户升级','升级IOS货主','pass') else: SaveResult.save_result('用户升级','升级IOS货主','fail') resultstr7=HttpGetLatestPCAgent() if '2000000' in resultstr7: SaveResult.save_result('用户升级','升级PC货主','pass') else: SaveResult.save_result('用户升级','升级PC货主','fail') resultstr8=HttpGetLatestPCOwner() if '2000000' in resultstr8: SaveResult.save_result('用户升级','升级PC货主','pass') else: SaveResult.save_result('用户升级','升级PC货主','fail')
def RegUser(): resultstr1=httpPostDriver().decode() if '2000000' in resultstr1: SaveResult.save_result('用户注册','注册司机','pass') else: SaveResult.save_result('用户注册','注册司机','fail') resultstr2=httpPostAgent().decode() if '2000000' in resultstr2: SaveResult.save_result('用户注册','注册经纪人','pass') else: SaveResult.save_result('用户注册','注册经纪人','fail') resultstr3=httpPostOwner().decode() if '2000000' in resultstr3: SaveResult.save_result('用户注册','注册货主','pass') else: SaveResult.save_result('用户注册','注册货主','fail')
def getSmsCode(account): resultstr = httpPost(account).decode() if '2000000' in resultstr: SaveResult.save_result('用户注册', '获取验证码', 'pass') else: SaveResult.save_result('用户注册', '获取验证码', 'fail')
def PublishTDHYOrder(): resultstr = HttpGet().decode() if 'isok' in resultstr: SaveResult.save_result('金牌货主订单', '天地华宇中标', 'pass') else: SaveResult.save_result('金牌货主订单', '天地华宇中标', 'fail')
def AddLocation(): resultstr = httpPost() if '2000000' in resultstr: SaveResult.save_result('上报定位', '上报定位', 'pass') else: SaveResult.save_result('上报定位', '上报定位', 'fail')
def IndexInfo(): resultstr1 = HttpIndexInfoDriver() if '2000000' in resultstr1: SaveResult.save_result('首页广告语', '司机', 'pass') else: SaveResult.save_result('首页广告语', '司机', 'fail') resultstr2 = HttpIndexInfoAgent() if '2000000' in resultstr2: SaveResult.save_result('首页广告语', '经纪人', 'pass') else: SaveResult.save_result('首页广告语', '经纪人', 'fail') resultstr3 = HttpIndexInfoOwner() if '2000000' in resultstr3: SaveResult.save_result('首页广告语', '货主', 'pass') else: SaveResult.save_result('首页广告语', '货主', 'fail')
def PublishTDHYGoods(): resultstr=HttpGet() if 'isok' in resultstr: SaveResult.save_result('货主货源','TDHY发货成功','pass') else: SaveResult.save_result('货主货源','TDHY发货成功','fail')
def PublishDBGoods(): resultstr=HttpGet() if '"responseType":"1"' in resultstr.text: SaveResult.save_result('发货'.decode('utf-8'),'德邦'.decode('utf-8'),'pass') else: SaveResult.save_result('发货'.decode('utf-8'),'德邦'.decode('utf-8'),'fail')
def VerifyIdcardAgent(idcardnumber, idcardname): resultstr = httpPostAgent(idcardnumber, idcardname) if '2000000' in resultstr: SaveResult.save_result('完善资料', '身份验证经纪人', 'pass') else: SaveResult.save_result('完善资料', '身份验证经纪人', 'fail')
def CheckMobile(account): resultstr=httpPost(account) if '2000000' in resultstr: SaveResult.save_result('用户注册','检查号码是否存在','pass') else: SaveResult.save_result('用户注册','检查号码是否存在','fail')
def VerifyIdcardOwner(idcardnumber, idcardname): resultstr = httpPostOwner(idcardnumber, idcardname) if '2000000' in resultstr: SaveResult.save_result('完善资料', '身份验证货主', 'pass') else: SaveResult.save_result('完善资料', '身份验证货主', 'fail')
def LoginUser(): resultstr1=HttpLoginDriver() if '2000000' in resultstr1: SaveResult.save_result('用户登录'.decode('utf-8'),'登录司机'.decode('utf-8'),'pass') else: SaveResult.save_result('用户登录'.decode('utf-8'),'登录司机'.decode('utf-8'),'fail') resultstr2=HttpLoginAgent() print (resultstr2) if '2000000' in resultstr2: SaveResult.save_result('用户登录'.decode('utf-8'),'登录经纪人'.decode('utf-8'),'pass') else: SaveResult.save_result('用户登录'.decode('utf-8'),'登录经纪人'.decode('utf-8'),'fail') resultstr3=HttpLoginOwner() if '2000000' in resultstr3: SaveResult.save_result('用户登录'.decode('utf-8'),'登录货主'.decode('utf-8'),'pass') else: SaveResult.save_result('用户登录'.decode('utf-8'),'登录货主'.decode('utf-8'),'fail')
def getADPictures(): resultstr1=HttpGetFindPictureListDriver() if '2000000' in resultstr1: SaveResult.save_result('广告','司机广告','pass') else: SaveResult.save_result('广告','司机广告','fail') resultstr2=HttpGetFindPictureListAgent() if '2000000' in resultstr2: SaveResult.save_result('广告','经纪人广告','pass') else: SaveResult.save_result('广告','经纪人广告','fail') resultstr3=HttpGetFindPictureListOwner() if '2000000' in resultstr3: SaveResult.save_result('广告','货主广告','pass') else: SaveResult.save_result('广告','货主广告','fail')