Saturday 14 January 2017

Software Testing

Question-1:  • See the form in the figure
              – Identify each field, and for each field 
1.1. What is the type of the field (integer, real, ...)?
1.2. List the range of entries that are “valid” for the field?
1.3. Partition the field and identify boundary conditions?
1.4. List the entries that are too extreme for the field?
1.5. List a few test cases for the field and explain why the values you chose are the most powerful representatives of their sets (for showing a bug) ?  
1.6. Identify any constraints imposed on this field by other fields?


Solution:

1.1.
Quantity:   integer
Grand Total: real

1.2. 
Quantity: 1-20
Grand Total: 0-10000

1.3.
                                           Quantity Field

Equivalence Partitioning:
•  One input data class with all valid inputs. A single value from range 1 to 20 as a valid test case
• The Input data class with all values below lower limit. i.e. any value below 1, is considered an invalid input data test case
• Input data with value greater than 20 to represent third invalid input class.

Boundary conditions:
• Test data exactly as the input boundaries of input domain i.e. values 1 and 20 in our case.
• Test data with values just below the extreme edges of input domains i.e. values 0 and 19.
• Test data with values just above the extreme edges of input domain i.e. values 2 and 21.

                                            Grand Total Field

Equivalence Partitioning:
• One input data class with all valid inputs. A single value from range 0 to 10000 as a valid test case
• The Input data class with all values below lower limit. i.e. any value below 1, is considered an invalid input data test case
• Input data with value greater than 10000 to represent third invalid input class.

Boundary value analysis:
• Test data exactly as the input boundaries of input domain i.e. values 0 and 10000 in our case.
• Test data with values just below the extreme edges of input domains i.e. values -1 and 9999.
• Test data with values just above the extreme edges of input domain i.e. values 1 and 10001.

1.4.
Quantity: 50 is too extreme value.
Grand Total: 20000 is too extreme value. 


1.5.
Below is the list of test cases:
• Ensure that the lower value and higher value specified for the field are handled correctly.
• Ensure that an empty/blank entry in the first position of numeric field is reported as an error.
• Ensure that quantity field do not accept zero or less than zero value.
• Ensure that the Grand total field do not accept negative value. 

1.6.
Constraint in b/w quantity field and grand total field . i.e. if quantity fields are zero the grand total field will be zero. 

No comments:

Post a Comment