B.B.A. (C.A.
) CA-602 : SOFTWARE TESTING
(2019 Pattern) (Semester - VI)
Time : 2½ Hours] [Max. Marks : 70
Instructions to the candidates:
1) All questions are compulsory.
2) Neat diagram must be drawn wherever necessary.
3) Figures to the right indicate full marks.
Q1) Attempt any EIGHT of the following (out of TEN) : [8 × 2 = 16]
a) Explain the term performance testing.
Performance Testing:
Performance testing is a type of non-functional testing that measures how
well an application performs under a particular workload. It is used to ensure
that the system meets performance requirements, such as speed, scalability,
and stability. Key aspects include response time, throughput, and resource
utilization.
b) Define Big Bang Approach.
Big Bang Approach:
The Big Bang approach is an integration testing approach where all or most
of the developed modules are combined together in one go and then tested. It
contrasts with incremental approaches. This method can make debugging
difficult because it is hard to isolate which module is causing issues.
c) Define failure and defect.
Failure and Defect:
Failure: A failure occurs when the system or a component does not perform
its intended function or performs incorrectly.
Defect: A defect (or bug) is an error in the code or logic that causes a
program to malfunction and produce incorrect or unexpected results.
d) Define verification testing.
Verification Testing:
Verification testing ensures that the software meets its specification and
design documents. It is a static process that includes reviews, inspections,
and walk-throughs to ensure that the software is built correctly.
e) What is sandwich approach of integration testing?
Sandwich Approach of Integration Testing:
The sandwich approach is a hybrid integration testing technique that
combines both top-down and bottom-up approaches. Testing starts with
middle layer modules, with top modules tested through stubs and bottom
modules tested through drivers.
f) Define validation Testing.
Validation Testing:
Validation testing ensures that the final product meets user needs and
requirements. It is a dynamic process and involves executing the code. This
testing is done after verification and answers the question "Are we building
the right product?"
g) Explain sandwich approach.
Sandwich Approach:
The sandwich approach is the same as the sandwich approach of integration
testing mentioned above. It combines elements of both top-down and
bottom-up integration testing techniques.
h) Explain terms - Error, Fault and Failure.
Error, Fault, and Failure:
Error: An error is a human action that produces an incorrect result. For
example, a programmer's mistake in the code.
Fault: A fault, also known as a defect, is an incorrect step, process, or data
definition in a program that causes the program to behave unexpectedly.
Failure: A failure is the manifestation of a fault during execution. It occurs
when the system does not perform as expected due to the fault.
i) Define regression testing.
Regression Testing:
Regression testing is a type of software testing that ensures that recent code
changes have not adversely affected existing functionalities. It is performed
to verify that new updates or bug fixes do not introduce new defects.
j) What is software metric?
Software Metric:
A software metric is a measure used to quantify various characteristics of
software development and performance. Metrics can include lines of code,
code complexity, test coverage, and defect density. They help in assessing
the quality, productivity, and efficiency of software processes.
Q2) Attempt any FOUR of the following (out of FIVE) : [4 × 4 = 16]
a) Explain V-V Model of testing in detail.
V-V Model of Testing: The V-V (Verification and Validation) Model is an
extension of the waterfall model. It emphasizes the importance of validation and
verification in each phase of the software development lifecycle (SDLC). The
model represents the development and testing activities in a V-shape, illustrating
that every development phase has a corresponding testing phase.
Requirements Analysis: User requirements are gathered.
System Design: System architecture and design are created.
High-Level Design (HLD): Overview of modules and their interaction.
Low-Level Design (LLD): Detailed design of modules.
Coding: Actual implementation of the design.
Corresponding Testing Phases:
Acceptance Testing: Validates the system against user requirements.
System Testing: Validates the system as a whole.
Integration Testing: Validates the interaction between integrated modules.
Unit Testing: Validates individual modules.
b) Explain load and Smoke testing in detail.
Load and Smoke Testing:
Load Testing:
o Load testing is a type of performance testing that checks how the
system behaves under an expected load. It measures the system's
performance in terms of response time, throughput, and resource
usage when subjected to a specified number of users or transactions.
o Example: Testing a web application with 1,000 concurrent users to see
how it handles the load.
Smoke Testing:
o Smoke testing is a preliminary test to check the basic functionality of
an application. It ensures that the critical functions of the software are
working correctly. It's often called "build verification testing."
o Example: Testing whether the login functionality works in a new build
of a software application.
c) Explain any four testing principles in detail.
Four Testing Principles:
Principle of Defect Clustering: A small number of modules contain the
most defects. This principle suggests that testing efforts should focus on
these areas.
Principle of Pesticide Paradox: Repeated use of the same test cases will
eventually stop finding new defects. To uncover more defects, test cases
need to be regularly reviewed and revised.
Principle of Early Testing: Testing activities should start as early as
possible in the software development lifecycle to detect and fix defects early,
reducing the cost and effort.
Principle of Absence of Errors Fallacy: Even if a software product is
defect-free, it may not be usable if it doesn't meet the user's requirements
and expectations. Effective testing ensures both defect-free and user
satisfaction.
d) Explain all testing principles in detail.
All Testing Principles (Expanded from c):
Principle of Exhaustive Testing: It is impossible to test all possible
scenarios. Therefore, testing should be risk-based and focused on the most
critical functionalities.
Principle of Early Testing: Testing should start early in the SDLC.
Principle of Defect Clustering: Majority of the defects are found in a small
number of modules.
Principle of Pesticide Paradox: Regularly update and revise test cases.
Principle of Testing is Context-Dependent: Testing is tailored to the
specific context of the software being tested.
Principle of Absence of Errors Fallacy: Defect-free software is not
enough; it should also meet user needs.
e) Differentiate between alpha and beta testing.
Feature Alpha Testing Beta Testing
Conducted By Internal testing team External users or customers
In-house, controlled
Environment Real-world environment
environment
Final testing phase before
Stage of Testing Early testing phase
release
Gather feedback on user
Identify bugs and issues before
Purpose experience and uncover hidden
beta release
issues
Given to a selected group of
Access Limited to internal testers
external users
Q3) Attempt any FOUR of the following (out of FIVE) : [4 × 4 = 16]
a)Explain Boundary-Value analysis in details.
Boundary-Value Analysis:
Boundary-Value Analysis (BVA) is a black-box testing technique that
focuses on testing the boundaries of input domains. It is based on the
principle that errors often occur at the edges of input ranges. Test cases are
created for values at the boundaries, just inside the boundaries, and just
outside the boundaries.
For example, if an input field accepts values from 1 to 100, boundary-value
test cases would include: 0, 1, 2, 99, 100, and 101.
b)Explain GUI testing in details.
GUI Testing:
GUI Testing (Graphical User Interface Testing) is a type of testing that
ensures that the user interface of an application functions correctly and
meets specifications. It involves checking visual elements such as buttons,
icons, menus, and other graphical components.
Tests include verifying that GUI elements are aligned properly, functional,
and respond correctly to user interactions. Automated tools like Selenium
and QTP can be used for GUI testing.
c)Explain Sandwich and Big-Bang approach of Integration testing.
Sandwich Approach:
This approach combines the top-down and bottom-up integration testing
strategies. It starts testing from the middle layer, moving towards both the
top and bottom layers simultaneously.
This approach benefits from both strategies but can be complex due to the
simultaneous testing in both directions.
d)Explain Software testing life cycle with diagram.
In the Big-Bang approach, all or most of the developed modules are combined
together and tested in one go.
While this method can quickly check for overall system functionality, it makes
isolating and debugging defects difficult since all modules are integrated at once.
Diagram:-
e)Write difference between Static and Dynamic testing.
Feature Static Testing Dynamic Testing
Nature Involves examining code Involves executing code
and documents without to validate functionality
execution
Examples Reviews, inspections, Unit tests, integration
walkthroughs tests, system tests
When Performed Early stages of Later stages, after code is
development developed
Objective Identify defects early, Identify defects during
prevent errors execution, ensure the
software works as
intended
Cost Generally lower cost Can be higher due to the
need for execution and
resources
Q4) Attempt any FOUR of the following (out of FIVE) : [4 × 4 = 16]
a) Explain test case design for the login process.
Test Case Design for the Login Process:
Objective: Ensure that the login functionality works correctly for all valid
and invalid inputs.
Test Cases:
o Valid Login: Enter correct username and password. Verify successful
login.
o Invalid Login: Enter incorrect username and/or password. Verify
error message.
o Empty Fields: Leave username and password fields empty. Verify
error message.
o SQL Injection: Enter SQL commands in username/password fields.
Verify security.
o Case Sensitivity: Check if username and password fields are case-
sensitive.
b) Stub and Driver concept in Unit testing.
Stub and Driver Concept in Unit Testing:
Stub: A stub is a piece of code that simulates the behavior of a module that
is called by the unit being tested. It is used to replace lower-level modules
that are not yet developed.
Driver: A driver is a piece of code that simulates the behavior of a module
that calls the unit being tested. It is used to replace higher-level modules that
are not yet developed.
Example: If testing module A which depends on module B (not developed),
we create a stub for B. If module A is not the main module but is called by
module C (not developed), we create a driver for C.
c) Explain white box testing and its techniques.
White Box Testing: Testing technique where the internal structure, design, and
implementation of the software are known to the tester. It is also known as clear
box, open box, or glass box testing.
Techniques:
Statement Coverage: Ensures that all statements in the code are executed at
least once.
Branch Coverage: Ensures that all branches (decision points) in the code
are executed.
Path Coverage: Ensures that all possible paths in the code are executed.
Condition Coverage: Ensures that all logical conditions are tested with both
true and false outcomes.
d) Explain Capability Maturity Model (CMM) in detail.
CMM: The Capability Maturity Model is a framework for improving software
development processes. It describes five levels of process maturity:
Level 1 - Initial: Processes are ad hoc and chaotic. Success depends on
individual efforts.
Level 2 - Repeatable: Basic project management processes are established.
Success can be repeated.
Level 3 - Defined: Processes are well-defined and standardized. Standard
processes are used across projects.
Level 4 - Managed: Processes are measured and controlled. Quantitative
performance metrics are used.
Level 5 - Optimizing: Focus is on continuous process improvement.
Processes are refined based on feedback and innovation.
e) Calculate the cyclometric complexity of a code which accepts 3 integer values
and print the highest and lowest value.
Code
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
int highest = a;
if (b > highest) {
highest = b;
}
if (c > highest) {
highest = c;
}
int lowest = a;
if (b < lowest) {
lowest = b;
}
if (c < lowest) {
lowest = c;
}
System.out.println("Highest: " + highest);
System.out.println("Lowest: " + lowest);
}
}
Cyclomatic Complexity Calculation:
Formula: V(G) = E - N + 2P
o E = Number of edges (lines connecting nodes)
o N = Number of nodes (decision points)
o P = Number of connected components (usually 1 for a single program)
In this code:
o Nodes (N): 6 (if conditions)
o Edges (E): 7 (paths through the if conditions)
Cyclomatic Complexity: V(G) = 7 - 6 + 2 = 3
Q5) Write a short note on Any TWO of the following (out of Three) :
[2 × 3 = 6]
a) Rational Robot
Rational Robot is an automated functional, regression, and performance
testing tool developed by IBM. It is used to automate user actions on
graphical user interface (GUI) applications and to validate their behavior.
The tool supports testing of applications developed using various
technologies such as Java, HTML, .NET, and ERP applications.
Rational Robot uses a scripting language called SQABasic, which allows
testers to create scripts to automate test cases.
Key features include script recording and playback, object recognition, data-
driven testing, and integration with other Rational Software tools for
comprehensive test management.
b) System testing
System testing is a level of software testing where a complete and integrated
software system is tested as a whole.
The purpose of system testing is to evaluate the system's compliance with
the specified requirements. It ensures that the system performs as expected
and identifies any discrepancies between the actual and expected behavior.
Types of system testing include functional testing, performance testing,
security testing, usability testing, and compatibility testing.
System testing is typically performed after integration testing and before
acceptance testing, ensuring that all components and subsystems work
together seamlessly.
c) Statement coverage criteria of White-Box testing
Statement coverage is a white-box testing technique that involves executing
all the executable statements in the source code at least once.
The main goal of statement coverage is to ensure that all lines of code are
tested, reducing the risk of missing defects in unexecuted code paths.
It helps identify areas of the code that have not been executed and may
contain hidden defects.
Statement coverage is measured as the percentage of executed statements
out of the total statements in the code.
While statement coverage is useful, it may not be sufficient on its own. It is
often complemented with other coverage criteria such as branch coverage
and path coverage for more comprehensive testing.