Unit-4 Software Testing-BCA
Unit-4 Software Testing-BCA
Software Testing
• What is Testing?
Many people understand many definitions of testing :
2
Software Testing
A more appropriate definition is:
3
Software Testing
• Why should We Test ?
In the software life cycle the earlier the errors are discovered and removed, the
lower is the cost of their removal.
4
Software Testing
• Who should Do the Testing ?
o Testing requires the developers to find errors from their software.
o It is difficult for software developer to point out errors from own creations.
o Many organisations have made a distinction between development and
testing phase by making different people responsible for each phase.
5
Software Testing
• What should We Test ?
We should test the program’s responses to every possible input. It means, we
should test for all valid and invalid inputs. Suppose a program requires two 8 bit
integers as inputs.
Total possible combinations are 28x28.
If only one second it required to execute one set of inputs, it may take 18 hours to
test all combinations.
Practically, inputs are more than two and size is also more than 8 bits. We have also
not considered invalid inputs where so many combinations are possible. Hence,
complete testing is just not possible, although, we may wish to do so.
6
Software Testing
Some Terminologies
➢ Error, Mistake, Bug, Fault and Failure
People make errors. A good synonym is mistake. This may be a syntax error or
misunderstanding of specifications. Sometimes, there are logical errors.
When developers make mistakes while coding, we call these mistakes “bugs”.
A failure occurs when a fault executes. A particular fault may cause different
failures, depending on how it has been exercised.
9
Software Testing
➢ Test, Test Case and Test Suite
Test and Test case terms are used interchangeably. In practice, both are same and
are treated as synonyms. Test case describes an input description and an expected
output description.
Test Case ID
Section-I Section-II
(Before Execution) (After Execution)
Purpose : Execution History:
Pre condition: (If any) Result:
Inputs: If fails, any possible reason (Optional);
No knowledge of implementation is
4. Knowledge of implementation is required.
needed.
13
FUNCTIONAL TESTING
• FUNCTIONAL TESTING is a type of software testing that validates
the software system against the functional
requirements/specifications. The purpose of Functional tests is to
test each function of the software application, by providing
appropriate input, verifying the output against the Functional
requirements.
• Functional testing mainly involves black box testing and it is not
concerned about the source code of the application. This testing
checks User Interface, APIs, Database, Security, Client/Server
communication and other functionality of the Application Under
Test. The testing can be done either manually or using automation.
Unit Testing
• Unit Testing is the first level of testing usually performed by the developers.
• Advantage – Error can be detected at an early stage saving time and money
to fix it.
• Limitation – Integration issues are not detected in this stage, modules may
work perfectly on isolation but can have issues in interfacing between the
modules.
Integration Testing
Hybrid integration testing is also called the Sandwich integration approach. This
approach is a combination of both top-down and bottom-up integration testing.
Here, the integration starts from the middle layer, and testing is carried out in
both directions, making use of both stubs and drivers, whenever necessary.
System Testing
• is the third level of testing.