0% found this document useful (0 votes)
19 views6 pages

Sqe Lab#4

Uploaded by

naziashar394
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

Sqe Lab#4

Uploaded by

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

Department of Software Engineering

Mehran University of Engineering and Technology, Jamshoro

Course: SW426 - Software Quality Engineering


Instructor Engr. Mehwish Shaikh Practical/Lab No. 04
Date 31-07-2023 CLOs CLO-3
Signature Assessment Score 1 Mark

Topic Application of Black box testing


Objectives - To learn and apply black box testing techniques

Lab Discussion: Theoretical concepts and Procedural steps

Black Box Testing


Black Box Testing is also known as behavioral, opaque-box, closed-box,
specification-based or eye-to-eye testing.

It is a Software Testing method that


analyses the functionality of a
software/application without knowing
much about the internal structure/design
of the item that is being tested and
compares the input value with the output
value.

The main focus in Black Box Testing is on


the functionality of the system as a
whole. The term ‘Behavioral Testing' is also
used for Black Box Testing.

Each testing method has its own advantages and disadvantages. There are some
bugs that cannot be found using the only black box or only white box technique.
Most of the applications are tested by Black Box method. We need to cover most
test cases so that most of the bugs will get discovered by a Black-Box method.
This testing occurs throughout the software development and Testing Life Cycle
i.e in Unit, Integration, System, Acceptance, and Regression Testing stages.

Black Box Testing Tools


Some black box testing tools are listed below:

1. Selenium
2. Appium
3. Applitools
4. HP QTP
5. Microsoft Coded UI
In order to systematically test a set of functions, it is necessary to design test
cases. Testers can create test cases from the requirement specification
document.

Black Box Testing Techniques

 Equivalence Partitioning
 Boundary Value Analysis
 Decision Table Testing
 State Transition Testing
 Error Guessing
 Graph-Based Testing Methods
 Comparison Testing

1. Equivalence Partitioning

This technique is also known as Equivalence Class Partitioning (ECP). In


this technique, input values to the system or application are divided into
different classes or groups based on its similarity in the outcome.

Hence, instead of using each and every input value we can now use any
one value from the group/class to test the outcome. In this way, we can
maintain the test coverage while we can reduce a lot of rework and most
importantly the time spent.

For Example

A “Passing Marks” text field accepts only the numbers 50 and above.
There will be two sets of classes or groups out of which one will be invalid
class. These classes are:

Less than or equal to 49.

One valid class will be the numbers 50 or above.

We have thus reduced the test cases to only 2 test cases based on the
formed classes thereby covering all the possibilities. So, testing with
anyone value from each set of the class is sufficient to test the above
scenario.

2. Boundary Value Analysis

From the name itself, we can understand that in this technique we focus
on the values at boundaries as it is found that many applications have a
high amount of issues on the boundaries.
Boundary means the values near the limit where the behavior of the
system changes. In boundary value analysis both the valid inputs and
invalid inputs are being tested to verify the issues.

For Example

If we want to test a field where values from 1 to 100 should be accepted


then we choose the boundary values: 1-1, 1, 1+1, 100-1, 100, and 100+1.
Instead of using all the values from 1 to 100, we just use 0, 1, 2, 99, 100,
and 101.

3. Decision Table Testing

As the name suggests that, wherever there are logical relationships like:

If
{
(Condition = True)
then action1 ;
}
else action2; /*(condition = False)*/
Then a tester will identify two outputs (action1 and action2) for two
conditions (True and False). So based on the probable scenarios a
Decision table is carved to prepare a set of test cases.

For Example

Take an example of XYZ bank that provides interest rate for the Male
senior citizen as 10% and for the rest of the people 9%.
4. State Transition Testing

State Transition Testing is a technique that is used to test the different


states of the system under test. The state of the system changes
depending upon the conditions or events. The events trigger states which
become scenarios and a tester needs to test them.

A systematic state transition diagram gives a clear view of the state


changes but it is effective for simpler applications. More complex projects
may lead to more complex transition diagrams thus making it less
effective.

For Example

5. Error Guessing

This is a classic example of Experience-Based Testing.

In this technique, the tester can use his/her experience about the
application behavior and functionalities to guess the error-prone areas.
Many defects can be found using error guessing where most of the
developers usually make mistakes.

Few common mistakes that developers usually forget to handle:

 Divide by zero.
 Handling null values in text fields.
 Accepting the Submit button without any value.
 File upload without attachment.
 File upload with less than or more than the limit size.

6. Graph-Based Testing Methods

Each application is a build-up of some objects. All such objects are


identified, and the graph is prepared. From this object graph, each object
relationship is identified, and test cases are written accordingly to
discover the errors.

7. Comparison Testing

Different independent versions of the same software are used to compare


to each other for testing in this method.

Lab Tasks

1. An “AGE” text field accepts only the numbers from 18 to 60. How many
input classes will be there? Mention the valid and invalid classes. Validate
the classes by writing code. Also create test cases for every class using the
test case format used in Practical no: 03.
2. Considering the case in task no: 1, test the text field using boundary value
analysis.
3. A restaurant online ordering system accepts the payment by COD (Cash
on Delivery) or by card. Furthermore, in payment by card mode only visa
card and master card are acceptable. Design a state transition diagram for
this case.
4. Design a state transition diagram for a scenario of your own choice.
5. Test the functionality of The National Database and Registration
Authority for checking the eligibility of citizens for issuing CNIC and
CNICOP using decision tree method. The conditions are listed below:

 CNIC: Applicant has Pakistan Nationality and is of age 18 or above.


 CNICOP: An eligible citizen of Pakistan who lives or has reference
abroad (i.e. dual nationality)

Assessment Method
Task Solution and Instructor Observation
Outcomes Assessed
A. Ability to understand testing techniques and accomplish Psychomotor P3
the given tasks
B. Ability to use black box testing techniques Psychomotor P3

Rubric Component Rubric Marks


s
R1 Test completeness. [A] 0.5
R2 Test coverage. [B] 0.5

Level of Achievement
Proficient Acceptable Marginal Unacceptable
1 0.75 0.50 0.25

You might also like