Exemplo n.º 1
0
def get_parameter(name, case):
    #将tools封装成函数
    data = tools1.parse()
    # print(data)
    param = data[name][case]["request"]
    # # print(param)
    return param
Exemplo n.º 2
0
def caselist():
    #获取整理完的数据接口名,传yaml名
    data = tools1.parse()
    keylist = []
    for n in data[1:]:
        keylist.extend(list(n.keys()))
    return keylist
Exemplo n.º 3
0
def casedata(casename):
    #获取yaml文件中的casename的数据,传casename获得data数据
    data = tools1.parse()
    data1 = data[caselist().index(casename) + 1]
    url = data1[casename]["request"]["url"]
    data = data1[casename]["request"]["json"]
    header = data1[casename]["request"]["headers"]
    print(url, data, header)
    return url, data, header
Exemplo n.º 4
0
def casedata(casename):
    #获取yaml文件中的casename的数据,传casename获得data数据
    data = tools1.parse()
    data1= data[caselist().index(casename)+1]
    # print(data1)
    url =data1[casename]["request"]["url"]
    data = data1[casename]["request"]["json"]
    header = data1[casename]["request"]["headers"]
    # a = data["gddjId"]
    # print("processInstanceId" in data.keys())
    # print(a is not None)
    # print(a)
    return url, data, header
Exemplo n.º 5
0
def get_parameter(name):
    #将tools封装成函数
    data = tools1.parse()
    param = data[name]["test"]["request"]
    return param