0% found this document useful (0 votes)
9 views

LAB 1 - ECP

Uploaded by

hegow48445
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

LAB 1 - ECP

Uploaded by

hegow48445
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

COMSATS University Islamabad, Lahore Campus

Lab 1 - ECP
Course Title: Software Testing Course Code: CSE 363 Credit Hours: 3(2,1)
Course Instructor Yella Mehroze Theory/Lab Lab
Semester: 8th Batch: -BSE Section: Depart CS

Name; Nasar Haroon


Reg:SP21-BSE-087

Outline
 Software Testing
 Types of Software Testing o Black Box Testing
 Equivalence Partitioning (LAB 1)
 Boundary Value Analysis ( BVA )
 Transition Testing
 Decision Trees

Task 1

Consider that you are filling an online application form for a gym membership. What are the most
important criteria for getting a membership? Of course, the age! Most of the gyms have age criteria of 16-60,
where you can independently get the membership without any supervision needed. If you look at below
membership form, you will need to fill age first. After that, depending on whether you are between 16-60, you
can go further. Otherwise, you will get a message that you cannot get a membership.

Yella Mehroze – CS Dept


CUI Lahore Campus

Methodology

• Write test conditions


• Use the following table to divide the input values into sets of valid / invalid partitions.
• Draw a number line and write equations (as practiced in class).
EQUIVALENCE PARTITIONING

Invalid Partition Valid Partition Invalid Partition


Age<16 16<=age<=60 Age>60

Yella Mehroze
Test Condiions:

Test Case 1:Input Age= 10 Invalid, Show Error Message


Test Case 2:Input Age= 17 Valid, Show Proceed Further
Test Case 3:Input Age= 62 Invalid, Show Error Message

Number Line:

0-15 -------16--------- 15-60 -------60------61-∞

Yella Mehroze
Yella Mehroze
Software Testing
A process of executing a program with the aim of finding error.
To make our software perform well i.e. it should be error free.
If testing is done successfully, it will remove all the errors from the software.

Black Box Testing


The user is not aware of the internal implementation of the testing software.

Advantages
It is common for black box testers to find bugs that were not traced during program execution.
Black box testing involves validating the system without knowing its internal design.
Testing a black-box way is a more natural way to test

Disadvantages
The tester will not be aware even if some part of the code has not been tested.
It brings its complexity that the number of test conditions can have several hundred variations.

Point to ponder

How to overcome this complexity????????

Black Box Testing Methods


1. Equivalence Class Partitioning / Equivalence Partitioning/ Equivalence Class
Testing

Definition
Equivalence partitioning is a technique of software testing in which input data is divided into
partitions of valid and invalid values, and it is mandatory that all partitions must exhibit the same
behavior.

Discussion

The system will handle all the test input variations within a partition in the same way.
If one of the input condition passes, then all other input conditions within the partition will pass as
well.
If one of the input conditions fails, then all other input conditions within the partition will fail as well.
It may results into good amount of decrease in the redundant test cases, if implemented properly.
It may not work well with the boolean or logical types variables.
It is suitable when the input data is available in terms of intervals and sets of discrete values.

Yella Mehroze
Valid Equivalence Partition

Valid Partitions are values that should be accepted by the component or system under test.

Invalid Equivalence Partition

Invalid Partitions are values that should be rejected by the component or system under test.

Principle
The principle of equivalence partitioning is, test cases should be designed to cover each partition at
least once. Each value of every equal partition must exhibit the same behavior as other.

Advantage of Partitioning

Keep number of test cases to minimum


Good test coverage. Saves time
It can be applied to all levels of testing, such as unit testing, integration testing, system testing etc.
Enables the testers to focus on smaller data sets, which increases the probability to uncovering more
defects in the software product.
“Minimal Test cases with maximum coverage”

Disadvantages of Partitioning

• It does not consider the conditions for boundary value.


• The identification of equivalence classes relies heavily on the expertise of testers.

Conclusion
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. Along with, it’s the ability to generate greater testing coverage, without
compromising time and efforts, making Equivalence Class Testing a popular testing technique
worldwide.

Yella Mehroze
For any queries

[email protected]

Office: H-Block

Yella Mehroze

You might also like