Commit 65a59f8d authored by jinfang.liu's avatar jinfang.liu

test

parents e3706aa2 bbaf55fa
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</component> </component>
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.7 (autoInterface-HOcLM3wc)" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="Python 3.7.0 (/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="panda-test" /> <orderEntry type="module" module-name="panda-test" />
<orderEntry type="module" module-name="autoCreateCase" /> <orderEntry type="module" module-name="autoCreateCase" />
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
<component name="JavaScriptSettings"> <component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" /> <option name="languageLevel" value="ES6" />
</component> </component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7.0 (/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7)" project-jdk-type="Python SDK" />
</project> </project>
\ No newline at end of file
...@@ -3,8 +3,11 @@ a = 1 ...@@ -3,8 +3,11 @@ a = 1
channnelid = 159866 channnelid = 159866
fundcorpid = 480 fundcorpid = 480
merchantid = 27 merchantid = 27
execjsonversion = {} # {'configuration_center':'1.0.1','zhongtai_hetong':'1.0.1','account':'2.0','risk':'2.0','trade':'2.0','msg':'1.0.1'}
issimple = 1
execjsonversion = {} # {'configuration_center':'1.0.1','zhongtai_hetong':'1.0.1','account':'2.0','risk':'2.0','trade':'2.0','zijin':'2.0','msg':'1.0.1'}
issimple = 0
finalenv = 0
[baseinfo] [baseinfo]
usered = qa usered = qa
...@@ -22,6 +25,7 @@ amounts = [2000,4000,6000,10000,20000,30000] ...@@ -22,6 +25,7 @@ amounts = [2000,4000,6000,10000,20000,30000]
productids = [1,4] productids = [1,4]
repaymenttypes = [微信,支付宝,银行卡] repaymenttypes = [微信,支付宝,银行卡]
counter = 0 counter = 0
totalamount = 6875.33 totalamount = 6875.33
loanid = 5 loanid = 5
totalloanamount = 1004.61 totalloanamount = 1004.61
...@@ -29,6 +33,8 @@ termno = 5 ...@@ -29,6 +33,8 @@ termno = 5
verificationid = BK751417141686117278698537 verificationid = BK751417141686117278698537
applyno = AN000000144618983447142400 applyno = AN000000144618983447142400
[globalvar] [globalvar]
password = 123456aaa password = 123456aaa
biztype = 0 biztype = 0
...@@ -39,18 +45,17 @@ cardnoprovider = ICBC ...@@ -39,18 +45,17 @@ cardnoprovider = ICBC
apitoken = 87ff232a-d8bd-427d-9455-43e41146703a apitoken = 87ff232a-d8bd-427d-9455-43e41146703a
mapitoken = ddf2c21774ea6741f278a7b7172dbe9a3dd7 mapitoken = ddf2c21774ea6741f278a7b7172dbe9a3dd7
quotarecordorderno = {'msg': None, 'code': '0000', 'data': []} quotarecordorderno = {'msg': None, 'code': '0000', 'data': []}
hetongtoken = 190db434e2e91c21086623c0b7cc22af hetongtoken = a758d7e9323225494c74a52b3a43af3e
cardno = 6222020218008727171 cardno = 6222020250206050660
msgtoken = {token} msgtoken = {token}
sceneid = 5 sceneid = 5
deadline = 1589946187000 deadline = 1590479021000
paymenttoken = 62979fec-b060-4b0f-85b8-d01691b5b9e1 paymenttoken = ff928a66-15f2-444f-852a-e4cff2a508e5
requestid = 63119890137088 requestid = 63119890137088
vcode = 238345 vcode = 238345
applyno = AN000000143183669801000960 applyno = AN000000143183669801000960
voicetoken = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODgxNTE1OTgsInVzZXJuYW1lIjoidHgueHlxYiJ9.W4fKn-tdbOORELBfUd6KOjrygjzWWFY0zf6dmcqsjiI voicetoken = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODgxNTE1OTgsInVzZXJuYW1lIjoidHgueHlxYiJ9.W4fKn-tdbOORELBfUd6KOjrygjzWWFY0zf6dmcqsjiI
logindata = phone=18801012591 logindata = {'uuid': '1ba1de90-172c-4f2d-a2be-a6771962a063', 'channelId': 159866, 'productId': '1', 'channelType': '1', 'source': 2, 'phoneNo': '13255741029', 'idCard': '152500193108182914', 'name': '周丹', 'compatibleExtData': {}}
[testsuit] [testsuit]
cases_numbertemp = [{'passportapi':[816,817,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,574,575,577,576,368,371,372,374,375,376,378,363,364,369,370,409,373,410,412,411,413,387, 388,389,390, 391, 392,389, 390, 394, 395, 396, 397]}] cases_numbertemp = [{'passportapi':[816,817,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,574,575,577,576,368,371,372,374,375,376,378,363,364,369,370,409,373,410,412,411,413,387, 388,389,390, 391, 392,389, 390, 394, 395, 396, 397]}]
cases_number1 = [358, 359, 360,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,574,575,577,576,368,371,372,374,375,376,378,363,364,369,370,409,373,410,412,411,413,387, 388,389,390, 391, 392,389, 390, 394, 395, 396, 397] cases_number1 = [358, 359, 360,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,574,575,577,576,368,371,372,374,375,376,378,363,364,369,370,409,373,410,412,411,413,387, 388,389,390, 391, 392,389, 390, 394, 395, 396, 397]
...@@ -81,9 +86,11 @@ case_number_ka_koala_loan = [{'ka_koala_loan':['803','802','801','800','798','79 ...@@ -81,9 +86,11 @@ case_number_ka_koala_loan = [{'ka_koala_loan':['803','802','801','800','798','79
case_number_ka_koala_repay = [{'ka_koala_repay':['791','786','787','839','788','789','790']}] case_number_ka_koala_repay = [{'ka_koala_repay':['791','786','787','839','788','789','790']}]
case_number_test = [{'passportapi':[323,382,383,384]},{'koala_repay':[679, 680]},{'passportapi':[323,382,383,384]}] case_number_test = [{'passportapi':[323,382,383,384]},{'koala_repay':[679, 680]},{'passportapi':[323,382,383,384]}]
case_number_funding_plan = [{'passportapi':[816,817]}] case_number_funding_plan = [{'passportapi':[816,817]}]
case_number_case_fengkong = [{'koala_risk':[699]},{'usercenter':[500]},{'risk':[651]},{'koala_risk':[709,753,671]}] case_number_case_fengkong = [{'koala_risk':[699]},{'usercenter':[500]},{'risk':[651]},{'koala_risk':[709,753,753,671]}]
case_number_case_fangkuan = [{'ka_koala_loan':[801,818,802,798,799,800,820]}] case_number_case_fengkong_refuse = [{'koala_risk':[699]},{'usercenter':[500]},{'risk':[651]},{'koala_risk':[709,753,705]}]
case_number_case_tixian = [{'ka_koala_loan':[801,818,798,799,800,802,820]}]
case_number_case_fangkuan = [{'ka_koala_loan':[835]},{'zijin':[824,822]}]
[sqldata]
sqldata = [404, '6222020243457719151', 0, 0, 0, 0, '沈博裕', '12011019670327487X', '13805732771'] sqldata = [404, '6222020243457719151', 0, 0, 0, 0, '沈博裕', '12011019670327487X', '13805732771']
...@@ -76,10 +76,18 @@ funding_plan={'testnumer':'case_number_funding_plan', ...@@ -76,10 +76,18 @@ funding_plan={'testnumer':'case_number_funding_plan',
case_fengkong={'testnumer':'case_number_case_fengkong', case_fengkong={'testnumer':'case_number_case_fengkong',
'casename':'case_fengkong','platform':'KA','reportname':'KA串流程','projectId':43,'psid':7} 'casename':'case_fengkong','platform':'KA','reportname':'KA串流程','projectId':43,'psid':7}
case_fengkong_refuse={'testnumer':'case_number_case_fengkong_refuse',
'casename':'case_fengkong_refuse','platform':'KA','reportname':'KA串流程','projectId':43,'psid':7}
case_tixian={'testnumer':'case_number_case_tixian',
'casename':'case_tixian','platform':'KA','reportname':'KA串流程','projectId':43,'psid':7}
case_fangkuan={'testnumer':'case_number_case_fangkuan', case_fangkuan={'testnumer':'case_number_case_fangkuan',
'casename':'case_fangkuan','platform':'KA','reportname':'KA串流程','projectId':43,'psid':7} 'casename':'case_fangkuan','platform':'KA','reportname':'KA串流程','projectId':43,'psid':7}
# zhongtai_hetong={'testnumer':'case_number_msg', # zhongtai_hetong={'testnumer':'case_number_msg',
# 'casename':'msg','platform':'中台','reportname':'消息中心','projectId':33,'psid':5} # 'casename':'msg','platform':'中台','reportname':'消息中心','projectId':33,'psid':5}
...@@ -103,9 +111,9 @@ project_mapping={ ...@@ -103,9 +111,9 @@ project_mapping={
'sidecar':sidecar, 'sidecar':sidecar,
'msg':msg, 'msg':msg,
'usercenter':usercenter, 'usercenter':usercenter,
'case_number_funding_plan':funding_plan, 'funding_plan':funding_plan,
'case_fengkong':case_fengkong, 'case_fengkong':case_fengkong,
'case_fangkuan':case_fangkuan 'case_tixian':case_tixian,
'case_fengkong_refuse':case_fengkong_refuse,
'case_fangkuan': case_fangkuan
} }
\ No newline at end of file
...@@ -157,8 +157,9 @@ if __name__ == '__main__': ...@@ -157,8 +157,9 @@ if __name__ == '__main__':
##根据name值,从cases_mapping文件找对应的key ##根据name值,从cases_mapping文件找对应的key
name='test' name='test'
# name='passportapi'
########################### ###########################
# name='account' # name='account'
...@@ -166,10 +167,15 @@ if __name__ == '__main__': ...@@ -166,10 +167,15 @@ if __name__ == '__main__':
# name='sidecar' # name='sidecar'
#'account' or 'configuration_center'or #'account' or 'configuration_center'or
# 串流程 # 串流程
name='ka_koala_repay'
# name='case_fangkuan'
#name='payment' # name='funding_plan'
# name='case_fengkong'
# name = 'case_fengkong_refuse'
name='case_tixian'
# name = 'case_fangkuan'
# ############ # ############
......
...@@ -29,9 +29,11 @@ class requestResult: ...@@ -29,9 +29,11 @@ class requestResult:
self.casefile=readCaseFile(casefile) self.casefile=readCaseFile(casefile)
self.config = config self.config = config
self.config = kconfig.get(self.casefile.get('env')) or self.config if not int(self.keydata.readKeyData("channnel","finalenv")):
self.config=kconfig.get(self.casefile.get('env')) or self.config
print(self.config)
self.keydata = rwKeyData(config) self.keydata = rwKeyData(config)
#setGloablValue(self.keydata,self.casefile) #setGloablValue(self.keydata,self.casefile)
try: try:
...@@ -125,7 +127,6 @@ class requestResult: ...@@ -125,7 +127,6 @@ class requestResult:
#print("从表里查到的数据===", sqlData,self.casefile,sql) #print("从表里查到的数据===", sqlData,self.casefile,sql)
casejson = dealbodyHeaderType(self.config, self.casefile, sqlData) casejson = dealbodyHeaderType(self.config, self.casefile, sqlData)
casejson =dealSign(casejson) casejson =dealSign(casejson)
#print(casejson) #print(casejson)
...@@ -693,10 +694,8 @@ if __name__ == '__main__': ...@@ -693,10 +694,8 @@ if __name__ == '__main__':
#cases_number= [323, 382, 383, 384, 385,361, 402, 403, 404, 405,401] #cases_number= [323, 382, 383, 384, 385,361, 402, 403, 404, 405,401]
cases_number= [323, 382, 383, 384, 385,361, 402, 403, 404, 405] # cases_number=[753]
cases_number=[787] cases_number=[800]
#cases_number = [6377]
#cases_number=[852]
#cases_number = [369,370,409,373] #cases_number = [369,370,409,373]
#cases_number=[358, 359, 360,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,368,371,372,374,375,376,378,363,364,369,370] #cases_number=[358, 359, 360,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,368,371,372,374,375,376,378,363,364,369,370]
...@@ -704,9 +703,7 @@ if __name__ == '__main__': ...@@ -704,9 +703,7 @@ if __name__ == '__main__':
#casefile = [{'passportapi':['323.json', '382.json','383.json', '384.json', '385.json']},{'payment': t.split(',')}] #casefile = [{'passportapi':['323.json', '382.json','383.json', '384.json', '385.json']},{'payment': t.split(',')}]
casefile =[{'trade': t.split(',')}] casefile =[{'ka_koala_loan': t.split(',')}]
casefile = [{'ka_koala_repay': t.split(',')}]
#print(casefile) #print(casefile)
......
...@@ -128,8 +128,9 @@ class test1Config(baseConfig): ...@@ -128,8 +128,9 @@ class test1Config(baseConfig):
charset="utf8" charset="utf8"
class test11Config(baseConfig):
namespace='test11' class btestConfig(baseConfig):
namespace='test1'
type="mysql" type="mysql"
host = "172.18.3.85" host = "172.18.3.85"
port = 3306 port = 3306
...@@ -158,7 +159,7 @@ config={ ...@@ -158,7 +159,7 @@ config={
"qa3":qa3Config, "qa3":qa3Config,
"msg":msgConfig, "msg":msgConfig,
'pre':preConfig, 'pre':preConfig,
'test11':test11Config 'btest':btestConfig
} }
......
...@@ -17,11 +17,19 @@ class maintest(unittest.TestCase): ...@@ -17,11 +17,19 @@ class maintest(unittest.TestCase):
suite.addTest(testcase_klass(name, config=config)) suite.addTest(testcase_klass(name, config=config))
return suite return suite
<<<<<<< HEAD
class passportapi0(maintest): class passportapi0(maintest):
def test_100(self): def test_100(self):
res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/323.json') res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/323.json')
res,finalresult=res1.requestJson() res,finalresult=res1.requestJson()
t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/323.json').get('result') t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/323.json').get('result')
=======
class ka_koala_loan0(maintest):
def test_100(self):
res1=requestResult(self.config,'/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/801.json')
res,finalresult=res1.requestJson()
t=readCaseFile('/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/801.json').get('result')
>>>>>>> katest
r=0 if 0 in finalresult and len(finalresult)>0 else 1 r=0 if 0 in finalresult and len(finalresult)>0 else 1
if r: if r:
self.detail=res1.keyoption()+('Success',) self.detail=res1.keyoption()+('Success',)
...@@ -39,9 +47,15 @@ class passportapi0(maintest): ...@@ -39,9 +47,15 @@ class passportapi0(maintest):
msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据' msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据'
self.assertEqual(0, 0,msg=msg) self.assertEqual(0, 0,msg=msg)
def test_101(self): def test_101(self):
<<<<<<< HEAD
res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/382.json') res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/382.json')
res,finalresult=res1.requestJson() res,finalresult=res1.requestJson()
t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/382.json').get('result') t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/382.json').get('result')
=======
res1=requestResult(self.config,'/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/818.json')
res,finalresult=res1.requestJson()
t=readCaseFile('/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/818.json').get('result')
>>>>>>> katest
r=0 if 0 in finalresult and len(finalresult)>0 else 1 r=0 if 0 in finalresult and len(finalresult)>0 else 1
if r: if r:
self.detail=res1.keyoption()+('Success',) self.detail=res1.keyoption()+('Success',)
...@@ -59,6 +73,7 @@ class passportapi0(maintest): ...@@ -59,6 +73,7 @@ class passportapi0(maintest):
msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据' msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据'
self.assertEqual(0, 0,msg=msg) self.assertEqual(0, 0,msg=msg)
def test_102(self): def test_102(self):
<<<<<<< HEAD
res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/383.json') res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/383.json')
res,finalresult=res1.requestJson() res,finalresult=res1.requestJson()
t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/383.json').get('result') t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/383.json').get('result')
...@@ -82,6 +97,11 @@ class passportapi0(maintest): ...@@ -82,6 +97,11 @@ class passportapi0(maintest):
res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/384.json') res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/384.json')
res,finalresult=res1.requestJson() res,finalresult=res1.requestJson()
t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/384.json').get('result') t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/passportapi/384.json').get('result')
=======
res1=requestResult(self.config,'/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/798.json')
res,finalresult=res1.requestJson()
t=readCaseFile('/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/798.json').get('result')
>>>>>>> katest
r=0 if 0 in finalresult and len(finalresult)>0 else 1 r=0 if 0 in finalresult and len(finalresult)>0 else 1
if r: if r:
self.detail=res1.keyoption()+('Success',) self.detail=res1.keyoption()+('Success',)
...@@ -98,12 +118,19 @@ class passportapi0(maintest): ...@@ -98,12 +118,19 @@ class passportapi0(maintest):
else : else :
msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据' msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据'
self.assertEqual(0, 0,msg=msg) self.assertEqual(0, 0,msg=msg)
<<<<<<< HEAD
class payment1(maintest): class payment1(maintest):
def test_100(self): def test_100(self):
res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/565.json') res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/565.json')
res,finalresult=res1.requestJson() res,finalresult=res1.requestJson()
t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/565.json').get('result') t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/565.json').get('result')
=======
def test_103(self):
res1=requestResult(self.config,'/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/799.json')
res,finalresult=res1.requestJson()
t=readCaseFile('/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/799.json').get('result')
>>>>>>> katest
r=0 if 0 in finalresult and len(finalresult)>0 else 1 r=0 if 0 in finalresult and len(finalresult)>0 else 1
if r: if r:
self.detail=res1.keyoption()+('Success',) self.detail=res1.keyoption()+('Success',)
...@@ -120,10 +147,17 @@ class payment1(maintest): ...@@ -120,10 +147,17 @@ class payment1(maintest):
else : else :
msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据' msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据'
self.assertEqual(0, 0,msg=msg) self.assertEqual(0, 0,msg=msg)
<<<<<<< HEAD
def test_101(self): def test_101(self):
res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/607.json') res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/607.json')
res,finalresult=res1.requestJson() res,finalresult=res1.requestJson()
t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/607.json').get('result') t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/607.json').get('result')
=======
def test_104(self):
res1=requestResult(self.config,'/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/800.json')
res,finalresult=res1.requestJson()
t=readCaseFile('/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/800.json').get('result')
>>>>>>> katest
r=0 if 0 in finalresult and len(finalresult)>0 else 1 r=0 if 0 in finalresult and len(finalresult)>0 else 1
if r: if r:
self.detail=res1.keyoption()+('Success',) self.detail=res1.keyoption()+('Success',)
...@@ -140,6 +174,7 @@ class payment1(maintest): ...@@ -140,6 +174,7 @@ class payment1(maintest):
else : else :
msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据' msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据'
self.assertEqual(0, 0,msg=msg) self.assertEqual(0, 0,msg=msg)
<<<<<<< HEAD
def test_102(self): def test_102(self):
res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/608.json') res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/608.json')
res,finalresult=res1.requestJson() res,finalresult=res1.requestJson()
...@@ -204,6 +239,12 @@ class payment1(maintest): ...@@ -204,6 +239,12 @@ class payment1(maintest):
res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/611.json') res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/611.json')
res,finalresult=res1.requestJson() res,finalresult=res1.requestJson()
t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/611.json').get('result') t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/611.json').get('result')
=======
def test_105(self):
res1=requestResult(self.config,'/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/802.json')
res,finalresult=res1.requestJson()
t=readCaseFile('/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/802.json').get('result')
>>>>>>> katest
r=0 if 0 in finalresult and len(finalresult)>0 else 1 r=0 if 0 in finalresult and len(finalresult)>0 else 1
if r: if r:
self.detail=res1.keyoption()+('Success',) self.detail=res1.keyoption()+('Success',)
...@@ -221,6 +262,7 @@ class payment1(maintest): ...@@ -221,6 +262,7 @@ class payment1(maintest):
msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据' msg='断言成功,预期结果:'+str(t)+',实际结果查看响应数据'
self.assertEqual(0, 0,msg=msg) self.assertEqual(0, 0,msg=msg)
def test_106(self): def test_106(self):
<<<<<<< HEAD
res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/688.json') res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/688.json')
res,finalresult=res1.requestJson() res,finalresult=res1.requestJson()
t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/688.json').get('result') t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/688.json').get('result')
...@@ -444,6 +486,11 @@ class payment1(maintest): ...@@ -444,6 +486,11 @@ class payment1(maintest):
res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/832.json') res1=requestResult(self.config,'/Users/dm/Desktop/python_script/autoInterface/testCase/payment/832.json')
res,finalresult=res1.requestJson() res,finalresult=res1.requestJson()
t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/832.json').get('result') t=readCaseFile('/Users/dm/Desktop/python_script/autoInterface/testCase/payment/832.json').get('result')
=======
res1=requestResult(self.config,'/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/820.json')
res,finalresult=res1.requestJson()
t=readCaseFile('/Users/jiazhaopu/QGjobs/autointerface/testCase/ka_koala_loan/820.json').get('result')
>>>>>>> katest
r=0 if 0 in finalresult and len(finalresult)>0 else 1 r=0 if 0 in finalresult and len(finalresult)>0 else 1
if r: if r:
self.detail=res1.keyoption()+('Success',) self.detail=res1.keyoption()+('Success',)
......
...@@ -257,9 +257,12 @@ def zentaopms_data(panda_name,projectId,psid): ...@@ -257,9 +257,12 @@ def zentaopms_data(panda_name,projectId,psid):
if __name__ == "__main__": if __name__ == "__main__":
#names=['ka_koala_repay','koala_risk','ka_koala_loan','trade']
names = ['ka_koala_repay','trade']
#names=['zhongtai_hetong','msg','configuration_center','payment'] names=['ka_koala_loan','koala_risk','risk']
# names = ['ka_koala_loan','zijin']
# names=['zhongtai_hetong','msg','configuration_center']
for name in names: for name in names:
......
No preview for this file type
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"code": "0" "code": "0"
}, },
"type": "koala", "type": "koala",
"env": "btest",
"sleep": "3", "sleep": "3",
"rule": { "rule": {
"bankCardNumber": "fakeinfo('cardNo',flag=0)" "bankCardNumber": "fakeinfo('cardNo',flag=0)"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"casename": "token", "casename": "token",
"sql": "select '000000' as verificationCode;\r\n", "sql": "select '000000' as verificationCode;\r\n",
"db": "xyqb", "db": "xyqb",
"env": "btest",
"result": { "result": {
"code": "0" "code": "0"
}, },
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"code": "0" "code": "0"
}, },
"type": "koala", "type": "koala",
"env": "btest",
"setup": { "setup": {
"a": "clear_redis()" "a": "clear_redis()"
}, },
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"notmustexist": "['code', 'businessCode', 'businessFlag', 'success']" "notmustexist": "['code', 'businessCode', 'businessFlag', 'success']"
}, },
"type": "koala", "type": "koala",
"env": "btest",
"param": { "param": {
"amount": "%s", "amount": "%s",
"term": "%s", "term": "%s",
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"code": "0" "code": "0"
}, },
"type": "koala", "type": "koala",
"env": "btest",
"body": { "body": {
"channel": "%s", "channel": "%s",
"userId": "%s", "userId": "%s",
......
...@@ -7,10 +7,15 @@ ...@@ -7,10 +7,15 @@
"code": "0" "code": "0"
}, },
"type": "koala", "type": "koala",
"env": "btest",
"param": { "param": {
"orderNo": "{{applyno}}" "orderNo": "{{applyno}}"
}, },
"header": { "header": {
"Content-Type": "application/x-www-form-urlencoded" "Content-Type": "application/x-www-form-urlencoded"
} }
} <<<<<<< HEAD
\ No newline at end of file }
=======
}
>>>>>>> katest
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"casename": "token", "casename": "token",
"sql": "select a.`loan_application_history_id`\r\nfrom xyqb.loan_application_manifest_history a\r\ninner join xyqb_user.user b\r\non a.`user_id`=b.`id`\r\nwhere b.`phone_no`='{{phone_no}}'; ", "sql": "select a.`loan_application_history_id`\r\nfrom xyqb.loan_application_manifest_history a\r\ninner join xyqb_user.user b\r\non a.`user_id`=b.`id`\r\nwhere b.`phone_no`='{{phone_no}}'; ",
"db": "xyqb", "db": "xyqb",
"env": "btest",
"result": { "result": {
"code": "0" "code": "0"
}, },
......
{
"method": "POST",
"commit": "考拉通知资金系统准备待放款的确认单接口(POST)",
"url": "/v1/dummy/clotho/notify",
"casename": "token",
"sql": "select a.`created_from`, c.`uuid`,a.id\r\nfrom xyqb.`loan_application_history` a\r\ninner join xyqb.`loan_account_ext` b\r\ninner join xyqb.`apply_quota_record` c\r\non a.id=b.`loan_id`\r\nand b.`order_no`=c.`order_no`\r\nwhere b.`order_no`='{{applyno}}';",
"db": "xyqb",
"result": {
"code": "0"
},
"type": "koala",
"body": {
"code": "0",
"msg": "success",
"bizChannel": "%s",
"uuid": "%s",
"bizType": "0",
"auditResult": "true",
"deadLine": "1591545600000",
"bizNo": "%s"
},
"header": {
"Content-Type": "application/json"
}
}
\ No newline at end of file
...@@ -9,9 +9,16 @@ ...@@ -9,9 +9,16 @@
"code": "0" "code": "0"
}, },
"type": "koala", "type": "koala",
<<<<<<< HEAD
"rule": { "rule": {
"amount": "getrandomOne([1000,4000,9000,10000,20000,50000])", "amount": "getrandomOne([1000,4000,9000,10000,20000,50000])",
"term": "getrandomOne([3,6,9,12])" "term": "getrandomOne([3,6,9,12])"
=======
"env": "test1",
"rule": {
"amount": "getrandomOne([10000,20000,50000])",
"term": "getrandomOne([6,9,12])"
>>>>>>> katest
}, },
"body": { "body": {
"code": "0", "code": "0",
...@@ -25,7 +32,8 @@ ...@@ -25,7 +32,8 @@
"term": "%s", "term": "%s",
"deadLine": "%s", "deadLine": "%s",
"extData": "{'ces':'测试'}", "extData": "{'ces':'测试'}",
"financeProducts": "[{'min':10000,'max':10000,'terms':[{'fundInfo':[{'rateType':1,'fundId':%s,'rate':'0','priority':1,'feeType':1,'fundProductId':100000}],'term':12}]}]" "financeProducts": "[{'min':10000,'max':10000,'terms':[{'fundInfo':[{'rateType':1,'fundId':%s,'rate':'0','priority':1,'feeType':1,'fundProductId':100000}],'term':6}]}]",
"validity": "30"
}, },
"header": { "header": {
"Content-Type": "application/x-www-form-urlencoded" "Content-Type": "application/x-www-form-urlencoded"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"casename": "token", "casename": "token",
"sql": "select a.`uuid`,'1','1',a.`phone_no`,b.`id_no`,b.`name` from xyqb_user.user a\r\njoin xyqb_user.user_detail b\r\non a.`phone_no`=b.`phone_no`\r\nwhere a.phone_no={{phone_no}};", "sql": "select a.`uuid`,'1','1',a.`phone_no`,b.`id_no`,b.`name` from xyqb_user.user a\r\njoin xyqb_user.user_detail b\r\non a.`phone_no`=b.`phone_no`\r\nwhere a.phone_no={{phone_no}};",
"db": "xyqb_user", "db": "xyqb_user",
"env": "test1",
"result": { "result": {
"code": "0" "code": "0"
}, },
...@@ -23,4 +24,4 @@ ...@@ -23,4 +24,4 @@
"header": { "header": {
"Content-Type": "application/json" "Content-Type": "application/json"
} }
} }
\ No newline at end of file
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
"auditResult": "%s", "auditResult": "%s",
"deadLine": "%s", "deadLine": "%s",
"extData": "{'ces':'测试'}", "extData": "{'ces':'测试'}",
"refuseReason": "{'ces':'测试审核拒绝'}" "refuseReason": "{'ces':'测试审核拒绝'}",
"validity": "30"
}, },
"header": { "header": {
"Content-Type": "application/x-www-form-urlencoded" "Content-Type": "application/x-www-form-urlencoded"
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
"uuid": "%s", "uuid": "%s",
"orderNo": "{{applyno}}", "orderNo": "{{applyno}}",
"status": "REJECT", "status": "REJECT",
"refuseReason": "%s" "refuseReason": "%s",
"quotaExpiredAt": ""
}, },
"header": { "header": {
"Content-Type": "application/json" "Content-Type": "application/json"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"casename": "token", "casename": "token",
"sql": "select a.`channel_id`,a.uuid\r\nfrom business_flow.apply_list a\r\ninner join `xyqb_user`.user b\r\non a.`uuid`=b.`uuid`\r\nwhere a.apply_no='{{applyno}}'\r\norder by a.id desc limit 1;", "sql": "select a.`channel_id`,a.uuid\r\nfrom business_flow.apply_list a\r\ninner join `xyqb_user`.user b\r\non a.`uuid`=b.`uuid`\r\nwhere a.apply_no='{{applyno}}'\r\norder by a.id desc limit 1;",
"db": "xyqb", "db": "xyqb",
"env": "test1",
"result": { "result": {
"code": "0" "code": "0"
}, },
......
{ {
"method": "GET", "method": "GET",
"commit": "触发定时任务(GET)", "commit": "触发定时任务(GET)",
"url": "/v1/risk_management/audit/credit_application/start_condition_check_job?orderNo={{applyno}}", "url": "/v1/credit_order/job/submission/test/{{applyno}}",
"casename": "token", "casename": "token",
"result": { "result": {
"code": "0" "code": "0"
}, },
"type": "koala", "type": "koala",
"env": "test1",
"sleep": "5", "sleep": "5",
"header": { "header": {
"Content-Type": "application/x-www-form-urlencoded" "Content-Type": "application/x-www-form-urlencoded"
......
...@@ -22,4 +22,4 @@ ...@@ -22,4 +22,4 @@
"aftersql": "saveuserId(\\'user_id\\')", "aftersql": "saveuserId(\\'user_id\\')",
"beforasql": "select id from xyqb_user.user where phone_no='%s'" "beforasql": "select id from xyqb_user.user where phone_no='%s'"
} }
} }
\ No newline at end of file
...@@ -39,4 +39,4 @@ ...@@ -39,4 +39,4 @@
"address": "fakeinfo('address')", "address": "fakeinfo('address')",
"email": "fakeinfo('email')" "email": "fakeinfo('email')"
} }
} }
\ No newline at end of file
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
}, },
"db": "xyqb", "db": "xyqb",
"sql": "select u.uuid,l.id from xyqb_user.user u inner join xyqb.loan_application_history l on u.id=l.user_id where u.phone_no='%s' order by l.id desc limit 1;" "sql": "select u.uuid,l.id from xyqb_user.user u inner join xyqb.loan_application_history l on u.id=l.user_id where u.phone_no='%s' order by l.id desc limit 1;"
} }
\ No newline at end of file
...@@ -27,4 +27,4 @@ ...@@ -27,4 +27,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -12,4 +12,4 @@ ...@@ -12,4 +12,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -17,4 +17,4 @@ ...@@ -17,4 +17,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -16,4 +16,4 @@ ...@@ -16,4 +16,4 @@
"resule": { "resule": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -20,4 +20,4 @@ ...@@ -20,4 +20,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -17,4 +17,4 @@ ...@@ -17,4 +17,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -12,4 +12,4 @@ ...@@ -12,4 +12,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -20,4 +20,4 @@ ...@@ -20,4 +20,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
"code": "0000" "code": "0000"
}, },
"type": "api" "type": "api"
} }
\ No newline at end of file
...@@ -16,4 +16,4 @@ ...@@ -16,4 +16,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
"code": "0000" "code": "0000"
}, },
"type": "mapi" "type": "mapi"
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
"code": "0000" "code": "0000"
}, },
"type": "mapi" "type": "mapi"
} }
\ No newline at end of file
...@@ -18,4 +18,4 @@ ...@@ -18,4 +18,4 @@
}, },
"db": "payment_center", "db": "payment_center",
"sql": "select id,preserve_phone_no from payment_center.bank_card where user_id in \r\n(select id from payment_center.user where xyqb_uid in (select id from xyqb_user.user where phone_no='{{phone_no}}'));" "sql": "select id,preserve_phone_no from payment_center.bank_card where user_id in \r\n(select id from payment_center.user where xyqb_uid in (select id from xyqb_user.user where phone_no='{{phone_no}}'));"
} }
\ No newline at end of file
...@@ -18,4 +18,4 @@ ...@@ -18,4 +18,4 @@
}, },
"db": "payment_center", "db": "payment_center",
"sql": "select a.id from payment_center.bank_card a \r\njoin payment_center.user b on a.user_id=b.id \r\nwhere b.xyqb_uid in (select id from xyqb_user.user where phone_no='{{phone_no}}');" "sql": "select a.id from payment_center.bank_card a \r\njoin payment_center.user b on a.user_id=b.id \r\nwhere b.xyqb_uid in (select id from xyqb_user.user where phone_no='{{phone_no}}');"
} }
\ No newline at end of file
...@@ -17,4 +17,4 @@ ...@@ -17,4 +17,4 @@
"db": "payment_center", "db": "payment_center",
"sql": "select id,`bank_card_id` from payment_center.card_bind_info where \r\nuser_id in (select id from payment_center.user where xyqb_uid in (select id from xyqb_user.user where phone_no='{{phone_no}}')) order by id desc limit 1;", "sql": "select id,`bank_card_id` from payment_center.card_bind_info where \r\nuser_id in (select id from payment_center.user where xyqb_uid in (select id from xyqb_user.user where phone_no='{{phone_no}}')) order by id desc limit 1;",
"isurl": "1" "isurl": "1"
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
"code": "0000" "code": "0000"
}, },
"type": "mapi" "type": "mapi"
} }
\ No newline at end of file
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -16,4 +16,4 @@ ...@@ -16,4 +16,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -17,4 +17,4 @@ ...@@ -17,4 +17,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
"result": { "result": {
"code": "0000" "code": "0000"
} }
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ ...@@ -10,4 +10,4 @@
"code": "0000" "code": "0000"
}, },
"type": "mapi" "type": "mapi"
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
"param": { "param": {
"namespace": "{{NAMESPACE}}" "namespace": "{{NAMESPACE}}"
} }
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
"param": { "param": {
"namespace": "{{namespace}}" "namespace": "{{namespace}}"
} }
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
"param": { "param": {
"namespace": "{{namespace}}" "namespace": "{{namespace}}"
} }
} }
\ No newline at end of file
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
"param": { "param": {
"namespace": "{{namespace}}" "namespace": "{{namespace}}"
} }
} }
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment