利用python数组进行参数化:
import requests
import pytest
url="http://172.30.13.102:30205/anti-fraud/test/staffLoan"
#pinShangScore={80,90,99,100} 是字典不是数组 ():元组
cardScore=[878,887] #数组
respect=[1,1,1] #断言预期
for i in range(0,len(cardScore)):
testdata={
'name': '黄静',
'mobile': 18275248662,
'idCard': 522125198802254321,
'gpsCity': '北京市',
'customerMark': 0,
'companyId': 15,
'cardScore': cardScore[i],
'company_type': 9,