Software Testing UNIT 2
Software Testing UNIT 2
Levels of Testing
Levels of Testing
Software testing levels are different stages of SDLC where testing is conducted.
There are 4 levels of testing:
o Unit testing
o Integration testing
o System testing
o Acceptance testing
Unit Testing
• The strategy in top-down integration is look at the design hierarchy from top to
bottom.
• Start with the high - level modules and move downward through the design
hierarchy. In this approach testing is conducted from main module to sub
module.
• If the sub module is not developed a temporary program called STUB is used
for simulate the sub module.
• Modules subordinate to the top modules are integrated in the following two
ways:
1. Depth first Integration: In this type, all modules on major control path of the
design hierarchy are integrated first.
• In this example shown in fig. modules 1, 2, 4/5 will be integrated first. Next,
modules 1, 3, 6 will be integrated.
2. Breadth first Integration: In this type, all modules directly subordinate at each
level, moving across the design hierarchy horizontally, are integrated first.
• In the example shown in figure modules 2 and 3 will be integrated first. Next,
modules 4,5 and 6 will be integrated .
Procedure:
• The procedure for Top-Down integration process is discussed in the following
steps:
1. Start with the top or initial module in the software. Substitute the stubs for
all the subordinate of the top module. Test the top module.
2. After testing the top module, stubs are replaced one at a time with the
actual modules for integration.
3. Perform testing on this recent integrated environment.
4. Regression testing may be conducted to ensure that new errors have not
appeared.
5. Repeat steps 2-4 for whole design hierarchy.
• Advantages of top-down integration:
• Advantageous if major flaws occur toward the top of the program.
• Once the I/O functions are added, representation of test cases is easier.
• Early skeletal Program allows demonstrations and boosts morale.
• Disadvantages of Top-Down integration :
• In this approach testing is conducted from sub module to main module, if the
main module is not developed a temporary program called DRIVERS is used to
simulate the main module.
Advantages:
• Advantageous if major flaws occur toward the bottom of the program.
• Test conditions are easier to create.
• Observation of test results is easier.
• Driver Modules must be produced.
• The program as an entity does not exist until the last module is added.
Disadvantages:
• Critical modules (at the top level of software architecture) which control the
flow of application are tested last and may be prone to defects.
• Early prototype is not possible .
• Bi Direction / Sandwich Integration Testing : (4 slides)
1. Bi-directional Integration is a kind of integration testing process that
combines top-down and bottom-up testing.
2. With an experience in delivering Bi-directional testing projects custom
software development services provide the best quality of the deliverables
right from the development of software process.
3. Bi-directional Integration testing is a vertical incremental testing strategy that
tests the bottom layers and top layers and tests the integrated system in the
computer software development process.
4. Using stubs, it tests the user interface in isolation as well as tests the very
lowest level functions using drivers.
5. Bi-directional Integration testing combines bottom-up and top-down testing.
6. Bottom-up testing is a process where lower level modules are integrated and
then tested.
7. This process is repeated until the component of the top of the hierarchy is
analyzed. It helps custom software development services find bugs easily
without any problems.
8. Top down testing is a process where the top integrated modules are tested
and the procedure is continued till the end of the related module.
9. Top down testing helps developers find the missing branch link easily
10. This technique is called as Sandwich Integration.
• Advantages:
1. Sandwich approach is useful for very large projects having several subprojects.
2. Both Top-down and Bottom-up approach starts at a time as per development
schedule.
3. Units are tested and brought together to make a system Integration is done
downwards.
• Disadvantages:
1. It require very high cost for testing because one part has Top-down approach
while another part has bottom-up approach.
2. It cannot be used for smaller system with huge interdependence between
different modules. It makes sense when the individual subsystem is as good as
Unit test Integration test
· The idea behind Unit Testing is to test each · The idea behind Integration Testing is to
part of the program and show that the combine modules in the application and test
individual parts are correct. as a group to see that they are working fine
· It can be performed at any time · It usually carried out after Unit Testing and
before System Testing
· Unit Testing tests only the functionality of the · Integrating testing may detect errors when
units themselves and may not catch modules are integrated to build the overall
integration errors, or other system-wide issues system
· It starts with the module specification · It starts with the interface specification
· It pays attention to the behavior of single · It pays attention to integration among
modules modules
· Unit test does not verify whether your code · Integration tests verify that your code works
works with external dependencies with external dependencies
• Testing on Web Applications:
• Functional testing
• Functionality of the application should be proper.
• Usability
• Tester should focus on ease of use of the web application.
• Security
• Security of web-based application is most important.
• Performance
• Performance should be load tested and stress tested.
• Usability testing: (3 slides)
• Card Sorting
• Used for testing navigation structure.
• This testing determines what to call various screens, pages or
functions and how to group them.
• In-Person Testing
• Run by one or more observers in fixed environment.
• Users are asked to accomplish certain tasks and observers can
interact with them and ask questions.
• Remote Testing
• Users perform various tasks in their own environment.
• Their attempt to accomplish a task is recorded via browser
• Compatibility testing: (2 slides)
• This testing is done to ensure a competitive edge in terms of
quality, compatibility, cost and delivery.
• To ensure customer satisfaction across multiple platforms.
• Aims at
• Authenticity
• Authorization
• Availability
• Confidentiality
• Integrity
• Non-repudiation (avoid refusing)
• Confidentiality : A security measure which protects
against the disclosure of information to parties other than
the intended recipient is by no means the only way of
ensuring the security.
• Integrity : Integrity of information refers to protecting
information from being modified by unauthorized parties.
• Authentication : This might involve confirming the identity
of a person, tracing the origins of an artifact, ensuring that
a product is what its packaging and labeling claims to be,
or assuring that a computer program is a trusted one.
• Availability : Assuring information and communications
services will be ready for use when expected. Information
must be kept available to authorized persons when they
need it.
• Non-repudiation (acknowledgment) : In reference to
digital security, non-repudiation means to ensure that a
transferred message has been sent and received by the
parties claiming to have sent and received the message.
Non-repudiation is a way to guarantee that the sender of
a message cannot later deny having sent the message and
that the recipient cannot deny having received the
message.
• Example :
• A Student Management System is insecure if
‘Admission’ branch can edit the data of ‘Exam’ branch.
• An ERP system is not secure if DEO (data entry operator)
can generate ‘Reports’.
• An online Shopping Mall has no security if customer’s
Credit Card Detail is not encrypted.
• A custom software possess inadequate security if an
SQL query retrieves actual passwords of its users .
Why Security testing is required?
• It is important in each and every stages of SLDC (Software
Development Life Cycle)
• Requirement Phase: Security analysis of all requirements
• Design Phase: Implementation of Test plan including
Security Tests.
• Code and Unit testing: Security White box testing
• Integration Testing: Black box testing
• System Testing: Black box testing and Vulnerability
Scanning.
• Types of Security testing:
• Vulnerability Scanning.
• Security Scanning.
• Penetration Testing.
• Risk Assessment.
• Security Auditing.
• Ethical Hacking.
• Client Server Testing: (6 slides)
fixes creating side effects and hence selecting the Test Case