什么是软件测试技术?
Software testing is any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results
软件测试时旨在评估程序或者系统的属性或能力,判定它是否满足要求的结果。
Software Testing is an empirical(观察和实验) investigation conducted to provide stakeholders with information about the quality of the product or service under test
软件测试是通过观察和实验来为利益相关者提供有关产品或者服务的测试信息。
Software testing is any activity , which exists through the whole lifecycle, aimed at testing a program by using test cases to test the software behaviors(true/false)
软件测试技术是 任何一种在整个生命周期种都存在的,旨在通过测试用例测试程序的软件行为的活动(包括需求和文档)。
为什么进行软件测试?
管理软件的开发过程(Process)
Manage the process of S/W development
更好的设计,编制软件
Better Design and Coding
掌握软件测试的原理和方法,提高软件可靠性
Grasp the theory and methodology, promote the S/W reliability
测试的error example
void main(void)
{
char aaa;
while(1)
{
if(OneSecondPassed())aaa++;
if(aaa >200)
{
Class_Is_over();
}
else
{
Lesson_to_Lecture();
}
}
}
char aaa;没有初始化。
aaa++;循环没有跳出的条件,所以aaa可能会溢出。
if(aaa>200) char类型取值范围为-128到127,所以永远不会下课。
理解软件测试
保证软件正确地满足需求:
每一个环节都会有理解、设计、表达、编码、运行和输入的正确性保证。 否则就会产生问题。 传话游戏 日常布置工作使用电话传达,没有落到纸上,最后 做的工作可能与实际大相径庭。 提早确认非常重要。
软甲缺陷的原因
需求误解misunderstanding of requirements
需求设计错误Requirements design errors
对涉及内容的误解Misunderstanding of design content
编码错误Coding errors
软件测试失败Program execution failed
没有满足需求Do not meet the requirements
测试设计
测试分类
黑盒测试 Black box testing(Function testing)
黑盒测试也称功能测试,它是通过测试来检测每个功能是否都能正常使用。在测试中,把程序看作一个不能打开的黑盒子,在完全不考虑程序内部结构和内部特性的情况下,在程序进行测试,它只检查程序功能是否按照需求规格说明书的规定正常使用,程序是否能适当地接收输入数据而产生正确的输出信息。黑盒测试着眼于程序外部结构,不考虑内部逻辑结构,主要针对软件界面和软件功能进行测试。