Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 July 2009
1 July 2009
1 July 2009
1 July 2009
1 July 2009
1 July 2009
1 July 2009
1 July 2009
1 July 2009
1.
2.
3.
4.
1 July 2009
Illustration for EP
EP may be best explained with an example of a function which has
the pass parameter "month" of a date. The valid range for the
month is 1 to 12, standing for January to December. This valid
range is called a partition. In this example there are two further
partitions of invalid ranges.
The first invalid partition would be <= 0 and the second invalid
partition would be >= 13.
.... -2 -1 0 1 ...................12 13 14 15 .....
--------------------|-------------------|--------------------Invalid partition I Valid partition Invalid partition II
Equivalence partitioning is no stand alone method to determine test
cases. It has to be supplemented by another method.
1 July 2009
1 July 2009
Cause-Effect Graphing
This method
Captures the relationships between specific combinations of
inputs (causes) and outputs (effects)
Deals with specific cases,
Avoids combinatorial explosion
Explore combinations of possible inputs
Causes/effects are represented as nodes of a cause effect graph
1 July 2009
1.
2.
3.
4.
5.
6.
7.
1 July 2009
1 July 2009
1 July 2009
1 July 2009
Example of O constraint
1 July 2009
1 July 2009
1 July 2009
1 July 2009
1 July 2009
1 July 2009
Illustration of OAT
1&2
2&3
1&3
In every 8*2 sub matrix, the 22 possible distinct rows all appear the same number of
times. Hence by OAT, we can arrive at a minimum of 4 possible test cases which is
said to provide maximum coverage.
1 July 2009
Size
Base
Topping
Small
Thin
Capsicum
Medium
Thick
Onion
Large
Pan
Mushroom
Size
Base
Topping
Small (0)
Thin (0)
Capsicum (0)
Small (0)
Small (0)
Pan (2)
Mushroom (2)
Medium (1)
Thin (0)
Onion (1)
Medium (1)
Medium (1)
Pan (2)
Capsicum (0)
Large (2)
Thin (0)
Mushroom (2)
Large (2)
Large (2)
Pan (2)
Onion (1)
Size
Base
Topping
Small (0)
Thin (0)
Capsicum (0)
Small (0)
Thick (1)
Onion (1)
Small (0)
Any
Mushroom (2)
Medium (1)
Thin (0)
Onion (1)
Medium (1)
Thick (1)
Mushroom (2)
Medium (1)
Any
Capsicum (0)
Large (2)
Thin (0)
Mushroom (2)
Large (2)
Thick (1)
Capsicum (0)
Large (2)
Any
Onion (1)
Care needs to be taken to ensure that the combinations are practically feasible.
1 July 2009
1 July 2009
- 32
-
TC-1
TC- 2
TC- 3
TC- 4
TC- 5
TC- 6
TC- 7
TC- 8
TC- 9
Factor 4
- 33
-
1 July 2009
- 34
-
Optimal Coverage
Insufficient
Coverage
Too much Time and Cost
1 July 2009
1 July 2009
Exercise-1
Prepare blackbox test cases on how you would test the Yahoo
webpage
Prepare whitebox test cases for this simple C program
#include <stdio.h>
#define LAST 10
int main()
{ int i, sum = 0;
for ( i = 1; i <= LAST; i++ ) {
sum += i;
} /*-for-*/
printf("sum = %d\n", sum);
return 0;
}
1 July 2009
Exercise-2
Annual Exam Mark Processing for Orlinda Pierce Memorial Hr.Sec. School
Total Marks
Final Grade
The Candidate has got "Final Grade" grade in the Annual Examination
1 July 2009
Exercise 2-Contd
Functional Specification for the Final Grade Calculation screen
The Final Exam mark is out of 75 and the Class Work mark is out of 25. The Total
Mark is calculated as the sum of the Final Exam Mark and the Class Work Mark.
The Final Grade is calculated in the range A to D. The classification of Final
Grade is done as below
Total Marks greater than or equal to 70 - 'A'
Total Marks greater than or equal to 50, but less than 70 - 'B'
Total Marks greater than or equal to 30, but less than 50 - 'C'
Total Marks less than 30 - 'D'
Where a Total Mark outside its expected range is derived then a fault message
('FM') is generated.
The calculation has to be done upon entering a valid Roll No which is a 5 digit
character data with the starting range of 10000. All other inputs are passed as
integers.
Using EP, BVA and CEG derive at the Test Cases for the above Specification.
1 July 2009
Experience-Based Testing
Use of experience to design test cases
Experience can include
Domain knowledge
Knowledge of developers involved
Knowledge of typical problems
Two main types
Ad Hoc Testing
Exploratory Testing
1 July 2009
TC
S
1 July 2009
TC
S
1 July 2009
43
Documenting the test cases prior to test execution ensures that the
tester does the homework and is prepared for the attack on the
Application Under Test
Breaking down the Test Requirements into Test Scenarios and Test
Cases would help the testers avoid missing out certain test conditions
1 July 2009
44
1 July 2009
45
scripts
1 July 2009
46
47
Use words like Verify for starting any sentence in Test Case
description For eg.
Verify whether the account information gets displayed on clicking the Account
Summary menu
Use words like Must and use Future Tense for Expected Results
The application must display the account information screen
An error message must be displayed on entering special characters
1 July 2009
48
1 July 2009
49
None
Second Name
None
Submit
I.
II.
First and last name fields are mandatory and are limited to 50 characters
each. The fields will not accept numerical values and the following
characters: `~!@#$%^&*()_:";'{}[]+<>?,./
Respective Error messages are thrown on NOT meeting the above conditions
III. User will be registered successfully on entering the correct data
1 July 2009
50
Thank You