Key Terms correctness 166 correctness proof 167 defect 155 desk check 175 error 155 execution-based testing 163 failure 155 fault 155 fault density 162 fault detection effi ciency 162 fault detection rate 162 follow-up 160 inspection 159 inspection rate 162 loop invariant 169 managerial independence 156 mean time betweenfailures 164sch76183_ch06_154-182.indd 177 04/06/10 1:28 PM178 Part A Software Engineering Concepts mean time to repair 164 mistake 155 model checking 174 moderator 160 non-execution-based testing157 overview 159 performance 165 preparation 159 quality 156 reader 160 recorder 160 regression testing 176 reliability 164 rework 160 robustness 165 simulator 164 software quality assurance(SQA) 156 systematic testing 175 test workfl ow 155 testing 155 utility 164 V & V 155 validation 155 verifi cation 155 Problems 6.1 How are the termscorrectness proving, verifi cation, andvalidation used in this book? 6.2 A software development organization currently employs 91 software professionals, including 18 managers, all of whom develop as well as test software. The latest fi gures show that26 percent of their time is spent on testing activities. The average annual cost to the company ofa manager is $162,000, whereas nonmanagerial professionals cost $121,000 a year on average;both fi gures include overhead. Use cost–benefi t analysis to determine whether a separate SQAgroup should be set up within the organization. 6.3 Repeat the cost–benefi t analysis of Problem 6.2 for a fi rm with only eight software professionals, including three managers. Assume that the other fi gures remain unchanged. 6.4 You have been testing a code artifact for 11 days and found two faults. What does this tell youabout the existence of other faults? 6.5 What are the similarities between a walkthrough and an inspection? What are the differences? 6.6 You are a member of the SQA group at Ye Olde Fashioned Software. You suggest to your manager that inspections be introduced. He responds that he sees no reason why four people shouldwaste their time looking for faults when one person can run test cases on the same piece ofcode. How do you respond? 6.7 You are the SQA manager at Farm and Field, a national chain of 1539 farm supply stores. Yourorganization is considering buying a stock-control package for use throughout the organization.Before authorizing the purchase of the package, you decide to test it thoroughly. What properties of the package do you investigate? 6.8 All 1539 stores in the Farm and Field organization are now to be connected by a communications network. A sales representative is offering you a 6-week free trial to experiment with thecommunications package he is trying to sell you. What sort of software tests would you performand why? 6.9 You are a rear admiral in the Valerian Navy in charge of developing the software for controllingthe ship-to-ship missile of Problem 1.4. The software has been delivered to you for acceptancetesting. What properties of the software do you test? 6.10 Consider the following code fragment: k = 0;g = 1;while (k < n){ k = k + 1; g = g * k;}sch76183_ch06_154-182.indd 178 04/06/10 1:28 PMChapter 6 Testing 179 Prove that this code fragment correctly computes g = n! if n is a positive integer. 6.11 Consider the following code fragment: m = 1;q = 2;while (m < n){ m = m + 1; q = q * 2;} Prove that this code fragment correctly computes q = 2n if n ∈ {1, 2, 3, . . . }. 6.12 Can correctness proving solve the problem that the product as delivered to the client may not bewhat the client really needs? Give reasons for your answer. 6.13 How should Dijkstra’s statement (Section 6.3) be changed to apply to correctness proofs ratherthan testing? Bear in mind the mini case study of Section 6.5.2. 6.14 Design and implement a solution to the Naur text-processing problem (Section 6.5.2) usingthe language specifi ed by your instructor. Execute it against test data and record the number offaults you fi nd and the cause of each fault (e.g., logic fault, loop counter fault). Do not correctany of the faults you detect. Now exchange products with a fellow student and see how manyfaults each of you fi nds in the other’s product and whether or not they are new faults. Againrecord the cause of each fault and compare the fault types found by each of you. Tabulate theresults for the class as a whole. 6.15 Why is there a need to distinguish between a fault, a failure, and an error? Surely the use of theumbrella termdefect simplifi es matters? 6.16 Give an example of a software product that has been successfully maintained for many years,but has lost its usefulness and has been superseded by a totally different product. 6.17 (Term Project) Explain how you would test the utility, reliability, robustness, performance, andcorrectness of the Chocoholics Anonymous product in Appendix A. 6.18 (Readings in Software Engineering) Your instructor will distribute copies of [Ostrand, Weyuker,and Bell, 2005]. What is your view on using regression models to predict fault numbers andlocations? Justify your answer. References [Aberdour, 2007] M. ABERDOUR, “Achieving Quality in Open-Source Software,”IEEE Software24(January–February 2007), pp. 58–64. [Ackerman, Buchwald, and Lewski, 1989] A. F. ACKERMAN, L. S. BUCHWALD, AND F. H. LEWSKI,“Software Inspections: An Effective Verifi cation Process,”IEEE Software6 (May 1989),pp. 31–36. [Ammann and Offutt, 2008] P. AMMANN AND J. OFFUTT,Introduction to Software Testing, CambridgeUniversity Press, Cambridge, UK, 2008. [Beizer, 1990] B. BEIZER,Software Testing Techniques, 2nd ed., Van Nostrand Reinhold, NewYork, 1990. [Berry and Wing, 1985] D. M. BERRY AND J. M. WING, “Specifying and Prototyping: Some Thoughtson Why They Are Successful,” in:Formal Methods and Software Development, Proceedings ofthe International Joint Conference on Theory and Practice of Software Development , Vol. 2,Springer-Verlag, Berlin, 1985, pp. 117–28.sch76183_ch06_154-182.indd 179 04/06/10 1:28 PM180 Part A Software Engineering Concepts [Boehm and Basili, 2001] B. BOEHM AND V. R. BASILI, “Software Defect Reduction Top Ten List,”IEEE Computer34 (January 2001), pp. 135–37. [Bush, 1990] M. BUSH, “Improving Software Quality: The Use of Formal Inspections at the Jet Propulsion Laboratory,”Proceedings of the 12th International Conference on Software Engineering ,Nice, France, March 1990, IEEE, pp. 196–99. [Ciolkowski, Laitenberger, and Biffl , 2003] M. CIOLKOWSKI, O. LAITENBERGER, S. BIFFL, “SoftwareReviews, the State of the Practice,”IEEE Software20 (November–December 2003), pp. 46–51. [Damian and Chisan, 2006] D. DAMIAN AND J. CHISAN, “An Empirical Study of the Complex Relationships between Requirements Engineering Processes and Other Processes that Lead to Payoffsin Productivity, Quality, and Risk Management,”IEEETransactions on Software Engineering32(July 2006), pp. 433–53. [DeMillo, Lipton, and Perlis, 1979] R. A. DEMILLO, R. J. LIPTON, AND A. J. PERLIS, “Social Processes and Proofs of Theorems and Programs,”Communications of the ACM22 (May 1979),pp. 271–80. [DeMillo, Lipton, and Sayward, 1978] R. A. DEMILLO, R. J. LIPTON, AND F. G. SAYWARD, “Hintson Test Data Selection: Help for the Practicing Programmer,”IEEE Computer11 (April 1978),pp. 34–43. [Denger and Shull, 2007] C. DENGER AND F. SHULL, “A Practical Approach for Quality-Driven Inspections,”IEEE Software24 (March–April 2007), pp. 79–86. [Dijkstra, 1968] E. W. DIJKSTRA, “A Constructive Approach to the Problem of Program Correctness,”BIT8 (No. 3, 1968), pp. 174–86. [Dijkstra, 1972] E. W. DIJKSTRA, “The Humble Programmer,”Communications of the ACM15(October 1972), pp. 859–66. [Dunsmore, Roper, and Wood, 2003] A. DUNSMORE, M. ROPER, AND M. WOOD, “The Developmentand Evaluation of Three Diverse Techniques for Object-Oriented Code Inspection,”IEEE Transactions on Software Engineering29 (August 2003), pp. 677–86. [Fagan, 1976] M. E. FAGAN, “Design and Code Inspections to Reduce Errors in Program Development,”IBM Systems Journal15 (No. 3, 1976), pp. 182–211. [Fagan, 1986] M. E. FAGAN, “Advances in Software Inspections,”IEEE Transactions on SoftwareEngineering SE-12 (July 1986), pp. 744–51. [Fowler, 1986] P. J. FOWLER, “In-Process Inspections of Workproducts at AT&T,”AT&T TechnicalJournal65 (March–April 1986), pp. 102–12. [Freimut, Briand, and Vollei, 2005] B. FREIMUT, L. C. BRIAND, AND F. VOLLEI, “Determining Inspection Cost-Effectiveness by Combining Project Data and Expert Opinion,”IEEE Transactions onSoftware Engineering31 (December 2005), pp. 1074–92. [Fu, Milanova, Ryder, Wonnacott, 2005] C. FU, A. MILANOVA, B. G. RYDER, AND D. G. WONNACOTT,“Robustness Testing of Java Server Applications,”IEEE Transactions on Software Engineering31 (April 2005), pp. 292–311. [Gelperin and Hetzel, 1988] D. GELPERIN AND B. HETZEL, “The Growth of Software Testing,”Communications of the ACM31 (June 1988), pp. 687–95. [Goodenough, 1979] J. B. GOODENOUGH, “A Survey of Program Testing Issues,” in:ResearchDirections in Software Technology , P. Wegner (Editor), The MIT Press, Cambridge, MA, 1979,pp. 316–40. [Goodenough and Gerhart, 1975] J. B. GOODENOUGH AND S. L. GERHART, “Toward a Theory of TestData Selection,”Proceedings of the Third International Conference on Reliable Software , LosAngeles, 1975, pp. 493–510; also published inIEEE Transactions on Software EngineeringSE-1sch76183_ch06_154-182.indd 180 04/06/10 1:28 PMChapter 6 Testing 181(June 1975), pp. 156–73. Revised version: J. B. Goodenough and S. L. Gerhart, “Toward a Theoryof Test Data Selection: Data Selection Criteria,” in:Current Trends in Programming Methodology,Vol. 2, R. T. Yeh (Editor), Prentice Hall, Englewood Cliffs, NJ, 1977, pp. 44–79. [Hatton, 2008] L. HATTON, “Testing the Value of Chec
đang được dịch, vui lòng đợi..