You are on page 1of 4

CS3270: Testing and Reliable Software Engineering

CS3270 Aston University School of Engineering & Applied Science CS3270: Testing and Reliable Software Engineering Mock Examination Date: Monday nnth XXXX 2012 Time: hr:mm hr:mm Instructions to Candidates:
You must complete ALL questions in an exam answer book. Answer each question on a NEW page and CLEARLY IDENTIFY the question in the answer book. All questions will be marked out of 20 marks. All answers should be ILLUSTRATED with examples from coursework exercises, personal experience, or the question case

Page 1 of 4

CS3270: Testing and Reliable Software Engineering

1. A developer and a tester are discussing the nature of testing. The developer believes that the tests they write in test-first programming are all that are needed to test the software. Using testing quadrants (Crispin and Gregory, 2009) provide an outline of an argument as to why other tests are required and the difference in foci of the different tests. 2. Myers, et al. (2004) argue that a programmer should not test their own program. Agile development processes use test-drive or test-first programming but do not discard other forms of testing. Discuss the difference between test-driven or test-first development and testing as Myers, et al. (2004) describe testing. 3. An cinema complex is developing a ticketing system that is designed to reward people who frequently attend movies. At the heart of the system is a function that decides whether the current ticket purchase should be treated as free or charged at a reduced rate. The rules for ticket sales are: 1. If this is the customers 3rd ticket purchase in the week then the ticket is free. 2. If this is the customers 5th ticket purchase in the month and there have been no free tickets issued to the customer then the ticket is half price. 3. If this is the customers 9th ticket purchase in the month and there have been no free tickets issued to the customer then the ticket is free. 4. Any multiple seat ticket purchase for the viewing of a particular movie at any given time is considered a group booking. Every fifth ticket in a group booking is half price. You have bee asked to design some white box tests for this code. Should you use statement coverage, decision coverage, or condition coverage for the development of these tests or should you use some combination? Describe the focus of each of these techniques and based on your descriptions present an argument for a testing strategy you would use for this system. Based on your selected testing strategy and the conditions stated above, calculate how many test cases you believe will be required. Clearly show how you calculated the number of test cases. 4. You are a tester assigned to an agile development project for an online bookstore (see the attached specification). Discuss how you could use behaviour-driven development (BDD) specifications to help drive tests. Illustrate by providing two examples of BDD stories using the provided specification how BDD can be used. 5 In the testing of the online bookstore system, a number of problems have been identified in the check out process. It seems to have no problems when each item in the shopping cart has a quantity of one but it fails when the first item has a quantity greater than one and the remaining items have differing quantities. You have been asked by the tester to help identify the cause of the problem. Discuss the debugging strategies that you might be able to use. Describe each of the strategies and recommend the strategy or strategies that you would consider using to resolve the identified problem. Provide your reasoning for selecting the strategy or strategies that you would consider using.

Page 2 of 4

CS3270: Testing and Reliable Software Engineering

END OF EXAM

Page 3 of 4

CS3270: Testing and Reliable Software Engineering

Jacks Online Bookstore


Jacks Online Bookstore provides an online shopping experience for the serious book lover. Registered users of the bookstore have a profile maintained of the types of books that they purchase and the system provides recommendations of other books that match their profile. Some of the key functions of the bookstore are: 1. The ability for a new user to register with the system. The registration process involves gathering the name of the user, a unique user identifier, a password, the user email address, the users address, and default payment details. The password must be at least eight characters and have at least one capital letter and non-alphabetic character. On completion of the initial registration, the user is sent an email asking them to confirm their registration. Only when they have followed the link in the email will their registration be completed. 2. The ability for a user to login to the system. The login mechanism provides a way for the user to request their user identifier to be sent to them or request the resetting of their password. In both of these situations, the user is asked to enter their email address and an email is sent to their email address. Following the link in the email, the user can reset their password. 3. The capability to search for books by typing in a keyword. The search returns a list of books that have the keyword in either their title, the authors name, or the book description. If the user is logged in to their profile then the books will be sorted based on the attributes maintained in the profile. 4. Browse books based on book categories defined within the system. The browse presents a list of books selected based on the selected category. If the user is logged in to their profile then the books will be sorted based on the attributes maintained in the profile. 5. From any list of books, the user can click on a book entry to obtain more details about the book including information on the publisher and reviews entered by users. 6. From the details of a book, the user: a. Can ask the system to add the book to their shopping basket. b. Ask for a list of similar or related books either by author, keyword, or category. 7. At any point in the interaction with the system, the user can go to their shopping basket and review the contents. This applies whether they are logged in or not. If the shopping basket is not empty then the user can: a. Delete books from the shopping basket b. Change the number of any book to be purchased c. Checkout to purchase the books. The user does not need to be logged in or registered with the system to begin the checkout process. i. If the user is logged in then they are taken through a sequence confirming their shipping address, payment method, and delivery method. They may change any of these details and store them in their user profile. ii. If the user is not logged in then they are give three choices. These are: 1. To login and follow the checkout process for a logged in user 2. To register and then login. After this process is completed, they can then checkout following the logged in user sequence 3. Checkout as a unregistered user. In this sequence, the user will need to enter their name, shipping address, and payment method. Following successful checkout, the shopping basket is cleared.

Page 4 of 4

You might also like