软件测试步骤介绍 eNet硅谷动力

来源:百度文库 编辑:神马文学网 时间:2024/04/20 18:38:00
  #a1ad{width:980px}#articledh{width:980px;float:left;}body{font-size:12px;background:#424E5C;margin-top:0px;margin-left:8px;margin-right:0px}td{font-size:12px;}#top{width:980px;background:#ffffff}#main{width:980px;background:#ffffff;padding-left:1px;padding-right:2px;border-bottom:1px solid #B5C6D6;}#article{float:left;width:750px;background:#ffffff;padding-left:0px;padding-top:0px;}#other{float:right;width:226px;background:#EEF2F5;border-top:0px solid #B5C6D6;border-right:1px solid #B1C3D9;border-left:1px solid #B1C3D9;padding-left:2px;text-align:center;padding-top:0px;}#article, #other{padding-bottom: 2000px !important;margin-bottom: -2000px !important; }#loc{height:27px;margin-top:2px;margin-bottom:2px;color:#000000;font-size:12px;border:1px solid #DEDEE0;text-align:left;padding-left:20px;padding-top:5px;background: #FFFFEF ;}#page{padding:8px;padding-right:10px;background:#fff;text-align:right;}#contentf{margin-left:20px;margin-right:30px;margin-top:15px;padding-right:15px;}#content{font-size:14px;line-height:150%;margin-top:8px;}#digest{font-size:12px;line-height:150%;display:block;font-weight:nomal;margin-bottom:10px;margin-top:4px;}#a23{padding:5px;}#hua{margin-right:8px;margin-top:5px;}#keyword{margin-left:6px;margin-right:6px;margin-bottom:3px;width:735px;display:block;padding-left:15px;padding-top:3px;height:26px;border:1 solid #B1C3D9; font-size:12px;background:#F3FBFE;color:2220BF;background:url(/enews/images/top_a.jpg);}#dldh,#page{font-size:12px;margin-top:5px;}#dldh1{color:#2020BE;padding-top:8px;float:left;margin-left:3px;width:735px;height:26px;font-size:12px;text-align:left;background:url(/enews/images/top_a.jpg); border:1 solid #B1C3D9;padding-top:6px;padding-left:15px;}#xgwz,#page{font-size:12px;margin-top:5px;}#xgwz1{color:#2020BE;padding-top:8px;float:left;margin-left:3px;width:735px;height:26px;font-size:12px;text-align:left;background:url(/enews/images/top_a.jpg); border:1 solid #B1C3D9;padding-top:6px;padding-left:15px;}#xgcp{display:block;float:left;margin-left:3px;}#xgcp1{color:#2020BE;padding-top:8px;float:left;margin-left:3px;width:735px;height:26px;font-size:12px;text-align:left;background:url(/enews/images/top_a.jpg); border:1 solid #B1C3D9;padding-top:6px;padding-left:15px;}.prodtd{padding:5px;width:20%}.prodimg{border:solid 1 #c0c0c0}.prodname{background:#ffffff}#comment1{display:none;color:#2020BE;padding-top:8px;float:left;margin-left:3px;width:735px;height:26px;font-size:12px;text-align:left;background:url(/enews/images/top_a.jpg); border:1 solid #B1C3D9;padding-top:6px;padding-left:15px;}#tg{color:#2020BE;padding-top:8px;padding-top:6px;}.xgwzlist,.dldhlist{float:left; width=46%;margin-left:5px;padding-top:4px;}.xgwzlist1,.dldhlist1{float:right; width=46%;margin-left:5px;padding-top:4px;}.xgcp_p{float:left}#article h1{font-size:22px;font-weight:bold;}a.article:link{font-size:14px; color:#211FBE; text-decoration:underline; line-height:150%;}a.article:active{font-size:14px; color:#211FBE; text-decoration:underline; line-height:150%;}a.article:visited{font-size:14px; color:#211FBE; text-decoration:underline; line-height:150%;}a.article:hover{font-size:14px; color:#f00; text-decoration:underline; line-height:150%;}a.red:link{font-size:12px; color:#ff0000; text-decoration:none; line-height:150%;}a.red:active{font-size:12px; color:#0000ff; text-decoration:none; line-height:150%;}a.red:visited{font-size:12px; color:#a00000; text-decoration:none; line-height:150%;}a.red:hover{font-size:12px; color:#f00; text-decoration:none; line-height:150%;}a.white:link{font-size:12px; color:#ffffff; text-decoration:none; line-height:150%;}a.white:active{font-size:12px; color:#ffffff; text-decoration:none; line-height:150%;}a.white:visited{font-size:12px; color:#ffffff; text-decoration:none; line-height:150%;}a.white:hover{font-size:12px; color:#ffffff; text-decoration:none; line-height:150%;}a.blue:link{font-size:12px; color:#0526B1; text-decoration:none; line-height:150%;}a.blue:active{font-size:12px; color:#0526B1; text-decoration:none; line-height:150%;}a.blue:visited{font-size:12px; color:#0526B1; text-decoration:none; line-height:150%;}a.blue:hover{font-size:12px; color:#ff0000; text-decoration:none; line-height:150%;}a.black:link{font-size:12px; color:#000000; text-decoration:none; line-height:150%;}a.black:active{font-size:12px; color:#000000; text-decoration:none; line-height:150%;}a.black:visited{font-size:12px; color:#000000; text-decoration:none; line-height:150%;}a.black:hover{font-size:12px; color:#ff0000; text-decoration:none; line-height:150%;}#keyword a.article:link{font-size:12px; color:#211FBE; text-decoration:none; line-height:150%;}#keyword a.article:active{font-size:12px; color:#211FBE; text-decoration:none; line-height:150%;}#keyword a.article:visited{font-size:12px; color:#211FBE; text-decoration:none; line-height:150%;}#keyword a.article:hover{font-size:12px; color:#f00; text-decoration:none; line-height:150%;}#loc a.white:link{font-size:12px; color:#000000; text-decoration:none; line-height:150%;}#loc a.white:active{font-size:12px; color:#000000; text-decoration:none; line-height:150%;}#loc a.white:visited{font-size:12px; color:#000000; text-decoration:none; line-height:150%;}#loc a.white:hover{font-size:12px; color:#f00; text-decoration:none; line-height:150%;}a.white:link{font-size:12px; color:#ffffff; text-decoration:none; line-height:150%;}a.white:active{font-size:12px; color:#ffffff; text-decoration:none; line-height:150%;}a.white:visited{font-size:12px; color:#ffffff; text-decoration:none; line-height:150%;}a.white:hover{font-size:12px; color:#ffffff; text-decoration:none; line-height:150%;}#content img{border:1px solid #000000;}a.whitedh:link{font-size:18px; color:#ffffff; text-decoration:none; line-height:150%;}a.whitedh:active{font-size:18px; color:#ffffff; text-decoration:none; line-height:150%;}a.whitedh:visited{font-size:18px; color:#ffffff; text-decoration:none; line-height:150%;}a.whitedh:hover{font-size:18px; color:#ffffff; text-decoration:none; line-height:150%;}#bottom{width:980px;background:#ffffff}#a3{width:750px;float:left;}#digesttitle,#dldhtitle{color:#FF7908;} 

软件测试步骤介绍

#source table{font-size:12px;}  【 简介 】  测试过程按4个步骤进行,即单元测试、集成测试、确认测试和系统测试及发版测试... #dldhoption{display:none}  软件测试步骤

  测试过程按4个步骤进行,即单元测试、集成测试、确认测试和系统测试及发版测试。

  开始是单元测试,集中对用源代码实现的每一个程序单元进行测试,检查各个程序模块是否正确地实现了规定的功能。

  集成测试把已测试过的模块组装起来,主要对与设计相关的软件体系结构的构造进行测试。

  确认测试则是要检查已实现的软件是否满足了需求规格说明中确定了的各种需求,以及软件配置是否完全、正确。

  系统测试把已经经过确认的软件纳入实际运行环境中,与其它系统成份组合在一起进行测试。

  单元测试 (Unit Testing)

  单元测试又称模块测试,是针对软件设计的最小单位 ─ 程序模块,进行正确性检验的测试工作。其目的在于发现各模块内部可能存在的各种差错。

  单元测试需要从程序的内部结构出发设计测试用例。多个模块可以平行地独立进行单元测试。

  1. 单元测试的内容

  在单元测试时,测试者需要依据详细设计说明书和源程序清单,了解该模块的I/O条件和模块的逻辑结构,主要采用白盒测试的测试用例,辅之以黑盒测试的测试用例,使之对任何合理的输入和不合理的输入,都能鉴别和响应。

  (1) 模块接口测试

  在单元测试的开始,应对通过被测模块的数据流进行测试。测试项目包括:

  –调用本模块的输入参数是否正确;

  –本模块调用子模块时输入给子模块的参数是否正确;

  –全局量的定义在各模块中是否一致;

  在做内外存交换时要考虑:

  –文件属性是否正确;

  –OPEN与CLOSE语句是否正确;

  –缓冲区容量与记录长度是否匹配;

  –在进行读写操作之前是否打开了文件;

  –在结束文件处理时是否关闭了文件;

  –正文书写/输入错误,

  –I/O错误是否检查并做了处理。

  (2) 局部数据结构测试

  不正确或不一致的数据类型说明

  使用尚未赋值或尚未初始化的变量

  错误的初始值或错误的缺省值

  变量名拼写错或书写错

  不一致的数据类型

  全局数据对模块的影响

  (3) 路径测试

  选择适当的测试用例,对模块中重要的执行路径进行测试。

  应当设计测试用例查找由于错误的计算、不正确的比较或不正常的控制流而导致的错误。

  对基本执行路径和循环进行测试可以发现大量的路径错误。

  (4) 错误处理测试

  出错的描述是否难以理解

  出错的描述是否能够对错误定位

  显示的错误与实际的错误是否相符

  对错误条件的处理正确与否

  在对错误进行处理之前,错误条件是否已经引起系统的干预等

  (5) 边界测试

  注意数据流、控制流中刚好等于、大于或小于确定的比较值时出错的可能性。对这些地方要仔细地选择测试用例,认真加以测试。

  如果对模块运行时间有要求的话,还要专门进行关键路径测试,以确定最坏情况下和平均意义下影响模块运行时间的因素。

  2. 单元测试的步骤

  模块并不是一个独立的程序,在考虑测试模块时,同时要考虑它和外界的联系,用一些辅助模块去模拟与被测模块相联系的其它模块。

  –驱动模块 (driver)

  –桩模块 (stub) ── 存根模块

  如果一个模块要完成多种功能,可以将这个模块看成由几个小程序组成。必须对其中的每个小程序先进行单元测试要做的工作,对关键模块还要做性能测试。

  对支持某些标准规程的程序,更要着手进行互联测试。有人把这种情况特别称为模块测试,以区别单元测试。

  集成测试(Integrated Testing)

  集成测试 (集成测试、联合测试)

  通常,在单元测试的基础上,需要将所有模块按照设计要求组装成为系统。这时需要考虑的问题是:

  – 在把各个模块连接起来的时侯,穿越模块接口的数据是否会丢失;

  – 一个模块的功能是否会对另一个模块的功能产生不利的影响;

  – 各个子功能组合起来,能否达到预期要求的父功能;

  – 全局数据结构是否有问题;

  – 单个模块的误差累积起来,是否会放大,从而达到不能接受的程度。

  在单元测试的同时可进行集成测试,发现并排除在模块连接中可能出现的问题,最终构成要求的软件系统。

  子系统的集成测试特别称为部件测试,它所做的工作是要找出集成后的子系统与系统需求规格说明之间的不一致。

  通常,把模块集成成为系统的方式有两种

  –一次性集成方式

  –增殖式集成方式