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

划分等价类的方法
1)在输入条件规定了取值范围或值的个数的情况下,则可以确立一个有效等价类和两个无效等价类。
2)在输入条件规定了输入值的集合或者规定了"必须如何"的条件的情况下,可确立一个有效等价类和一个无效等价类;
3)在输入条件是一个布尔量的情况下,可确定一个有效等价类和一个无效等价类。
4)在规定了输入数据的一组值(假定n个),并且程序要对每一个输入值分别处理的情况下,可确立n个有效等价类和一个无效等价类。
例:输入条件说明学历可为:专科、本科、硕士、博士四种之一,则分别取这四种这四个值作为四个有效等价类,另外把四种学历之外的任何学历作为无效等价类。
5)在规定了输入数据必须遵守的规则的情况下,可确立一个有效等价类(符合规则)和若干个无效等价类(从不同角度违反规则);
设计测试用例
在确立了等价类后,可建立等价类表,列出所有划分出的等价类输入条件:有效等价类、无效等价类,然后从划分出的等价类中按以下三个原则设计测试用例:
1)为每一个等价类规定一个唯一的编号;
2)设计一个新的测试用例,使其尽可能多地覆盖尚未被覆盖地有效等价类,重复这一步,直到所有的有效等价类都被覆盖为止;
3)设计一个新的测试用例,使其仅覆盖一个尚未被覆盖的无效等价类,重复这一步,直到所有的无效等价类都被覆盖为止。
如需了解更多测试技术信息请关注:深圳多测师软件与技术服务有限公司
边栏推荐
- Small and medium-sized enterprises should pay attention to these points when signing ERP contracts
- [programming problem] maze problem
- TwinCAT 3 EL7211模块控制倍福伺服
- Database learning notes (sql03)
- DL: deep learning model optimization model training skills summary timely automatic adjustment of learning rate implementation code
- [mrctf2020]ezpop-1 | PHP serialization
- 岁月匆匆那年
- PHP wechat merchant transfer to change initiating merchant transfer API
- Mysql Duplicate entry ‘xxx‘ for key ‘xxx‘
- [UML] several relationships of UML (dependency Association aggregation composition inheritance Implementation)
猜你喜欢

岁月不饶人

Briefly: how are fragments communicated?

Intermittent sampling and forwarding interference

Traffic, but no sales? 6 steps to increase website sales

Yunna | fixed assets system management, NC system management where are the fixed assets

How much is the fixed asset management system and the price of the fixed asset management system

Comment personnaliser les modèles et générer rapidement le code complet dans l'idée?

学位论文的引用
![[MRCTF2020]Ezpop-1|php序列化](/img/f8/6164b4123e0d1f3b90980ebb7b4097.png)
[MRCTF2020]Ezpop-1|php序列化

MySQL advanced 2
随机推荐
How to seamlessly transition from traditional microservice framework to service grid ASM
字节、字、双字 关系
Use of shortcut keys for idea tools
I / o initial et son fonctionnement de base
Bytek suffered a disastrous defeat in the interview: he was hanged on one side, but fortunately Huawei pushed him in, and he got an offer on three sides
股票网上开户及开户流程怎样?还有,在线开户安全么?
Mysql Duplicate entry ‘xxx‘ for key ‘xxx‘
[PHP] PHP pressure test, error reporting: generally, each socket address (Protocol / network address / port) is only allowed to be used
浮点数通信
mysql 死锁
炒股开户选择哪家证券公司比较好哪家平台更安全
Outsourcing for 3 years is a waste
[garment software] what are the criteria for the selection of garment production management system?
Time does not spare
网络方向哪个发展更好?数据通信工程师学习路线分享
Developers, why does the maturity of container technology herald the arrival of cloud native era?
【云原生】容器场景下的内核安全
Store log files in RAM to reduce physical storage loss
玉米地里的小鸟
[MRCTF2020]Ezpop-1|php序列化