Chapter No 2: Types and Level of testing
Q.1] List the levels of testing.
a) Unit test
b) Integration test
c) System test
d) Acceptance test
Q.2] Describe the concept of driver and stub with suitable example.
1. Stub: A stub is a simplified version of a lower-level module that provides
predefined responses to test higher-level modules.
2. Driver: A driver is a piece of code that simulates higher-level modules to
test lower-level modules.
Q.3] Differentiate between drivers and stub
Parameter Driver Stub
1. Purpose Simulates higher-level modules for Simulates lower-level modules
testing lower ones. for testing higher ones.
2. Used in Top-down integration testing. Bottom-up integration testing.
3. Real Simulates a higher-level module's Simulates the functionality of
Functionality functionality. lower-level modules.
4. Location Higher in the module hierarchy. Lower in the module hierarchy.
5. Implementation Implements higher-level module Implements simplified lower-
behaviour. level behaviour.
6. Test Depends on the lower-level Depends on higher-level
Dependency modules being tested. modules being tested.
7. Complexity More complex, simulates multiple Simpler, provides placeholder
higher functions. responses.
Q.4] Differentiate between alpha and beta testing.
Parameter Alpha Testing Beta Testing
1. Purpose To find bugs before release. To gather user feedback on
performance and usability.
2. Who Internal developers or QA team. External users or selected customers.
Conducts
3. Environment Done in-house or in a controlled Done in real-world environments.
environment.
4. Timing Conducted before Beta testing. Conducted after Alpha testing.
5. Feedback Focuses on functionality and Focuses on user experience and
Focus stability. performance.
6. Bug Fixing Bugs are fixed internally. Bugs are reported by users and fixed
before release.
7. Scope Tests internal features and Tests real-world usage and user
functions. interactions.
8. Access Limited to internal team Available to a wider audience of
members. users.
Q.5] State the testing approaches that are considered during client server
testing. OR Explain client-server testing with suitable diagram.
Client Server Testing:
▪ Client-server testing validates the interaction between the client (user
interface) and the server (backend), ensuring they work together as
expected.
▪ The goal is to ensure the client sends valid requests, the server processes
them correctly, and the responses are appropriate.
▪ Functional testing checks that both client and server perform their required
tasks correctly, like logging in and retrieving data.
▪ Integration testing ensures that the client and server communicate
effectively, sending and receiving data properly.
Fig. client-server testing
Testing Approaches:
1. Component Testing: One need to define the approach and test plan for
testing client and server individually. When server is tested there is need of
a client simulator, whereas testing client a server simulator, and to test
network both simulators are used at a time.
2. Integration testing: After successful testing of server, client and network,
they are brought together to form system testing.
3. Performance testing: System performance is tested when number of
clients is communicating with server at a time. Volume testing and stress
testing may be used for testing, to test under maximum load as well as
normal load expected. Various interactions may be used for stress testing.
4. Concurrency Testing: It is very important testing for client server
architecture. It may be possible that multiple users may be accessing same
record at a time, and concurrency testing is required to understand the
behavior of a system in this situation.
Q.6] State and describe top-down approach of integration testing with
diagram.
Integration Testing:
Integration Testing is the phase in software testing, wherein
individual software modules are combined and tested as a group.
Integration testing is the process of testing the interface
between two software units or module.
Types of Integration Testing:
1. Big Bang Approach
2. Incremental Approach
a. Top Down
b. Bottom Up
c. Sandwich: Combination of Top-Down and Bottom-Up
1] Top-down Integration:
▪ Top-down integration testing starts with the highest-level modules and
moves downward.
▪ Testing begins with top-level components that define the system’s
behaviour.
▪ Stubs simulate untested lower-level modules during testing.
▪ Higher-level modules are tested first, then lower-level modules are
integrated.
▪ It helps validate the system's overall functionality early.
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:
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
Q.7] Describe graphical user interface (GUI) testing and its important
traits. OR What is GUI testing? Give one example
GUI Testing:
▪ GUI testing ensures that interactive elements like buttons and text fields
work as expected.
▪ It verifies that the interface is intuitive and easy to navigate.
▪ It checks that the visual design, including colors and layout, is consistent.
▪ GUI testing ensures compatibility across different browsers and
platforms.
▪ It assesses the performance, ensuring quick responses and no delays.
▪ It checks error handling, ensuring clear messages guide users when issues
arise.
GUI Testing Guidelines:
1. Check Screen Validations
2. Verify All Navigations
3. Check usability Conditions
4. Verify Data Integrity
5. Verify the object states
6. Verify the date Field and Numeric Field Formats
Example of GUI Testing:
1. Verifying button functionality (e.g., "Submit" button).
2. Checking text field input (e.g., username/password).
3. Ensuring proper element alignment.
4. Testing error messages (e.g., "Invalid password").
Advantages of GUI Testing:
1. Verifies user interface functionality and design.
2. Simulates real user interactions.
3. Identifies visual and layout issues.
4. Automation improves efficiency.
Disadvantages of GUI Testing:
1. Time-consuming, especially for complex UIs.
2. Requires frequent maintenance.
3. Misses underlying system issues.
4. Needs specialized tools and skills.
Q.8] Describe Load testing and Stress testing
a) Load testing
▪ Load Testing is a type of performance testing to check system with
constantly increasing the load on the system until the time load reaches its
threshold value. Here Increasing load means increasing number of
concurrent users, transactions & check the behavior of the application
under test.
▪ It is normally carried out underneath controlled environment to distinguish
between two different systems.
▪ The main purpose of load testing is to monitor the response time and
staying power of application when the system is performing well under
heavy load.
▪ The successfully executed load testing is only if the specified test cases are
executed without any error in allocated time.
▪ Load testing is testing the software under customer expected load.
Load Testing Examples:
1. Sending large print jobs.
2. Reading and writing data to a hard disk.
3. Running multiple server applications.
4. Accessing multiple mailboxes.
b) Stress testing:
▪ Stress Testing is performance testing type to check the stability of software
when
▪ hardware resources are not sufficient like CPU, memory, disk space etc.
▪ It is performed to find the upper limit capacity of the system and also to
determine
▪ how the system performs if the current load goes well above the expected
maximum.
▪ Main parameters to focus during Stress testing are “Response Time” and
“Throughput”.
▪ Stress testing is Negative testing where we load the software with large
number of concurrent users/processes which cannot be handled by the
systems hardware resources.
▪ This testing is also known as Fatigue testing.
Stress Testing Examples:
1. Overloading a printer with jobs.
2. Writing excessive data to a disk.
3. Overloading a server with apps.
4. Simulating thousands of mail server users.
Q.9] Differentiate between Smoke Testing and Sanity Testing
Smoke Testing Sanity Testing
1. Smoke testing may be stable or 1. Sanity testing is stable.
unstable.
2. Test execution time is Quick 2. Takes more time due to detailed
focus.
3. Smoke testing is scripted. 3. Sanity testing is usually not scripted
4. Smoke testing is documented. 4. Sanity testing isn’t documented.
5. Smoke testing is also called subset of 5. Sanity testing is also called subset of
acceptance testing. regression testing.
6. Smoke testing is performed by either 6. Sanity testing is normally performed
developers or testers. by testers.
Q.10] Describe Unit Testing
Unit Testing:
Software product is made up of many units, each unit needed to be
tested to find whether they have implemented the design correctly or not.
▪ Unit Testing is a level of software testing where individual units/
components of a software are tested.
▪ The purpose is to validate that each unit of the software performs as
designed.
▪ A unit is the smallest testable part of any software.
▪ It usually has one or a few inputs and usually a single output.
▪ In procedural programming, a unit may be an individual program, function,
▪ procedure, etc.
▪ In object-oriented programming, the smallest unit is a method, which may
belong to a base/ super class, abstract class or derived/ child class.
▪ Unit Testing is performed by using the White Box Testing method
Example: A function, method, Loop or statement in program is working fine.
Q.11] Explain following concepts related to security testing –
i) Authorization.
ii) Access Control.
Authorization:
1. Authorization defines what actions an authenticated user can perform in a
system.
2. It ensures access is granted based on user roles or permissions.
3. Typically implemented using Role-Based Access Control (RBAC).
4. Protects sensitive data by limiting access to authorized users.
5. Can be enforced through access control lists (ACLs) or policies.
6. Prevents unauthorized actions, ensuring users only access allowed
resources.
Access Control:
1. Access control regulates who can access resources within a system.
2. It is based on identity, roles, or attributes.
3. Models include Discretionary Access Control (DAC), Mandatory Access
Control (MAC), and RBAC.
4. Protects sensitive information by restricting unauthorized access.
5. Enforced using methods like passwords, biometrics, and encryption.
6. Needs regular updates to address security threats and ensure compliance.
Q.12] Explain the testing approaches that are considered during web
application testing
Web Based Testing:
Web application testing, a software testing technique
exclusively adopted to test the applications that are hosted on web in which the
application interfaces and other functionalities are tested.
Web Application Testing Techniques:
1) Functionality Testing
2) Usability testing
3) Compatibility testing
4) Performance testing
1. Functionality Testing:
It is a type of software testing whereby the system is
tested against the functional requirements/specifications.
▪ Verify there is no dead page or invalid redirects.
▪ First check all the validations on each field.
▪ Wrong inputs to perform negative testing.
▪ Verify the workflow of the system.
▪ Verify the data integrity.
2. Usability testing:
It is done to check whether application is easy to a common
use who will be using the application.
▪ Test the navigation and controls.
▪ Content checking.
3. Compatibility testing:
Compatibility Testing is a type of software testing to
check whether your software is capable of running on different hardware,
operating systems, applications, network environments or Mobile devices.
▪ Browser compatibility
▪ Operating system compatibility
▪ Compatible to various devices like notebook, mobile, etc.
4. Performance testing:
Performance testing is the process of determining the speed,
responsiveness and stability of a computer, network, software program or device
under a workload
Q.13] Describe the regression testing. State entry and exit criteria for
regression testing.
Regression Testing:
▪ Regression testing a black box testing technique, that consists of re-
executing those tests that are impacted by the code changes.
▪ These tests should be executed as often as possible throughout the software
development life cycle. It is performed to validate the build that hasn't
changed for a period of time.
▪ This build is deployed or shipped to customers. A normal regression testing
is performed to verify if the build has not broken any other parts of the
application by the recent code changes for defect fixing or for
enhancement.
▪ It finds other related bugs. It tests to check the effect on other parts of the
program
Entry criteria:
Entry criteria are the condition or the set of conditions, which should exist or be
met in order to start a process.
Some of the conditions or situations, which may be seen as an entry criterion for
the initiation of testing activities.
▪ Requirements should be clearly defined and approved.
▪ Test Design and documentation plan is ready.
▪ Availability of the test environment supporting necessary hardware,
software, network
▪ configuration, settings, and tools for the purpose of test execution.
▪ Testers are trained, and necessary resources are available.
▪ Availability of proper and adequate test data (like test cases).
▪ It depends upon which software development model is used.
Exit criteria:
Exit Criteria is often viewed as a single document concluding the end of a life
cycle phase.
Some of the conditions or situations which may be seen as an exit criterion for
testing
activities.
▪ Testing Deadline
▪ Completion of test case execution.
▪ Completion of Functional and code coverage to a certain point.
Q.14] Illustrate process of bi-directional integration testing. State its two
advantages & disadvantages
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.
Advantages:
1. Tests data flow in both directions.
2. Ensures correct system communication.
3. Identifies interface issues early.
4. Improves system reliability.
Disadvantages:
1. Time-consuming.
2. Requires more resources.
3. Complex setup for many dependencies.
4. May miss high-level integration issues.