0% found this document useful (0 votes)
14 views8 pages

ST Lab Manual 4

ST lab manual 4

Uploaded by

Noor-Ul Ain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views8 pages

ST Lab Manual 4

ST lab manual 4

Uploaded by

Noor-Ul Ain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 8

UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA

FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

SOFTWARE TESTING

Experiment 4
Design Test Cases for Different Types of
Manual Testing

CLO 1: Construct experiments/projects of varying complexities.


CLO 2: Use modern tools and languages.
CLO 3: Demonstrate an original solution to the problem under
discussion.
CLO 4: Work individually as well as in teams.

Software Testing 7th Term-SE UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

LAB OBJECTIVE:

The objective of this lab is:

To learn how to create test cases for


o Equivalence Class partition testing
o Boundary value testing
o Omission testing
o Null case testing

Software Testing 7th Term-SE UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

1-Equivalence Partitioning testing:

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

cases, still covering maximum requirements.

In short, it is the process of taking all possible test cases and placing them into classes. One test

value is picked from each class while testing.

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.

Software Testing 7th Term-SE UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Example 1:

Pass/
Case Test case Test Execution Expected Fail Remarks
# Results
1.

Not Accepted
EP testing <1

2. Value within range Accepted

1<=value<=1000

3. >1000 Not Accepted

Example 2: Write test case for “ if a pupil has total score >= 75, he will pass the exam,

otherwise will fail ”, using equivalence partitioning.

Conditions Valid equivalence class Invalid equivalence class Test case:

Test score 1. >=75 3. <0


• 1, 6
2. <75 4. Null
• 2, 7
5. String

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

SOFTWARE ENGINEERING DEPARTMENT

1a. 75, pass

1b. 76, pass

2. 74, fail

4. Null, error message

5a. A, error message

5b. I am a tester of EW and I love this job, error message

(ii) Boundary value analysis:

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

in center of input domain.

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

Boundary value analysis:

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.

Software Testing 7th Term-SE UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Example 3: Using Boundary Value Analysis technique check salary of an employee when

minimum(5000) and maximum salary(10000) of the employee is given?

Test case Pass/


Case Test Execution Expected Results Fail Remarks
#
1. BVT should not be

accepted
Min. salary – 1(4999)
2. Min. salary(5000) Should be accepted

3. Min. salary + 1 (5001) Should be accepted

4. Max. salary – 1(9999) Should be accepted

5. Max. salary(10000) Should be accepted

6. Max. salary+1(10001) should not be

accepted

(iii) Omission Testing

 Omission Testing (also called Missing Case Testing):


 Exposes defects caused inputting cases (scenarios) the developer forgot to handle or did
not anticipate

Software Testing 7th Term-SE UET Taxila


UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

Conditions Valid equivalence class Invalid equivalence class

Test case:

Test score 1. >=75 3.<0


1• 1, 6
2. <75 4. Null
2• 2, 7
5. String

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:

1a. 75, pass

1b. 76, pass

2. 74, fail

4. Null, error message

5a. A, error message

5b. I am a tester of EW and I love this job, error message

6. 75.5, error message

(iv) Null Case Testing


Software Testing 7th Term-SE UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING

SOFTWARE ENGINEERING DEPARTMENT

 Null Testing: (a specific case of Omission Testing, but triggers defects extremely often)

 Exposes defects triggered by no data or missing data.

 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

 Example: X, Y coordinate missing for drawing various shapes in Graphics editor.

 Example: Blank file names

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

than 60 than grade C.”, using equivalence partitioning.

Q2. Perform equivalence class partition testing, boundary value

testing, omission and null cased testing for transaction in Atm

machine. (minimum transaction allowed is 500 and maximum

25000)

Software Testing 7th Term-SE UET Taxila

You might also like