Chapter 8 – Software testing. The objective of this chapter is to introduce software testing and software testing processes. When you have read the chapter, you will: understand the stages of testing from testing, during development to acceptance testing by system customers; understand the stages of testing from testing, during development to acceptance testing by system customers; understand test-first development, where you design tests before writing code and run these tests automatically;. | Chapter 8 – Software Testing Lecture 1 1 Chapter 8 Software testing Topics covered Development testing Test-driven development Release testing User testing 2 Chapter 8 Software testing Program testing Testing is intended to show that a program does what it is intended to do and to discover program defects before it is put into use. When you test software, you execute a program using artificial data. You check the results of the test run for errors, anomalies or information about the program’s non-functional attributes. Can reveal the presence of errors NOT their absence. Testing is part of a more general verification and validation process, which also includes static validation techniques. Chapter 8 Software testing 3 Program testing goals To demonstrate to the developer and the customer that the software meets its requirements. For custom software, this means that there should be at least one test for every requirement in the requirements document. For generic software products, it | Chapter 8 – Software Testing Lecture 1 1 Chapter 8 Software testing Topics covered Development testing Test-driven development Release testing User testing 2 Chapter 8 Software testing Program testing Testing is intended to show that a program does what it is intended to do and to discover program defects before it is put into use. When you test software, you execute a program using artificial data. You check the results of the test run for errors, anomalies or information about the program’s non-functional attributes. Can reveal the presence of errors NOT their absence. Testing is part of a more general verification and validation process, which also includes static validation techniques. Chapter 8 Software testing 3 Program testing goals To demonstrate to the developer and the customer that the software meets its requirements. For custom software, this means that there should be at least one test for every requirement in the requirements document. For generic software products, it means that there should be tests for all of the system features, plus combinations of these features, that will be incorporated in the product release. To discover situations in which the behavior of the software is incorrect, undesirable or does not conform to its specification. Defect testing is concerned with rooting out undesirable system behavior such as system crashes, unwanted interactions with other systems, incorrect computations and data corruption. 4 Chapter 8 Software testing Validation and defect testing The first goal leads to validation testing You expect the system to perform correctly using a given set of test cases that reflect the system’s expected use. The second goal leads to defect testing The test cases are designed to expose defects. The test cases in defect testing can be deliberately obscure and need not reflect how the system is normally used. 5 Chapter 8 Software testing Testing process goals Validation testing To demonstrate to the developer and the system