from time import sleep from hytest import * from lib.webapi import apimgr class c2: #测试用例名称 name='超前项目搜索接口' #测试步骤 def teststeps(self): INFO('测试步骤') STEP(1,'第一步调用函数') #会出现在测试报告中 sleep(3) res = apimgr.advanced_search() sleep(3) actural = res.json() count=actural["error_code"] STEP(2,'第二步设置检查点') #设置检查点 CHECK_POINT('检查超前项目搜索接口是否正常',count == 0)