当前位置:网站首页>测试用例设计方法之等价类划分方法
测试用例设计方法之等价类划分方法
2022-06-30 00:41:00 【多测师111】
一.方法简介
划分等价类: 1)有效等价类 2)无效等价类
划分等价类的标准:
1)完备测试、避免冗余;
2)划分等价类重要的是:集合的划分,划分为互不相交的一组子集,而子集的并是整个集合;
3)并是整个集合:完备性;
4)子集互不相交:保证一种形式的无冗余性;
5)同一类中标识(选择)一个测试用例,同一等价类中,往往处理相同,相同处理映射到"相同的执行路径"。

划分等价类的方法
1)在输入条件规定了取值范围或值的个数的情况下,则可以确立一个有效等价类和两个无效等价类。
2)在输入条件规定了输入值的集合或者规定了"必须如何"的条件的情况下,可确立一个有效等价类和一个无效等价类;
3)在输入条件是一个布尔量的情况下,可确定一个有效等价类和一个无效等价类。
4)在规定了输入数据的一组值(假定n个),并且程序要对每一个输入值分别处理的情况下,可确立n个有效等价类和一个无效等价类。
例:输入条件说明学历可为:专科、本科、硕士、博士四种之一,则分别取这四种这四个值作为四个有效等价类,另外把四种学历之外的任何学历作为无效等价类。
5)在规定了输入数据必须遵守的规则的情况下,可确立一个有效等价类(符合规则)和若干个无效等价类(从不同角度违反规则);
设计测试用例
在确立了等价类后,可建立等价类表,列出所有划分出的等价类输入条件:有效等价类、无效等价类,然后从划分出的等价类中按以下三个原则设计测试用例:
1)为每一个等价类规定一个唯一的编号;
2)设计一个新的测试用例,使其尽可能多地覆盖尚未被覆盖地有效等价类,重复这一步,直到所有的有效等价类都被覆盖为止;
3)设计一个新的测试用例,使其仅覆盖一个尚未被覆盖的无效等价类,重复这一步,直到所有的无效等价类都被覆盖为止。
如需了解更多测试技术信息请关注:深圳多测师软件与技术服务有限公司
边栏推荐
- Five key elements of the data center
- A Yu's Rainbow Bridge
- MySQL基礎2
- Small and medium-sized enterprises should pay attention to these points when signing ERP contracts
- 【PHP】php压测,报错:通常每个套接字地址(协议/网络地址/端口)只允许使用
- [cloud native] kernel security in container scenario
- 如何在IDEA中自定義模板、快速生成完整的代碼?
- Is there any discount for securities account opening? Is it safe to open an account online?
- Serpentine matrix (array simulates direction, D represents turning)
- The SQL statement concat cannot find the result
猜你喜欢

Interviewer: why does database connection consume resources? I can't even answer.. I was stunned!

Botu V16 changes the model and firmware version of PLC

Which department should the company's fixed assets be managed? How should the company's fixed assets be managed

YuMinHong: my retreat and advance; The five best software architecture patterns that architects must understand; Redis kills 52 consecutive questions | manong weekly VIP member exclusive email weekly

Top performance version 2 reading notes (IV) -- memory monitoring

Live broadcast configuration of crmeb knowledge payment system program configuration (method 2)

【mysql篇-基础篇】通用语法2

HDCP Paring

数据中台咋就从“小甜甜”变成了“牛夫人”?

@Bugs caused by improper use of configurationproperties
随机推荐
The SQL statement concat cannot find the result
Which securities company is better and which platform is safer for stock speculation account opening
字节面试惨遭滑铁卢:一面就被吊打,幸得华为内推,三面拿到offer
How to create a module in the idea and how to delete a module in the idea?
Applying for let's encrypt SSL certificate with certbot
Simple pages
【服装软件】服装出产办理体系选型的准则有哪些?
Five key elements of the data center
Time does not spare
Ml: introduction to confidence interval (the difference and relationship between precision / accuracy / accuracy), use method, and detailed introduction to case application
MySQL基礎2
[MySQL basic] general syntax 2
网络方向哪个发展更好?数据通信工程师学习路线分享
modbus-tcp-rtu协议图表
玉米地里的小鸟
Arlo felt lost
MySQL foundation 3
Some thoughts on life
岁月匆匆那年
Interviewer: how to solve the problem of massive requests for data that does not exist in redis, which affects the database?