ST Lab Manual 4
ST Lab Manual 4
SOFTWARE TESTING
Experiment 4
Design Test Cases for Different Types of
Manual Testing
LAB OBJECTIVE:
In this method the input domain data is divided into different equivalence data classes. This
method is typically used to reduce the total number of test cases to a finite set of testable test
In short, it is the process of taking all possible test cases and placing them into classes. One test
For Example: If you are testing for an input box accepting numbers from 1 to 1000 then there is
no use in writing thousand test cases for all 1000 valid input numbers plus other test cases for
invalid data.
Using the equivalence partitioning method above test cases can be divided into three sets of input
data called as classes. Each test case is a representative of the respective class.
Test cases for input box accepting numbers between 1 and 1000 using Equivalence
Partitioning:
1) One input data class with all valid inputs. Pick a single value from range 1 to 1000 as a valid
test case. If you select other values between 1 and 1000 then result is going to be same. So one
test case for valid input data should be sufficient
.2) Input data class with all values below lower limit. I.e. any value below 1, as a invalid input
data test case.
3) Input data with any value greater than 1000 to represent third invalid input class.
So using equivalence partitioning you have categorized all possible test cases into three classes.
Test cases with other values from any class should give you the same result.
Example 1:
Pass/
Case Test case Test Execution Expected Fail Remarks
# Results
1.
Not Accepted
EP testing <1
1<=value<=1000
Example 2: Write test case for “ if a pupil has total score >= 75, he will pass the exam,
Result of 6. Pass • 3, 8
exam 7. Fail
• 4, 8
8. Error Message
Data to test:
Software Testing 7th Term-SE UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
2. 74, fail
It’s widely recognized that input values at the extreme ends of input domain cause more errors in
system. More application errors occur at the boundaries of input domain. ‘Boundary value
analysis’ testing technique is used to identify errors at boundaries rather than finding those exist
Boundary value analysis is the next part of Equivalence partitioning for designing test cases
where test cases are selected at the edges of the equivalence classes.
For example: Test cases for input box accepting numbers between 1 and 1000 using
1) Test cases with test data exactly as the input boundaries of input domain i.e. values 1 and 1000
in our case.
2) Test data with values just below the extreme edges of input domains i.e. values 0 and 999.
3) Test data with values just above the extreme edges of input domain i.e. values 2 and 1001.
Example 3: Using Boundary Value Analysis technique check salary of an employee when
accepted
Min. salary – 1(4999)
2. Min. salary(5000) Should be accepted
accepted
Test case:
6. Float No. 3• 3, 8
Result of 6. Pass
4• 4, 8
exam
7. Fail 5. 5, 8
6. 6,8
8. Error Message
Data to test:
2. 74, fail
Null Testing: (a specific case of Omission Testing, but triggers defects extremely often)
Often triggers defects because developers create programs to act upon data, they don’t
think of the case where the project may not contain specific data types
LAB TASKs
Q1. Write test cases for the marks of the student in a subject, “ if
student has total score >= 40, he will pass the exam, and on less
than 40 he will be fail ”,, if marks are greater than 80, he will pass
and got A grade , on greater than 60 grade is B and if marks are less
25000)