上游充通大皇 SJTU School Of Software 2009-2-3 Chapter 2 fundamentals of software test 软件学院
SJTU School Of Software 2009-2-3 软件学院 Chapter 2 fundamentals of software test
上游充鱼大 SJTU School Of Software 2009-2-3 2.1 Goals of testing 2.2 Facts About Testing 2.3 Glossary(术语) 2.4 Fundamental theory 2.5 Basic methods of software test 软件学院
SJTU School Of Software 2009-2-3 软件学院 2.1 Goals of testing 2.2 Facts About Testing 2.3 Glossary(术语) 2.4 Fundamental theory 2.5 Basic methods of software test
上浒充通大学 SJTU School Of Software 2009-2-3 2.1 Goals of testing Testing is a process of executing a program with the intent of finding an error. A good test is one that has a high probability of finding an as yet undiscovered error. A successful test is one that uncovers an as yet undiscovered error. The objective is to design tests that systematically uncover different classes of errors and do so with a minimum amount of time and effort. 软件学院
SJTU School Of Software 2009-2-3 软件学院 2.1 Goals of testing Testing is a process of executing a program with the intent of finding an error. A good test is one that has a high probability of finding an as yet undiscovered error. A successful test is one that uncovers an as yet undiscovered error. The objective is to design tests that systematically uncover different classes of errors and do so with a minimum amount of time and effort
上游充鱼大姿 SJTU School Of Software 2009-2-3 Demonstrate that software functions appear to be working according to specification. That performance requirements appear to have been met. Data collected during testing provides a good indication of software reliability and some indication of software quality. Testing cannot show the absence of defects,it can only show that software defects are present. 软件学院
SJTU School Of Software 2009-2-3 软件学院 Demonstrate that software functions appear to be working according to specification. That performance requirements appear to have been met. Data collected during testing provides a good indication of software reliability and some indication of software quality. Testing cannot show the absence of defects, it can only show that software defects are present
上泽充通大 SJTU School Of Software 2009-2-3 2.2 Facts About Testing ◆( Question "does program P obey specification S”is undecidable! Every testing technique embodies some compromise between accuracy and computational cost ◆Facts Inaccuracy is not a limitation of the technique It is theoretically impossible to devise a completely accurate technique Every practical technique must sacrifice accuracy in some way 软件学院
SJTU School Of Software 2009-2-3 软件学院 2.2 Facts About Testing Question “does program P obey specification S” is undecidable! Every testing technique embodies some compromise between accuracy and computational cost Facts – Inaccuracy is not a limitation of the technique – It is theoretically impossible to devise a completely accurate technique – Every practical technique must sacrifice accuracy in some way
上游充鱼大姿 SJTU School Of Software 2009-2-3 Why? 必 The current development methods of software are: Depend on people's intelligence Specification is informal or even chaos > Software development tools are not self- contained > Software development process is elective and without standards on detail 在当前的软件开发方法学指导下开发软件,软件 测试仍是保证软件质量和可靠性的重要手段。 软件学院
SJTU School Of Software 2009-2-3 软件学院 Why? The current development methods of software are: ¾ Depend on people’s intelligence ¾ Specification is informal or even chaos ¾ Software development tools are not selfcontained ¾ Software development process is elective and without standards on detail 在当前的软件开发方法学指导下开发软件,软件 测试仍是保证软件质量和可靠性的重要手段
上游充鱼大 SJTU School Of Software 2009-2-3 Cost/benefit Testing takes more than 50%of the total cost of software development More for critical software Software quality will become the dominant success criterion 软件学院
SJTU School Of Software 2009-2-3 软件学院 Cost/benefit • Testing takes more than 50% of the total cost of software development – More for critical software • Software quality will become the dominant success criterion
上浒充通大 SJTU School Of Software 2009-2-3 The understanding of software test Exhausted test is impossible to realized. > Software test can not ensure to uncover all errors of a software. Software test can not instead of other quality insurance methods 软件测试:巨大的效益和艰苦的工作并存 软件学院
SJTU School Of Software 2009-2-3 软件学院 The understanding of software test 软件测试:巨大的效益和艰苦的工作并存 ¾ Exhausted test is impossible to realized. ¾ Software test can not ensure to uncover all errors of a software. ¾ Software test can not instead of other quality insurance methods
上游充道大粤 SJTU School Of Software 2009-2-3 Some examples 1 Exception if(state =0) { } state ==i 1) {..}; 软件学院
SJTU School Of Software 2009-2-3 软件学院 Some examples 1 Exception if(state = = 0) { … } if(state = = 1) { … } ;
上游充鱼大 SJTU School Of Software 2009-2-3 2 Data overflow Int count(int &a,int month_num) int month_income 0,i; for(i=0;i<month_num;i++) month_income+=a[i]; return month_income; } 11 000<a[i<10000 软件学院
SJTU School Of Software 2009-2-3 软件学院 2 Data overflow Int count( int &a, int month_num) { int month_income = 0, i; for( i = 0; i< month_num; i++) month_income+=a[i]; return month_income; } //1000<a[i]<10000