TUTORIAL: ACCEPTANCE TESTS - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

TUTORIAL: ACCEPTANCE TESTS

Description:

There are currently just over 3,000 videos, some of which are duplicate copies. All videos are uniquely identified with a reference number allocated upon accession. ... – PowerPoint PPT presentation

Number of Views:126
Avg rating:3.0/5.0
Slides: 19
Provided by: fredloc
Category:

less

Transcript and Presenter's Notes

Title: TUTORIAL: ACCEPTANCE TESTS


1
COMP 211INTRODUCTION TOSOFTWARE ENGINEERING
  • TUTORIAL ACCEPTANCE TESTS

2
WHAT IS A (USER) ACCEPTANCE TEST
  • An acceptance test is a kind of black box test
    that performs testing without examining the
    implementation source code. It is also referred
    to as a demonstration or demo.
  • Goal
  • To obtain the clients/users approvalfor what
    we have done.

3
HOW TO DEFINE ACCEPTANCE TESTS
  • Restate the requirements into testable statements
    by
  • i. Rephrasing the statements into point form.
  • ii. Grouping the related points (requirements)
    according to functionality.
  • Examine each requirement and classify according
    to testability
  • i. Requirements that are testable.
  • ii. Requirements that are not testable, but can
    be restated to become testable.
  • iii. Requirements that are not testable and,
    therefore, need not be tested.

4
TESTABLE REQUIREMENTS
  • i. A statement describing the unique identity of
    an object.
  • An employee has a unique employee id.
  • ii. A statement describing a possibility or a
    constraint on the cardinality of a set of objects
    (cardinality means the number of objects).
  • An employee has at most one manager.
  • iii. A statement describing the attributes of an
    object.
  • An employee has a name, address, telephone
    number, .
  • iv. if-then-else or while-loop statements
  • Their conditions can be checked, so they are
    testable.

5
EXAMPLE CASE STUDY VIDEO MEMBERSHIP CLUB
  • The system must handle the borrowing of videos
    and the administration of the video membership
    club. There are currently just over 3,000 videos,
    some of which are duplicate copies. All videos
    are uniquely identified with a reference number
    allocated upon accession. Each member of the club
    has a unique membership number. Membership of the
    club currently costs the same as two blockbuster
    video rentals and is renewable annually. The
    membership details held are the name, address and
    telephone number and the date of expiry of the
    membership. The system must allow for the booking
    out and in of videos, the return dates of which
    must be known, and any video must be traceable to
    its current borrower. It is also a requirement to
    be able to determine whether a video is in stock
    or on loan. The system must inform the user when
    a returned video is overdue since a fine is
    impossible. It must also inform the user when a
    membership card is out of date. The system must
    also be capable of producing lists of all videos
    currently held, all overdue videos, and all
    members. It must also be capable of sending
    reminders to members whose membership is due to
    expire or who have overdue videos. The system
    must run on a single-user PC with a 200 GB disk.

6
RESTATED REQUIREMENTS
  • The system must handle the borrowing of videos
    and the administration of the video membership
    club. There are currently just over 3,000 videos,
    some of which are duplicate copies. All videos
    are uniquely identified with a reference number
    allocated upon accession.
  • 0.1. The system handles the borrowing of videos
    and club administration.
  • 1.1. A reference number uniquely identifies all
    videos.
  • 1.2. Multiple copies of videos may exist.
  • 1.3. The system must cope with in excess of 3,000
    videos.

7
RESTATED REQUIREMENTS
  • Each member of the club has a unique membership
    number. Membership of the club currently costs
    the same as two blockbuster video rentals and is
    renewable annually. The membership details held
    are the name, address and telephone number and
    the date of expiry of the membership. It must
    also inform the user when a membership card is
    out of date.
  • 2.1. Membership numbers are unique.
  • 2.2. Membership costs 2 blockbuster video
    rentals.
  • 2.3. Membership lasts for 1 year.
  • 2.4. Membership details held
  • 2.4.1. Membership number.
  • 2.4.2. Name.
  • 2.4.3. Address.
  • 2.4.4. Telephone number.
  • 2.4.5. Membership expiry date.
  • 2.5. An attempt to use an out-of-date membership
    will cause the system to inform the user.

8
RESTATED REQUIREMENTS (contd)
  • The system must allow for the booking out and in
    of videos, the return dates of which must be
    known, and any video must be traceable to its
    current borrower. It is also a requirement to be
    able to determine whether a video is in stock or
    on loan.
  • 3.1. Borrowing and return of videos
  • 3.1.1. The system is capable of booking videos
    out.
  • 3.1.2. Returned videos must be booked in.
  • 3.1.3. The return date of a video must be known.
  • 3.1.4. The system must be capable of displaying
    the details of a video's status and current
    borrower.
  • 3.1.5. It must be possible to inquire about a
    member's borrowed videos.

9
RESTATED REQUIREMENTS (contd)
  • The system must inform the user when a returned
    video is overdue since a fine is impossible. The
    system must also be capable of producing lists of
    all videos currently held, all overdue videos,
    and all members. It must also be capable of
    sending reminders to members whose membership is
    due to expire or who have overdue videos.
  • 4.1. The system must perform general
    administration
  • 4.1.1. Produce a list of all videos currently
    held.
  • 4.1.2. Produce a list of all members.
  • 4.1.3. Send reminders to members whose
    membership is due to expire shortly.
  • 4.1.4. Send reminders to members holding overdue
    videos.
  • 4.1.5. Allow alteration of membership details.
  • 4.1.6. Allow alteration of video list.
  • (The last two requirements are implied if we are
    to allow for adding new members and new videos.)

10
RESTATED REQUIREMENTS (contd)
  • The system must run on a single-user PC with a
    200 GB disk.
  • 5.1. The system must run on a single-user PC with
    a 200 GB disk.

11
DETERMINE TESTABILITY OF REQUIREMENTS
  • Examine the statement of requirementsto
    determine their testability.
  • Examples
  • Requirement 0.1. The system handles the borrowing
    of videos and club administration.
  • This requirement is not testable!
  • It represents the completed system and will be
    fulfilled by the other requirements.
  • ? DISCARD!

12
DETERMINE TESTABILITY OF REQUIREMENTS
  • Requirement 1.1. A reference number uniquely
    identifies all videos.
  • This requirement is testable.
  • ? Try to allocate the same number to two
    videos.
  • Requirement 3.1.1. The system is capable of
    booking videos out.
  • Not testable in its current form!
  • However, we can make it testable by restating it
    as
  • 3.1.1. If a video is available for borrowing
    then it may be lent to a member.
  • 3.1.1.1. A video is available for borrowing
    until all copies have been simultaneously
    borrowed.

13
RESTATED AND REGROUPED REQUIREMENTS
3.1. Borrowing and return of videos 3.1.1. The
system is capable of booking videos out.
  • 3. Borrowing and return of videos
  • 3.1. If a video is available for borrowing then
    it may be lent to a member.
  • 3.1.1. A video is available for borrowing until
    all copies have been simultaneously borrowed.

3.1.2. Returned videos must be booked in.
3.2. If a video was unavailable for borrowing,
then returning the video makes it available.
3.1.3. The return date of a video must be known.
3.3. The return date is established when the
video is lent and must be shown when the video
is returned.
3.1.4. The system must be capable of displaying
the details of a video's status and current
borrower.
3.4. It must be possible for an inquiry on a
borrowed video to reveal the current borrower.
3.1.5. It must be possible to inquire about a
member's borrowed videos.
3.5. An inquiry on a member will reveal any
videos they currently have borrowed and whether
any are overdue.
4.1.4. Send reminders to members holding overdue
videos.
3.6. The system must be able to send reminders
to members holding videos that have been overdue
for 5 days.
3.7. The system will not permit borrowing of
videos to members whose membership has expired.
14
ACCEPTANCE TESTS INCEPTION PHASE
  • Input Restated requirements
  • Goal To specify what to demonstrate

15
ACCEPTANCE TESTS INCEPTION PHASE
  • 3. Borrowing and return of videos
  • 3.1. Demonstrate that an available video can be
    borrowed.
  • 3.1.1. Demonstrate that a video cannot be
    borrowed for which no copies are available.
  • 3.2. Demonstrate that a video can be borrowed
    for which no copies are available after a copy
    has been returned.
  • 3.3. The return date is established when the
    video is lent and must be shown when the video
    is returned. Can be shown by 3.1. and 3.2.
  • 3.4. Demonstrate that the system can show who
    has borrowed a video.
  • 3.5. Demonstrate that the system can show which
    videos a member has borrowed and whether any are
    overdue.
  • 3.6. Demonstrate that a reminder can be sent to
    a member holding a video that has been overdue
    for 5 days.
  • 3.7. Demonstrate that a member whose membership
    has expired cannot borrow a video.

16
ACCEPTANCE TEATS ELABORATION PHASE
  • Input What to demonstrate User Interface
    Data
  • Goal To specify how to use the user interface
    with the test data to demonstrate that the
    requirement is satisfied in the system
  • Test Definition
  • For each requirement specified in the Inception
    phase, develop two tests
  • normal behaviour ? tests the basic flow
  • exceptional behaviour ? tests alternative flows

17
ACCEPTANCE TESTS ELABORATION PHASE
  • Tests for requirement 3.1.
  • Action Attempt to borrow an available video.
    Check that the return date is shown.
  • Result
  • Action Attempt to borrow an unavailable video.
  • Result

18
ACCEPTANCE TESTS ELABORATION PHASE
  • Tests for requirement 3.1.1.
  • Action Attempt to borrow a video for which there
    are multiple copies, all of which have been
    borrowed.
  • Result
  • Action Attempt to borrow a video for which all
    copies but one have been borrowed.
  • Result
Write a Comment
User Comments (0)
About PowerShow.com