Unit - IV Testing Application
Unit - IV Testing Application
TESTING APPLICATION
THERE ARE SEVERAL KEY ASPECTS TO ENSURE FUNCTIONALITY AND QUALITY OF ANY APPLICATION
Software Testing Fundamentals
Internal and external Views of Testing
White-Box Testing
Basic Path Testing
Control Structural Testing
Black-Box Testing
Software Testing Fundamentals
• The goal of testing is to find the errors and a
good test is one that has a high probability
of finding an error.
• Therefore a software developer should
design and implement a computer based
system with “Testability” in mind.
• The tests themselves must exhibit a set of
characteristics that achieve the goal of
finding the most errors with a minimum of
efforts
Testability
“Software testability is simply how easily a
computer program can be tested”
Operability
“The better it works, the more efficiently it can
be tested”
Observability
“What you see is what you test”
Controllability
“The better we can control software, the more
the testing can be automated and optimized”
Decomposability
“By controlling the scope of testing, we can more
quickly isolate problems and perform smarter
retesting”
Simplicity
“The less there is to test, the more quickly we can
test it”
Stability
“The fewer the changes, the fewer the disruptions to
testing”
Underastandability
“The more information we have, the smarter we can
test”
Internal and External Views of Testing
Internal and External Testing are essential to
ensure the quality and reliability of software.
• Internal View of Testing:- This view focuses on the
internal structure and workings of the software.
• It involves testing individual components, modules
or functions within the code. Internal testing
ensures that each part of the software performs
as intended and interacts correctly with other
parts.
• Examples of internal testing include unit testing
and integration testing.
•External View of Testing:- The external
view looks at how the software behaves
from the user's perspective.
• It involves testing the software as a whole
to ensure it meets user requirements and
functions correctly.
• External testing evaluates the user
interface, usability, performance, and overall
user experience.
• Examples of external testing include
functional testing, usability testing,
performance testing and acceptance testing.
Test Characteristics
• A good test have a high
probability of finding an error
• A good test is not redundant
• A good test should be “best of
breed”
• A good test should be neither too
simple nor too complex
White-Box Testing
• It is a software testing technique where the
internal workings of an application are tested.
• In this testing the Tester must have knowledge
of internal code, structure and design of the
software being tested.
• This helps tester to design test cases.
• White box testing is often used to verify the flow
of inputs through the code and to check if the
code is working as expected.
• This aims to identify errors in logic, data
structure and code.
Example Test Case: Verify Login Functionality
1. Test Case ID: E1039222011
2. Test Case Description: Verify that a user can
successfully log in with valid credentials.
3. Test Steps: a. Input valid username &
password. b. Click on the login button.
4. Expected Result: The user should be
successfully logged in and directed to the
dashboard page.
5. Actual Result: The user is logged in and can
access the dashboard page.
6. Pass/Fail: Pass
Basic Path Testing
• Basic path testing, a
structured testing or white
box testing technique used
for designing test cases
intended to examine all
possible paths of execution at
least once.
Steps to Calculate the independent paths
Path 1: 1-2-5-7
Path 2: 1-2-5-6-7
Path 3: 1-2-3-2-5-6–7
Path 4: 1-2-3-4-2-5-6-7
Control Structural Testing
• Control Structure testing is used to increase
the coverage area by testing various control
structures present in program.
• The different types of testing performed
under control structure testing are as
follows-
• 1. Condition Testing
• 2. Data Flow Testing
• 3. Loop Testing
1.Condition Testing
Condition testing is a test
case design method, which
ensures that the logical
condition and decision
statements are free from
errors.
2. Data Flow Testing
The data flow test method
chooses the test path of a
program based on the
locations of the definitions
and uses all the various in
the program.
3. Loop Testing
Loop testing is actually a white box
testing technique. It specifically
focuses on the validity of loop
construction.
For Example-
• Simple Loop
• Nested Loop
• Concatenated Loop
• Unstructured Loop
Black-Box Testing
• Black box testing is a method of software
testing the testers focus on the inputs and
outputs of the software without knowing
how it works internally.
• This type of testing is based on software
requirements and specifications.
• Test cases are designed based on the
expected behaviour of the software.
• It helps to assess the functionality of the
software without looking at the code.