【软件测试】黑盒测试black box testing

又称为功能测试function testing、行为测试behavior testing

黑盒测试测试不知道代码细节的软件

Black box testing test software without knowing how it is coded.

测试目的:判断输入和输出是否符合软件要求

黑盒测试的特点:

  • 程序被视为一个黑盒。Program is treated as a black box.
  • 实现细节并不重要。Implementation details do not matter.
  • 需要一个最终用户的视角。Requires an end-user perspective.
  • 测试计划可以在规格说明完成后尽早开始。Test planning can begin early as soon as the specification has been finished.

优势advantage:

1. 不需要知道代码细节

2. 相互独立

3. 可以在说明书完成后就设计测试用例,不用等代码完成

缺陷disadvantages:

1. 有冗余

2. 没有说明书

3. 输出不现实

4. 很难发现错误的位置

静态黑盒测试(测试说明书)testing the spec

测试说明书是静态黑盒测试。testing the specification is static black box testing.

tips:

1. 当为给顾客考虑时,不要忘记软件安全问题

2. 

怎么做

high-level

检查产品说明书(没有固定格式,实再想不出来就去和开发团队聊一聊)

原则
  • Don`t start by looking for bugs in great detail
  • play at being the customer
  • assume nothing-question until you are
  • guideline
  • review

low-level

产品说明书特征检查清单specification attributes checklist:complete(内容完整), accurate(不能有歧义), precise, consistent, relevant, feasible, code-free

产品说明书术语检查清单specification terminology checklist(慎用): always, every, all, none, never\certainly, therefore, clearly, obviously\some, sometimes, often, usually, ordinarily

动态黑盒测试dynamic black-box testing

减少测试案例个数

确定哪些案例需要测试

怎么定义最糟糕情况

数据测试data testing

Boundary conditions

If software can operate on the edge of its capabilities, it will almost certainly operate well under normal conditions.

For the boundaries, partition input into:

  •  - Valid data inside the boundary.
  •  - Data just on the boundary (which may be valid or invalid).
  •  - Invalid data just outside the boundary limits.

Sub-boundary conditions

Nulls

Bad data

BVA(boundary value analysis)

测试案例是4n+1,n为变量

Guideline

范围

选六个(两个边界值,大于和小于边界值,最大值和最小值)

集合

布尔值

状态测试state testing

黑盒测试的一部分,测试软件的逻辑流向demonstrats logic flow of some software

重点是状态和状态的转换

手段:

1. 使用等价位划分去选择测试状态和路径

2. 通过智能选择减少案例

指导

1. 每种状态至少访问一次View each state at least once

2. 测试看起来最普通和最常见的状态转换Test state-to-state transitionns that look like the most common or popular

3. 测试状态之间最不常见的分支Test the least common papaths between states

4. 测试所有错误状态和其返回值Test all the error states and rereturning from the error states

5. 测试随机状态条件Test random state transitions

要求

1. 不要上升到代码层次

Race condition

Multiple processes racing to a finish line, not knowing which will get first

bad timing

Two or more events line up just right and confuse software that didn't expect to be
interrupted in the middle of its operation, it's bad timing.

重复测试Repetition testing

一直做同样的事情

压力测试Stress testing

“饿一饿”软件:不给必要的数据,资源

在不理想的状态时运行,例如内存不足、配置过低,cpu差

其他技术

Behave Like a Dumb User (inexxperienced user)
 Throw out any preconceived iideas
 Look for Bugs Where Youve A Already Found Them
the more bugs you find, the monore bugs there are
Think like a Hacker
Seek to find vulnerabilities and exexploit it& Folow Experience, Intuition, and Huncnches (预感)
Experience is the name everyone giveves to their mistakes

加载测试Load testing

与stress testing相反

给所有软件所需的资源和任务,甚至远远大于要求

  • 9
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

岩塘

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值