程序代写案例-CS265

  • January 13, 2021

SEMESTER 1 January 2020 Examination CS265 Software Testing Dr M. Huggard, Dr J. Timoney, Dr. R. Bierig Time allowed: 2 hours Answer a least three Questions Your mark will be based on your best three answers All questions carry equal marks Instructions Yes No Log Books Allowed X Formula Tables Allowed X Other Allowed (enter details) X All questions carry General (enter details) CS265 Page 1 of 2 January 2020 1. [25 marks] Software testing emerged and exists for good reasons with many examples and motivations that we discussed in class. (a) Highlight an event that led to the beginning of the software industry and the mass production of software. [5 marks] (b) Describe a specific example of a software failure with severe consequences and explain what caused it. [8 marks] (c) Explain the term ‘software crisis’ in its historical context, highlight specific problems that were associated with it, and explain what positive results this had for the software industry. [12 marks] CS265 Page 2 of 2 January 2020 2. [25 marks] Consider the following description: Driving in the Republic of Ireland is regulated is regulated by speed limits. We consider five different types of general speed limits: • Town speed limit: 50 km/h; • National road speed limit: 100 km/h; • Regional speed limit: 80 km/h; • Motorway speed limit: 120 km/h; • Special speed limit: 30 km/h. Note: We do not consider any technical limitations for speed for specific vehicles (e.g. agricultural vehicles) and additional exceptions (e.g. for ambulances). We further exclude the special speed limit of 60 km/h. Other more specific speed limits are also excluded here. Further, consider a method that determines if you are speeding or not: boolean areYouSpeeding(int yourSpeed, enum roadType) where the boolean output variable is true if you are speeding (and false otherwise), and the roadType represents the different types of environments as described in the specification text. (a) Create the value line for the input variable yourSpeed (int) and create a table with the equivalence partitions based on the specification above. [15 marks] (b) Equivalence partitioning is one type of black-box testing technique. State at least 3 strengths and 3 weaknesses of equivalence partitioning? [6 marks] (c) How do black-box and white-box testing techniques fundamentally differ? [4 marks] CS265 Page 3 of 2 January 2020 3. [25 marks] Consider the following method: 22 public static Status giveDiscount(long bonusPoints, boolean goldCustomer) 23 { 24 Status rv = ERROR; 25 long threshold=goldCustomer?80:120; 26 long thresholdJump=goldCustomer?20:30; 27 28 if (bonusPoints>0) { 29 if (bonusPoints30 bonusPoints -= threshold; 31 if (bonusPoints>thresholdJump) 32 bonusPoints -= threshold; 33 bonusPoints += 4*(thresholdJump); 34 if (bonusPoints>threshold) 35 rv = DISCOUNT; 36 else 37 rv = FULLPRICE; 38 } 39 40 return rv; 41 } (a) Draw a control-flow graph (CFG) for this method [15 marks] (b) What are the strengths and weaknesses of All Paths coverage [5 marks] (c) What is the fault model of the All Paths coverage method? [5 marks] CS265 Page 4 of 2 January 2020 4. [25 marks] (a) Fully automated random testing is the dream of every tester. What exactly is meant by this? What are the main issues of automated random testing? [15 marks] (b) Briefly explain what User Stories and Story Cards are and what benefits they offer in comparison to traditional methods. [10 marks]

LATEST POSTS
MOST POPULAR

ezAce多年来为广大留学生提供定制写作、留学文书定制、语法润色以及网课代修等服务,超过200位指导老师为您提供24小时不间断地服务。