首页 > Web开发 > 详细

HttpRunner接口自动化测试框架--validate详细描述

时间:2019-12-17 18:48:13      阅读:198      评论:0      收藏:0      [点我收藏+]

测试用例中定义的结果校验项,作用域为当前测试用例,用于实现对当前测试用例运行结果的校验

校验的详细描述:

No.
Comparator
Description
A(check), B(expect)
1 eq value is equal A == B
2 lt less than A < B
3 le less than or equals A <=B
4 gt greater than A >B
5 ge greater than or equals A >=B
6 ne not equals A != B
7 str_eq string equals str(A) == str(B)
8 len_eq, count_eq length or count equals len(A) == B
9 len_gt,count_gt length greater than len(A) > B
10 len_ge,count_ge length greater than or equals len(A) >= B
11 len_lt, count_lt length less than len(A) < B
12 len_le, count_le length less than or equals len(A) <= B
13 contains contains

[1,2] contains 1

14 contained_by contained by A in B
15 type_match A is instance of B isinstance(A, B)
16 regex_match regex matches re.match(B, A)
17 startwith start with A startwith(B) is True
(‘abc‘ startwith ‘ab‘)
18 endswith ends with A endswith(B) is True
(‘abc‘ endswith ‘bc‘)

HttpRunner接口自动化测试框架--validate详细描述

原文:https://www.cnblogs.com/XhyTechnologyShare/p/12055914.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!