创业管理李雪灵)part 2-whitebox
Unit testing and integration testing There are two approaches to this incremental testing: bottom-up and top-down. An Example of Module Testing The C language function that performs this operation is atoi(), which stands for ASCII to Integer. If youre going to perform dynamic white-box testing on this module, what would you do? First, you would probably decide that this module looks like a bottom module in the program, and write a test driver to exercise the module independently from the rest of the program. This test driver can take on several forms. It could be a simple dialog box, as shown in Figure 7.7 Or it could be a standalone program that reads test strings and expected results from a file. Next, you would analyze the specification to decide what black-box test cases you should try and then apply some equivalence partitioning techniques to reduce the total set Lastly, you would look at the code to see how the function was implemented and use your white-box knowledge of the module to add or remove test cases. Unit and Integration Testing ?Unit and Integration Testing Unit and Integration Testing Testing that occurs at the lowest level is called unit testing or module testing. As the units are tested and the low-level bugs are found and fixed, they are integrated and integration testing is performed against groups of modules. This process of incremental testing continues, putting together more and more pieces of the software until the entire productor at least a major portion of it is tested at once in a process called system testing. With this testing strategy, its much easier to isolate bugs. A test driver can replace the real software and more efficiently test a low-level module In bottom-up testing , you write your own modules, called test drivers, that exercise the modules youre testing. A test stub sends test data up to the module being tested. In top-down testing, you could write a small piece of code called a stub that acts just like the
您可能关注的文档
最近下载
- 公共营养师第四章-食物营养基础.ppt
- 课件-剑桥商务英语(初级)BEC Preliminary.ppt VIP
- 给排水国标图集-04S516:混凝土排水管道基础及接口.pdf VIP
- 2026年小学三年级语文下册全册教案.pdf
- 2024年高考真题——政治(湖南卷)Word版含答案.docx VIP
- 马克思主义与社会科学方法论课后习题答案 2025版.pdf
- 风机特性曲线.docx VIP
- 《现代礼仪》全套教学课件.pptx
- Unit+11+Lesson+1+Living+in+a+Community高中英语北师大版(2019)选择性必修第四册.doc VIP
- J系列开式可倾压力机参数.docx VIP
原创力文档

文档评论(0)