编程:关于testing和debugging
来源:互联网 发布:阿里云备份 编辑:程序博客网 时间:2024/05/20 13:08
2014.4.11
参考材料:Data Structures, Algorithms, and Applications in C++: Sartaj Sahni
1.5 Testing and Debugging
(1~4:what is testing)(5:Designing Test Data)
1: "Verifying agreement between observed and expected behabior on a proper subset of the possible inputs does not prove that the program works correctly on all inputs."
意思是说,你不太可能将所有可能的输入都进行测试,如一个输入需要int类型数据,则你要测试2^32个输入(大概有4*10^9)。因此我们往往是从所有可能的输入中选取一个test subset。所以就算这个test subset中所有输入测试都正确,你也不能确定这个程序在整个输入集上都正确。
2" As a result of the above idea, "the objective of tesing is not to establish correctness, but to expose the presence of errors.", and "different test sets can expose different errors in a program."
意思是说,按照上面那个观点进一步说。既然测试一个subset不能确保这个程序对所有输入都正确,那么测试一个test subset的主要意义就不是证明这个程序完全正确。测试一个subset的主要意义是要expose程序中的error。
3: "if the test data did not execute all statements of the code, we have less confidence in the correctness of the stetements that are no executed."
4; "test set that executes all statements of program has a better chance of exposing the errors in the code."
item3和4的意思是说,如果测试的数据能让程序的每个部分都运行过,那么我们就更有信心说这个程序没有问题。(因为如果test subset让程序的某一部分没有运行过,那我们就not confident about那个没有运行的部分是不是没有问题)
5; "Techniques for test data development fall into two categories: balck box methods & white box methods."
"In a black box method, we consider the program's function, not the actual code, when we develop test data."
"In a white box method, we examine the code in a an attempt to develop test data whose execution results in a good coverage of the program's stetements and execution paths."
测试数据的设计技术按照需不需要观察程序代码分为:黑盒技术和白盒技术
用黑盒技术设计来测试集,是根据程序的功能来设计,不看代码;
白盒技术设计,则是观察代码,设计出一个test subset使得程序的每个部分都充分运行,提高我们的confidence
6: "Testing exposes the presence of error in a program"
"Debugging is the precess of determining and correcting the cause of the discrepency between the desired and observed behaviors"
就是说,Testing是告诉你程序中存在问题呀!而你Debug来确定问题的原因,并且改正
7: some suggestions for debugging(first & last seems good; second not understood, though)
- 编程:关于testing和debugging
- Debugging and Testing F# Programs
- Lesson 6 Testing and Debugging
- Lecture 11: Testing and debugging
- Linux Kernel Testing and Debugging
- 翻译 Secrets of the JavaScript Ninja - 2.测试和debug(2.Testing and debugging)
- 测试与调试(Testing && Debugging)
- 苹果关于TestFlight Beta Testing简介和细节信息
- 苹果关于TestFlight Beta Testing简介和细节信息
- [收藏]Using Mozilla in testing and debugging web sites
- Develop C++ subroutines 10 times faster. No debugging. No testing.
- MIT《Introduction to Computer Science and Programming》: Testing and Debugging
- 《Testing with Xcode》第五章——Debugging Tests
- 关于OWASP TESTING GUIDE
- 关于TestFlight Beta Testing
- 关于hit-testing机制
- Testing和Instrumentation
- Testing和Instrumentation
- Fragment使用总结
- mac os x10.9下如何使用git与github
- POJ-2828 Buy Tickets
- Python3.x学习笔记[2.5]灵活使用urllib与re
- java 死锁及解决
- 编程:关于testing和debugging
- Noi2012四川省选day1 喵星球上的点名_(后缀数组) 代码及解析(详细)
- ZOJ 3430 Detect the Virus(AC自动机+字符串转换)
- error LNK2019: unresolved external symbol "public: class CVD::ImageRef __thiscall VideoSou
- QTP 描述性编程 VS 录制
- 交通灯模拟系统
- Java内存分配
- 银行系统
- Struts2获取request三种方法