Testing Method

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

[Exercise 1]

Boundary value analysis technique (1/2)

 Suppose you are testing a program that calculates the cost of a hotel stay. The cost is calculated
based on the number of days stayed and the room rate. The room rate is determined by the type
of room (single or double) and the season (high or low). The cost is calculated using the
following formula:

 cost = number of days * room rate

 The room rates are as follows:

 Single room: $50 per night in the low season, and $100 per night in the high season.

 Double room: $75 per night in the low season, and $150 per night in the high season.

 Using the boundary value analysis technique, identify the test cases that would be the most
effective in testing this program.

SOLUTION:

[Exercise 2]
Orthogonal Array

Given 3 variables:

A – 2 values (A1, A2)

B – 3 values (B1, B2, B3)

C – 3 values (C1, C2, C3)

Using the Orthogonal Array Testing technique, identify the test cases for this program.

SOLUTION:

Factors: 3 (A, B, C)
The number of levels for each factor is:

 Factor A: 2 levels (A1, A2)


 Factor B: 3 levels (B1, B2, B3)
 Factor C: 3 levels (C1, C2, C3)

So, there are a total of 8 possible combinations of the three factors, which correspond to the 9 test cases
identified using the Orthogonal Array Testing technique.

Result:

Test Case Factor A Factor B Factor C

1 A1 B1 C1

2 A2 B2 C2

3 A1 B3 C3

4 A2 B1 C2

5 A1 B2 C3

6 A2 B3 C1

7 A1 B1 C3

8 A2 B2 C1

9 A1 B3 C2

You might also like