当前位置:网站首页>等价类,边界值,场景法的使用方法和运用场景
等价类,边界值,场景法的使用方法和运用场景
2022-06-25 21:50:00 【老T教测试】
等价类:
在很多情况下,很多人想到的测试方法是穷举测试,穷举测试是最全面的测试,但是数据量很大的情况下不太现实,测试效率太低,后来为了减少测试人员的工作量和提高测试的效率和以达到最好的测试质量,慢慢的就有了等价类的测试方法。只要有输入框输入数据的地方就可以使用等价类进行测试 ,从大量数据中挑选代表性的数据进行测试。
等价类在测试中的用法和适用场景:
1)划分等价类 一, 应按照输入条件(如输入值的范围,值的个数,值的类型,输入的条件如何等),划分有效输入和无效输入(有效等价类和无效等价类) ,总的来说,需求以内的都属于有效输入,需求以外的都属于无效输入。
例如:输入提交一个11位的电话号码
可以划分一个有效等价类:提交一个正确11位的电话号码
可以划分多个无效的等价类:
提交一个10位数或12位数的号码
提交的内容非数字
提交空数据
不符合号码格式。。
2)设计测试用例
一,使一个测试用例尽可能覆盖更多的有效等价类,直到所有的有效输入(有 效 等价类)被覆盖完 。
二,一条用例只能覆盖一条无效等价类,直到所有的无效输入(无效等价类)被 覆 盖完。
边界值:
长期的测试工作经验告诉我们,大量的错误是发生在输入或输出范围的边界上,而不是发生在输入输出范围的内部。因此针对各种边界情况设计测试用例,可以查出更多的错误 区别:边界值分析法虽然是作为等价类的一种补充,但是与等价类有着区别,边界值分析不是从某等价类中随便挑一个作为代表,而是使这个等价类的每个边界都要作为测试条件。
边界值在测试中的用法和适用场景:
边界值分析法适用于所有与数字有关的测试点。
列如: 一,某个输入框限制输入2-9个字符,
则需要测试的边界值为:1个字符,2个字符,3个字符,8个字符,9个字符,10 个字符
二,程序晚上20点整自动发布新内容,
则需要测试的边界值为:19点59分59秒未发布内容 20点整发布内容
三,每次发红包只能发1-100元的红包
则需要测试的边界值为:发0.99元红包,发1元红包,发1.01元红包,发99.99元 红包,发100元红包,发100.01元红包 。。。
适用场景如,尺寸,定位,速度,坐标等等,。。
场景分析法:
分析软件应用的场景,从用户的角度出发,从场景的角度来设计测试用例,是一种面向用户的测试用例设计方法。关心用户做什么,而不是关心产品做什么,测试点不在单个的功能上而是在整个业务的流程上,总的来说,就是站在用户的角度上去使用产品。
边界值在测试中的用法和适用场景:
案例:商品支付购买
分析基本流:用户选择好商品后,支付,输入密码支付成功
分析备选流:1)支付过程中密码错误,再次输入能重新支付购买
2)支付过程中未登录,跳转至登录后可重新支付购买 。。。
异常流: 1) 支付过程中商品下架或没有库存导致无法购买
2)支付时余额不足导致无法购买
3)支付过程中密码输入错误次数过多导致账号冻结无法购买
4)支付过程中商品改价导致无法购买。。
总的来说异常流就是因为一些错误或异常操作导致业务没有完成。
欢迎点赞+收藏
边栏推荐
- Nacos source code analysis 01 code structure
- 2022-2028 global proton exchange membrane hydrogen electrolyzer industry survey and trend analysis report
- Thinking while walking
- Hotspot JVM "01" class loading, linking and initialization
- Research and Analysis on the current situation of Chinese acne drug market and forecast report on its development prospect (2022)
- [dynamic programming] longest palindrome substring thinking about dynamic transfer cycle sequence
- ADB common commands
- 2022-2028 global transmission type photoelectric circuit breaker industry research and trend analysis report
- Privatization lightweight continuous integration deployment scheme -- 03 deployment of Web services (Part 2)
- QT learning setting executable exe attribute (solving the problem of Chinese attribute garbled)
猜你喜欢
记|一次exists关键字的学习记录
Tiger DAO VC产品正式上线,Seektiger生态的有力补充
Zhihu Gaozan: what ability is important, but most people don't have it?
作为一个程序员我们如何快乐的学习成长进步呢?(个人感悟和技术无关)
字符串变形(字符串大小写切换和变现)
2022-2028 global vacuum jacket system industry survey and trend analysis report
oracle -- 表操作
Tiger Dao VC products are officially launched, a powerful supplement to seektiger ecology
民航局:到 2025 年我国将初步建成安全、智慧、高效和绿色的航空物流体系
NRM source switching tool
随机推荐
Intimacy - [comfortable exit] - final communication to reduce injury
Huawei cloud SMS has tested that many mobile phones prompt frequent sending
Why absolute positioning overlaps
哪些PHP开源作品值得关注
荣耀推出积分商城,支持兑换各种荣耀产品
AbstractFactory Abstract Factory
MATLAB Programming Notes
在线CRUDhasone关联查询报错Unabletouseinternalvariable:List
Why is BeanUtils not recommended?
Analysis report on scale investigation and investment development suggestions of China's special equipment inspection and testing industry 2022-2028
ES6-Const常量与数组解构
数据治理,说起来容易,做起来难
2022-2028 global cloud based remote browser isolation industry research and trend analysis report
Huasheng lithium battery IPO meeting: 9-month revenue of 690million; shenjinliang's family relationship is complex
Facing the "industry, University and research" gap in AI talent training, how can shengteng AI enrich the black land of industrial talents?
EVC, VVC, lcevc test: how about the performance of the latest MPEG codec?
Dio encapsulé pour les requêtes réseau flutter (gestion des cookies, ajout d'intercepteurs, téléchargement de fichiers, gestion des exceptions, annulation des requêtes, etc.)
2022-2028 global extrusion coating and lamination production line industry research and trend analysis report
How to disable the optical drive
2022-2028 global open source cloud storage industry research and trend analysis report