ant; MARGIN: 10px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; COLOR: rgb(51,51,51); WORD-BREAK: break-all; PADDING-TOP: 0px"> caseinfolist.append(argcount)
caseinfolist.append(ArgNameList)
return caseinfolist
#获取输入
def get_input(Data, SuiteID, CaseID, caseinfolist):
sArge=''
#参数组合
for j in range(0, caseinfolist[1]):
if Data.read_data(SuiteID, Data.casebegin+CaseID, Data.argbegin+j) != "None":
sArge=sArge+caseinfolist[2][j]+'='+Data.read_data(SuiteID, Data.casebegin+CaseID, Data.argbegin+j)+'&'
#去掉结尾的&字符
if sArge[-1:]=='&':
sArge = sArge[0:-1]
sInput=caseinfolist[0]+sArge #组合全部参数
return sInput
- #结果判断
- def assert_result(sReal, sExpect):
- sReal=str(sReal)
- sExpect=str(sExpect)
- if sReal==sExpect:
- return 'OK'
- else:
- return 'NG'
#将测试结果写入文件
def write_result(Data, SuiteId, CaseId, resultcol, *result):
if len(result)>1:
ret='OK'
for i in range(0, len(result)):
if result[i]=='NG':
ret='NG'
break
if ret=='NG':
Data.write_data(SuiteId, Data.casebegin+CaseId, resultcol,ret, NG_COLOR)
else:
Data.write_data(SuiteId, Data.casebegin+CaseId, resultcol,ret, OK_COLOR)
Data.allresult.append(ret)
else:
延伸阅读文章来源于领测软件测试网 https://www.ltesting.net/