Ejemplo n.º 1
0
def PublishDBOrder():
	resultstr=HttpGet()
	print (resultstr.text)
	if '"responseType":"0"' in resultstr.text:
		SaveResult.save_result('货主货源','德邦中标','pass')
	else:
		SaveResult.save_result('货主货源','德邦中标','fail')
Ejemplo n.º 2
0
def CancelDBGoods():
    resultstr = HttpGet()
    print(resultstr.text)
    if '"responseType":"1"' in resultstr.text:
        SaveResult.save_result('货主货源', '德邦关闭', 'pass')
    else:
        SaveResult.save_result('货主货源', '德邦关闭', 'fail')
Ejemplo n.º 3
0
 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')
Ejemplo n.º 4
0
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')
Ejemplo n.º 6
0
# -*- 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)
Ejemplo n.º 7
0
def AreaCodeInfo():
    resultstr = HttpAreaCodeInfo()
    if '2000000' in resultstr:
        SaveResult.save_result('行政区接口', '查询', 'pass')
    else:
        SaveResult.save_result('行政区接口', '查询', 'fail')
Ejemplo n.º 8
0
def SendRegMsg(account):
	resultstr=httpPost(account)
	if '2000000' in resultstr:
		SaveResult.save_result('用户注册','获取验证码','pass')
	else:
		SaveResult.save_result('用户注册','获取验证码','fail')
Ejemplo n.º 9
0
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')
Ejemplo n.º 10
0
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')
Ejemplo n.º 11
0
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')
Ejemplo n.º 12
0
def getSmsCode(account):
    resultstr = httpPost(account).decode()
    if '2000000' in resultstr:
        SaveResult.save_result('用户注册', '获取验证码', 'pass')
    else:
        SaveResult.save_result('用户注册', '获取验证码', 'fail')
Ejemplo n.º 13
0
def PublishTDHYOrder():
    resultstr = HttpGet().decode()
    if 'isok' in resultstr:
        SaveResult.save_result('金牌货主订单', '天地华宇中标', 'pass')
    else:
        SaveResult.save_result('金牌货主订单', '天地华宇中标', 'fail')
Ejemplo n.º 14
0
def AddLocation():
    resultstr = httpPost()
    if '2000000' in resultstr:
        SaveResult.save_result('上报定位', '上报定位', 'pass')
    else:
        SaveResult.save_result('上报定位', '上报定位', 'fail')
Ejemplo n.º 15
0
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')
Ejemplo n.º 16
0
def PublishTDHYGoods():
	resultstr=HttpGet()
	if 'isok' in resultstr:
		SaveResult.save_result('货主货源','TDHY发货成功','pass')
	else:
		SaveResult.save_result('货主货源','TDHY发货成功','fail')
Ejemplo n.º 17
0
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')
Ejemplo n.º 18
0
def VerifyIdcardAgent(idcardnumber, idcardname):
    resultstr = httpPostAgent(idcardnumber, idcardname)
    if '2000000' in resultstr:
        SaveResult.save_result('完善资料', '身份验证经纪人', 'pass')
    else:
        SaveResult.save_result('完善资料', '身份验证经纪人', 'fail')
Ejemplo n.º 19
0
def CheckMobile(account):
	resultstr=httpPost(account)
	if '2000000' in resultstr:
		SaveResult.save_result('用户注册','检查号码是否存在','pass')
	else:
		SaveResult.save_result('用户注册','检查号码是否存在','fail')
Ejemplo n.º 20
0
def VerifyIdcardOwner(idcardnumber, idcardname):
    resultstr = httpPostOwner(idcardnumber, idcardname)
    if '2000000' in resultstr:
        SaveResult.save_result('完善资料', '身份验证货主', 'pass')
    else:
        SaveResult.save_result('完善资料', '身份验证货主', 'fail')
Ejemplo n.º 21
0
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')
Ejemplo n.º 22
0
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')