当前位置:网站首页>常用测试用例设计方法之场景法详解
常用测试用例设计方法之场景法详解
2022-06-11 03:35:00 【二 黑】
场景法用例设计
现在的软件几乎都是由事件触发来控制流程的,事件触发时的情景便形成了场景,而同一事件不同的触发顺序和处理结果形成事件流。
这种在软件设计方面的思想也可被引入到软件测试中,生动的描绘出事件触发时的情景,有利于测试设计者设计测试用例,同时测试用例也更容易的得到理解和执行。
用例场景用来描述流经用例的路径,从用例开始到结束遍历这条路径上所有基本流和备选流。
场景说明
基本流:是流经用例的最重要路径,图中的黑线。
备选流:自基本流开始,之后会在某特定条件下执行。

可能重新加入基本流(备选流1和3)
可能起源于另一备选流(备选流2)
终止用例不再重新加入某个流(备选流2和4)
流程分析法的基本设计步骤
画出业务流程图
定义状态节点和条件分支
确定测试路径
选取测试数据,构造测试用例
场景法总结
场景法的重点在测试流程,因此每个流程用一组测试用例验证即可。
场景法需要分两步进行,第一步确定系统的业务流程,第二步再针对于每一个业务流程使用若干个测试数据进行验证。
错误猜测法
错误猜测法的概念:基于经验和直觉推测程序中所有可能存在的各种错误,从而有针对性的设计测试用例的方法。
错误猜测方法的基本思想:列举出程序中所有可能有的错误和容易发生错误的特殊情况,根据它们选择测试用例。
举例:
在单元测试时曾列出的许多在模块中常见的错误、以前产品测试中曾经发现的错误等,这些就是经验的总结。
输入数据和输出数据为0的情况、输入表格为空格或输入表格只有一行等。这些都是容易发生错误的情况,可选择这些情况下的例子作为测试用例。
生僻字错误猜测法。
局限性
学习资源分享
最后感谢每一个认真阅读我文章的人,看着粉丝一路的上涨和关注,礼尚往来总是要有的,虽然不是什么很值钱的东西,如果你用得到的话可以直接拿走
这些资料,对于想从事【软件测试】的朋友来说应该是最全面最完整的备战仓库,这个仓库也陪伴我走过了最艰难的路程,希望也能帮助到你!加入我们下方交流群就可以免费获取了,希望对大家有所帮助…….
边栏推荐
- Right click PowerShell here function add
- 正则表达式
- 路径计数2(dp + 组合数)
- Course classification tree structure display
- 右键 powershell here 功能添加
- JS click the sun and moon to switch between day and night JS special effect
- Computer vision (AI) interview
- ARM开发板方案与厂商分析
- three. JS cool technology background H5 animation
- Integrated MP code generator
猜你喜欢

js顶部图标菜单点击切换背景色js特效

Integrated MP code generator

/The world of 10 recommended websites for learning programming has entered the era of the Internet. According to a recently released Internet trends 2016 report, China has become a leader in the Inter

PostgreSQL source code learning (18) -- mvcc ③ - creating (obtaining) snapshots

SQL query users logged in for three consecutive days

If no separation ----- > > login module nanny level source code analysis (0)

OpenGL错误指南
![[elt.zip] openharmony paper Club - multi tier storage hierarchical data compression](/img/28/ec83b2ebb1f0772acdec443525c26d.png)
[elt.zip] openharmony paper Club - multi tier storage hierarchical data compression

Understand single chip microcomputer drive 8080lcd

基于SSM框架的学生在线教育教学课程管理系统
随机推荐
路径计数2(dp + 组合数)
Instructor add function_ Enable auto fill_ Instructor modification function
Lua removing elements from a loop in a list
基于SSM框架的学生老师考试管理系统
用Fragment实现图片简易浏览
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
OPENSSL ASN.1, DER, PEM, X509
Course classification tree structure display
regular expression
Iqoo 8 measured hands-on experience: return of the king, never high profile
three. JS cool technology background H5 animation
Product milestones in May 2022
Implementation of publish and subscribe mode ----- hand tearing JS series
多线程四部曲之pthread
多线程交替输出AB
Canvas interactive star animation background JS special effect
Right click PowerShell here function add
1_ Attribute management function
ImportError: DLL load failed while importing _ Sqlite3: the specified module could not be found
js实现柯里化
