Upload
sk1970
View
223
Download
0
Embed Size (px)
Citation preview
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
1/14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
2/14
TABLE OF CONTENTSTest Data preparation A White paper...............................................................................................................1
1 Introduction .....................................................................................................................................................32 Practical cases ..................................................................................................................................................43 Test case Generation from Test Data table ......................................................................................................124 Summary ........................................................................................................................................................13
100141820.doc Page 2 of 14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
3/14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
4/14
2 Practical cases
Case 1
Let us start with a simple LOGIN window assuming that the validuser id and password to be XYZ
The test data that could be generated for this are as follows:
Sl no. User id Password ActionPass/Fail
Comments
1 Blank Userid
BlankPassword
Fail
2 Blank Userid
ValidPassword
Fail
3 Blank Userid
InvalidPassword
Fail
100141820.doc Page 4 of 14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
5/14
4 Valid Userid
BlankPassword
Fail
5 Valid Userid
ValidPassword
Pass
6 Valid Userid
InvalidPassword
Fail
7 InvalidUser id
BlankPassword
Fail
8 InvalidUser id
ValidPassword
Fail
9 InvalidUser id
InvalidPassword
Fail
From the above table it is clear that Tester ought to run thecondition no. 5 to certify the functionality of login window.(Positive test case)
Of course, even other conditions are required to check the errorhandling capability of the application. (Negative test cases)
Let us drill down into the Invalid dataType ofdata
Example Comments
Invalid xyz All Lowercase lettersX,Y,Z
Invalid 123 Numerals
Invalid
Special
charactersNow, the expanded data table would be as follows :
Sl no. User id Password ActionPass/Fail
Comments
100141820.doc Page 5 of 14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
6/14
1 Blank Userid
Blank Password Fail
2 Blank Userid
Valid PasswordXYZ
Fail
3 Blank Userid
InvalidPassword xyz
Fail
4 Blank Userid
InvalidPassword 123
Fail
5 Blank Userid
InvalidPassword &%^%6
Fail
6 Valid User
id XYZ
Blank Password Fail
7 Valid Userid XYZ
Valid PasswordXYZ
Pass
8 Valid Userid XYZ
InvalidPassword xyz
Fail
9 Valid Userid XYZ
InvalidPassword 123
Fail
10 Valid Userid XYZ
InvalidPassword()^&^&$#
Fail
11 InvalidUser id xyz
Blank Password Fail
12 InvalidUser id xyz
Valid PasswordXYZ
Fail
13 InvalidUser id xyz
InvalidPassword xyz
Fail
14 InvalidUser id xyz
InvalidPassword 123
Fail
15 InvalidUser id xyz
InvalidPassword &%^%6
Fail
100141820.doc Page 6 of 14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
7/14
16 InvalidUser id 123
Blank Password Fail
17 InvalidUser id 123
Valid PasswordXYZ
Fail
18 InvalidUser id 123
InvalidPassword xyz
Fail
19 InvalidUser id 123
InvalidPassword 123
Fail
20 InvalidUser id 123
InvalidPassword &%^%6
Fail
21 Invalid
User id *&%$
Blank Password Fail
22 InvalidUser id *&%$
Valid PasswordXYZ
Fail
23 InvalidUser id *&%$
InvalidPassword xyz
Fail
24 InvalidUser id *&%$
InvalidPassword 123 Fail
25 InvalidUser id *&%$
InvalidPassword()^&^&$#
Fail
Thus, one would arrive at more data combinations (25) ratherthan generic 9 combinations. This data could be passed onto
automation team for Data Driven Test implementation.
Case 2
100141820.doc Page 7 of 14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
8/14
Let us assume the following :
1. The Flights button would function only if the values areselected from the dropdown lists.
2. Fly From dropdown list would have 3 values for instanceFrankfurt, Colombo, Austin and a blank value.
3. Fly To dropdown list would have 3 values for instance Paris,London, Delhi and a blank value.
The test data that could be generated for this are as follows:
Sl
no.
Fly From Fly To Action
Pass/Fail
Comments
1 Not Selected Not Selected Fail
2 Not Selected SelectedParis
Fail
3 Not Selected SelectedLondon
Fail
4 Not Selected SelectedDelhi
Fail
5 Selected Frankfurt Not Selected Fail
6 Selected Frankfurt SelectedParis
Pass
7 Selected Frankfurt SelectedLondon
Pass
100141820.doc Page 8 of 14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
9/14
8 Selected Frankfurt SelectedDelhi
Pass
9 Selected Colombo Not Selected Fail
10 Selected Colombo Selected
Paris
Fail
11 Selected Colombo SelectedLondon
Pass
12 Selected Colombo SelectedDelhi
Pass
13 Selected Austin Not Selected Fail
14 Selected Austin SelectedParis
Pass
15 Selected Austin SelectedLondon
Pass
16 Selected Austin SelectedDelhi
Pass
Case 3
Let us assume the following :
1. Name is populated with the default value as krish.2. Insert Order button would function only if the Tickets editfield is filled with a number and any one of the Class radiobutton is selected.
3. Tickets field would accept any value ranging from 1-99 only.
The test data that could be generated for this are as follows:
100141820.doc Page 9 of 14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
10/14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
11/14
ss
18 99 Economy
Pass BVA
19 100 First Fail BVA
20 100 Business
Fail BVA
21 100 Economy
Fail BVA
22 two First Fail
23 two Business
Fail
24 two Economy
Fail InvalidEquivalence class
25 @#@# First Fail
26 @#@# Business
Fail
27 @#@# Economy
Fail InvalidEquivalenc
e class
100141820.doc Page 11 of 14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
12/14
3 Test case Generation from Test Data table
One needs to use the formulas to concatenate field values andthen copy/paste them to different cells wherever applicable. Thisprocess of writing test cases is much faster than the traditionalone, which involves typing each and every action with the valuesto arrive at the expected result.
For example:
1. Action1=B2&" out "&B1 would mean concatenate B2 contentsi.e., blank with out and B1 contents i.e., Tickets, finallyresulting in as Blank out Tickets.
100141820.doc Page 12 of 14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
13/14
2. Similarly, Test Step=C2&", "&F2&" and click insert orderbutton" would mean concatenate C2 contents i.e., Action1, ,, with F2 Contents i.e., Action2 and and click insert orderbutton.
4 Summary
1. The test data table could be readily used for Data Driventesting and Key word driven testing for a future usage.
2. This paper would be useful while preparing the test data forexhaustive testing or mission critical applications (forexample, Banking or military) where every aspect of theapplication requires to be tested.
3. The formulas that are required to arrive at the variouscombinations of data for different objects are as follows :
a. Radio button or Check box could have only two states eitherON or OFF.
So, if a window has three Radio buttons or check boxes in it,one could have 8 unique combinations of data.
(Formula would be no. of states ^ no. of variables i.e., 2^3 =8)
b. An edit field could have three states such as Blank, Valid data,Invalid data, then one could have 9 unique combinations ofdata.
(Formula would be no. states ^ no. of variables i.e., 3^2 = 9)
A dropdown list could have two or more states depending uponthe values it has, for instance blank, value1, value2, value3,
value4, then one could have 25 unique combinations of data.
(Formula would be no. states ^ no. of variables i.e., 5^2 = 25)
100141820.doc Page 13 of 14
7/31/2019 Test Data and Test Case Scenarios Sticky Minds
14/14
c. In case when a window has 5 dropdown lists (each dropdownlist has 3 values) and 2 edit fields (each edit field has 3 states),then one could have 2187 unique combinations of data.
(F1=Formula for dropdown lists alone would be no. states ^
no. of variables i.e., 3^5 = 243F2=Formula for edit fields alone would be no. states ^ no. ofvariables i.e., 3^2 = 9
Now, the Final formula covering overall combinations would be =F1*F2 i.e., 243*9 = 2187)
100141820.doc Page 14 of 14