unittest接口自动化测试报告 展示: 代码: __author__ = "Wai Yip Tung, Findyou" __version__ = "0.8.2.1" # TODO: color stderr # TODO: simplify javascript using ,ore than 1 class in the class attribute? import datetime import sys import io import time fr
断言,自动判断接口返回的结果与预期结果是否一致 from common.get_mysql import * def test_assert(): a=0 b=1 # assert a,'断言失败打印的信息' # 自定义断言失败打印的信息,用逗号隔开 assert not a,'断言失败打印的信息' assert b,'断言失败打印的信息' c='c' d='adacde' e='aeewd' assert c in d,'断言失败打印的信息' assert c not in e,'断言失败打印