Sei sulla pagina 1di 6

WSS-Vietnam Delivery Center

CSC Private/Restricted/ Confidential

Black-box Testing Techniques Exercise

TABLE OF CONTENTS
1 Boundary Analysis Technique........................................................................................................................2 1.1 Exercise 1:................................................................................................................................................2 1.2 Exercise 1:................................................................................................................................................2 2 Equivalent Class Partitioning Technique........................................................................................................3 2.1 Exercise 1: ...............................................................................................................................................3 2.2 Exercise 2: ...............................................................................................................................................3 3 Pair-wise Technique........................................................................................................................................3 3.1 Exercise 1: ...............................................................................................................................................3 4 State Transitioning Technique........................................................................................................................4 4.1 Exercise 1: ...............................................................................................................................................4 5 Decision Table Technique..............................................................................................................................5 5.1 Exerise1: ..................................................................................................................................................5 5.2 Exerise2....................................................................................................................................................6

Computer Sciences Corporation All rights reserved

Page 1 of 6 Issue Number 1.0

Printed copies of this document are for reference only.

Date: 25-Aug-2010

WSS-Vietnam Delivery Center

CSC Private/Restricted/ Confidential

Black-box Testing Techniques Exercise

Boundary Analysis Technique


1.1 Exercise 1:
Order number of an online flower shop can be ranged from 100 to 999. Use Boundary Value Analysis technique to select the correct answer.

Answer: a. 99, 100, 450, 999, 1000 b.100, 101, 450, 998, 999 c.99, 100, 101, 450, 998, 999, 1000

1.2 Exercise 1:
Apply Boundary Analysis technique to develop test cases for the following fields: ZIP Code - five numeric digits Last Name - one through fifteen characters (including alphabetic characters, periods, hyphens, apostrophes, spaces, and numbers) User ID - eight characters at least two of which are not alphabetic (numeric, special, nonprinting) Course IDthree alpha characters representing the department followed by a six-digit integer which is the unique course identification number. The possible departments are: o o o o o o o o PHY - Physics o EGR - Engineering o ENG - English o LAN - Foreign languages o CHM - Chemistry o MAT - Mathematics o PED - Physical education o SOC - Sociology

Computer Sciences Corporation All rights reserved

Page 2 of 6 Issue Number 1.0

Printed copies of this document are for reference only.

Date: 25-Aug-2010

WSS-Vietnam Delivery Center

CSC Private/Restricted/ Confidential

Black-box Testing Techniques Exercise

Equivalent Class Partitioning Technique


2.1 Exercise 1:
A program validates a numeric field (x) in which values less than or equal to 5 are rejected, values between 6 and 20 are accepted, values greater than or equal to 21 are rejected. Use Equivalence Class Partitioning to select the correct answer Answer: a. Valid: 5<x<=20; x>=21 and Invalid: x<=5 b. Valid: 5<x<=20 and Invalid: x<=5; x>=21 c. Valid: 5<=x<20 and Invalid: x<5; x>=21

2.2 Exercise 2:
Apply Equivalent Class Partitioning technique to develop test cases for the following fields: State - the standard Post Office two-character abbreviation for the states, districts, territories, etc. of the United States Last Name - one through fifteen characters (including alphabetic characters, periods, hyphens, apostrophes, spaces, and numbers) User ID - eight characters at least two of which are not alphabetic (numeric, special) Student ID - eight characters. The first two represent the student's home campus while the last six are a unique six-digit number. Valid home campus abbreviations are: AN, Annandale; LC, Las Cruces; RW, Riverside West; SM, San Mateo; TA, Talbot; WE, Weber; and WN, Wenatchee

Pair-wise Technique
3.1 Exercise 1:
A bank has created a new data processing system that is ready for testing. This bank has different kinds of customersconsumers, businesses, and non-profits; different kinds of accountschecking, savings; they operate in different states, each with different regulationsCalifornia, Nevada and Utah.

Computer Sciences Corporation All rights reserved

Page 3 of 6 Issue Number 1.0

Printed copies of this document are for reference only.

Date: 25-Aug-2010

WSS-Vietnam Delivery Center

CSC Private/Restricted/ Confidential

Black-box Testing Techniques Exercise

State Transitioning Technique


4.1 Exercise 1: Install Acrobat Reader and compose test cases using State Transitioning Technique

1 2

3.1

Computer Sciences Corporation All rights reserved

Page 4 of 6 Issue Number 1.0

Printed copies of this document are for reference only.

Date: 25-Aug-2010

WSS-Vietnam Delivery Center

CSC Private/Restricted/ Confidential

Black-box Testing Techniques Exercise

A B

Decision Table Technique


5.1 Exerise1:
Rule1 Rule2 Rule3 Rule4 Conditions Monday - Thursday Friday Sunday Membership card Actions Ticket price - $5 Ticket price - $7 Discount 5% X N X Y X X X X Y Y Y N Y Y

Computer Sciences Corporation All rights reserved

Page 5 of 6 Issue Number 1.0

Printed copies of this document are for reference only.

Date: 25-Aug-2010

WSS-Vietnam Delivery Center

CSC Private/Restricted/ Confidential

Black-box Testing Techniques Exercise

Use Decision Table technique to select the correct test cases:


Test1: If customers watch movie on Monday to Thursday without membership card, the ticket price is $5. Test2: If customers watch movie on Monday to Thursday without membership card, the ticket price is $5 and the discount rate is 5%. Test3: If customers watch movie on Monday to Thursday with membership card, the ticket price is $5 and the discount rate is 5%. Test4: If customers watch movie on Friday to Sunday without membership card, the ticket price is $7. Test5: If customers watch movie on Friday to Sunday with membership card, the ticket price is $7. Test6: If customers watch movie on Friday to Sunday with membership card, the ticket price is $7 and the discount rate is 5%.

Answer: a. Test1, Test4, Test5, Test6. b. Test 1, Test3, Test4, Test6 c. Test 2, Test3, Test4, Test6

5.2 Exerise2
Attending Stateless University is an expensive proposition. After all, they receive no state funding. Like many other students, those planning on attending apply for student aid using FAFSA, the Free Application for Federal Student Aid. The following instructions were taken from that form. Examine them and create a decision table that represents the FAFSA rules. Step Four: Who is considered a parent in this step? Read these notes to determine who is considered a parent for purposes of this form. Answer all questions in Step Four about them, even if you do not live with them. Are you an orphan, or are you or were you (until age 18) a ward/dependent of the court? If Yes, skip Step Four. If your parents are both living and married to each other, answer the questions about them. If your parent is widowed or single, answer the questions about that parent. If your widowed parent is remarried as of today, answer the questions about that parent and the person whom your parent married (your stepparent). If your parents are divorced or separated, answer the questions about the parent you lived with more during the past 12 months. (If you did not live with one parent more than the other, give answers about the parent who provided more financial support during the last 12 months or during the most recent year that you actually received support from a parent.) If this parent is remarried as of today, answer the questions on the rest of this form about that parent and the person whom your parent married (your stepparent).

Computer Sciences Corporation All rights reserved

Page 6 of 6 Issue Number 1.0

Printed copies of this document are for reference only.

Date: 25-Aug-2010

Potrebbero piacerti anche