0% found this document useful (0 votes)
81 views16 pages

Multiple Choice Question Ans-1

The document covers various aspects of software testing, including unit testing, integration testing, and object-oriented testing. It discusses different testing techniques such as black-box and white-box testing, along with their advantages and challenges. Additionally, it emphasizes the importance of testing methodologies in ensuring software quality and functionality.

Uploaded by

harsainyamsingh6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views16 pages

Multiple Choice Question Ans-1

The document covers various aspects of software testing, including unit testing, integration testing, and object-oriented testing. It discusses different testing techniques such as black-box and white-box testing, along with their advantages and challenges. Additionally, it emphasizes the importance of testing methodologies in ensuring software quality and functionality.

Uploaded by

harsainyamsingh6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

What is a key advantage of automated unit testing?

A) It eliminates the need for software developers


B) It replaces all forms of testing
C) It allows frequent code changes without breaking functionality
D) It is only useful in large-scale enterprise applications
What is the primary purpose of Unit Testing?
A) To test the entire software system
B) To test individual components or functions in isolation
C) To evaluate system performance under load
D) To ensure user acceptance of the software
Which of the following is NOT a type of software testing?
A) Unit Testing
B) Integration Testing
C) Debugging
D) System Testing
Answer: C) Debugging
What is the main purpose of regression testing?
A) To check if new code has introduced new defects
B) To test individual units of a program
C) To check if the software meets the business requirements
D) To test system performance
Answer: A) To check if new code has introduced new defects
Which testing is performed without executing the code?
A) White-box testing
B) Static testing
C) Black-box testing
D) Functional testing
Answer: B) Static testing
What does a test case consist of?
A) Test inputs
B) Execution conditions
C) Expected results
D) All of the above
Answer: D) All of the above
What is the primary goal of performance testing?
A) To check software functionality
B) To test security vulnerabilities
C) To measure system responsiveness under load
D) To find syntax errors in code
Answer: C) To measure system responsiveness under load

LEC 20
Which of the following is a type of functional testing?
A) Load Testing
B) Unit Testing
C) Stress Testing
D) Performance Testing
Answer: B) Unit Testing
What is the main focus of Black-Box Testing?
A) Testing internal code structure
B) Testing only the user interface
C) Testing functionality without knowing the internal code
D) Testing the system’s security
Answer: C) Testing functionality without knowing the internal code
What is Black Box Testing?
a) Testing based on internal code structure
b) Testing without knowledge of internal implementation
c) Testing performed by developers
d) Testing with access to source code
Answer: b) Testing without knowledge of internal implementation
Which of the following is NOT a Black Box Testing technique?
a) Equivalence Partitioning
b) Boundary Value Analysis
c) Control Flow Testing
d) Decision Table Testing
Answer: c) Control Flow Testing
What is White Box Testing?
a) Testing without knowledge of internal code
b) Testing with knowledge of internal code structure
c) Testing only the user interface
d) Testing performed by end-users
Answer: b) Testing with knowledge of internal code structure
What is the main goal of Statement Coverage in White Box Testing?
a) To check if all decisions are executed
b) To test only specific input values
c) To ensure all statements in the code are executed at least once
d) To find boundary conditions
Answer: c) To ensure all statements in the code are executed at least once
What is the primary goal of Unit Testing?
a) To test the complete system
b) To test individual components or functions
c) To evaluate user experience
d) To check system performance under load
Answer: b) To test individual components or functions
Which level of testing ensures that different modules or components work
together correctly?
a) Unit Testing
b) Integration Testing
c) System Testing
d) User Acceptance Testing
Answer: b) Integration Testing
At which testing level is the entire system tested as a whole?
a) Unit Testing
b) Integration Testing
c) System Testing
d) Component Testing
Answer: c) System Testing

LEC 21-23
What is the main purpose of Integration Testing?
a) To test individual components separately
b) To ensure that different modules work together correctly
c) To evaluate the performance of the system
d) To check user interface design
Answer: b) To ensure that different modules work together correctly
In Top-Down Integration Testing, which components are tested first?
a) Lower-level modules
b) Individual functions
c) Higher-level modules
d) Isolated test cases
Answer: c) Higher-level modules
What is the key challenge in Big Bang Integration Testing?
a) It requires all modules to be integrated at once
b) It only tests individual components
c) It does not require test data
d) It is performed without test cases
Answer: a) It requires all modules to be integrated at once
Which testing method combines both Top-Down and Bottom-Up Integration
Testing?
a) Regression Testing
b) Hybrid Integration Testing
c) Functional Testing
d) Unit Testing
Answer: b) Hybrid Integration Testing

What is Big-Bang Integration Testing?


a) Testing all modules in small groups
b) Integrating and testing all modules at once
c) Testing the system after deployment
d) Testing only the user interface
Answer: b) Integrating and testing all modules at once
What is the main drawback of Big-Bang Integration Testing?
a) It is easy to debug
b) It requires a lot of time and effort for debugging
c) It ensures early defect detection
d) It is preferred for all software projects
Answer: b) It requires a lot of time and effort for debugging
When is Big-Bang Integration Testing usually performed?
a) At the beginning of the development cycle
b) After all modules are developed
c) Before unit testing
d) During the design phase
Answer: b) After all modules are developed
In which type of projects is Big-Bang Integration Testing least suitable?
a) Large and complex projects
b) Small projects with fewer modules
c) Projects with independent modules
d) Research-based projects
Answer: a) Large and complex projects
What is Bottom-Up Integration Testing?
a) Testing higher-level modules first
b) Testing lower-level modules first and then integrating them
c) Testing all modules together
d) Testing only the user interface
Answer: b) Testing lower-level modules first and then integrating them
Which components are tested first in Bottom-Up Integration Testing?
a) High-level modules
b) Independent modules
c) Low-level modules
d) User interface components
Answer: c) Low-level modules
What is used as a temporary replacement for missing higher-level modules
in Bottom-Up Integration Testing?
a) Drivers
b) Stubs
c) Test cases
d) Debuggers
Answer: a) Drivers
What is one advantage of Bottom-Up Integration Testing?
a) Easier detection of high-level errors
b) Does not require temporary modules
c) Critical modules are tested early
d) Reduces the overall testing time
Answer: c) Critical modules are tested early
Which type of projects benefit the most from Bottom-Up Integration
Testing?
a) Large systems with complex dependencies
b) Projects where lower-level modules are crucial
c) Applications with simple workflows
d) Systems that require quick release without extensive testing
Answer: b) Projects where lower-level modules are crucial
What is the main disadvantage of Top-Down Integration Testing?
a) Low-level modules are tested first
b) Test case creation is not possible
c) Lower-level modules are tested later, which can delay finding defects
d) It requires all modules to be completed before testing starts
Answer: c) Lower-level modules are tested later, which can delay finding
defects
What is Top-Down Integration Testing?
a) Testing lower-level modules first
b) Testing all modules at once
c) Testing higher-level modules first and integrating lower-level ones step by step
d) Only testing independent modules
Answer: c) Testing higher-level modules first and integrating lower-level
ones step by step
Which of the following is the main focus of testing in Object-Oriented
Software?
a) Functions and procedures
b) Modules and components
c) Objects and their interactions
d) Line-by-line code execution
Answer: c) Objects and their interactions
What is the primary challenge in testing Object-Oriented Software?
a) Lack of tools for testing
b) Testing must focus on encapsulation, inheritance, and polymorphism
c) No need for specialized testing strategies
d) Only the main function needs testing
Answer: b) Testing must focus on encapsulation, inheritance, and
polymorphism
Which testing strategy is commonly used for Object-Oriented Software?
a) Functional Testing
b) Black-box Testing
c) Class-Based Testing
d) Statement Coverage Testing
Answer: c) Class-Based Testing
What is the purpose of Integration Testing in Object-Oriented Software?
a) To test individual classes separately
b) To verify the interaction between objects and classes
c) To test functions independently
d) To check spelling errors in the code
Answer: b) To verify the interaction between objects and classes
Which of the following is a key principle in Object-Oriented Testing?
a) Test procedural code first
b) Ignore inheritance and polymorphism
c) Focus on testing class behavior and interactions
d) Only test public methods of a class
Answer: c) Focus on testing class behavior and interactions

LEC 23-24
What does White-Box Testing primarily focus on?

a) Functional behavior of software

b) Internal structure and logic of the code

c) User interface design


d) System performance under load

Answer: b) Internal structure and logic of the code

Which of the following techniques is used in White-Box Testing?

a) Equivalence Partitioning

b) Control Flow Testing

c) Usability Testing

d) System Testing

Answer: b) Control Flow Testing

What is the main advantage of White-Box Testing?

a) It does not require knowledge of code

b) It ensures that all possible paths in the code are tested

c) It is performed by end users

d) It focuses only on UI design

Answer: b) It ensures that all possible paths in the code are tested

In White-Box Testing, what is Cyclomatic Complexity used for?

a) Measuring the number of test cases needed for complete path coverage

b) Analyzing user experience

c) Determining system performance

d) Checking graphical user interface responsiveness

Answer: a) Measuring the number of test cases needed for complete path
coverage
Which of the following is NOT a White-Box Testing technique?

a) Boundary Value Analysis

b) Path Testing

c) Statement Coverage

d) Decision Coverage

Answer: a) Boundary Value Analysis

What does Cyclomatic Complexity measure in a program?

a) The execution time of the program

b) The number of test cases needed for complete path coverage

c) The amount of memory used by the program

d) The total number of function calls in a program

Answer: b) The number of test cases needed for complete path coverage

Which formula is used to calculate Cyclomatic Complexity?

a) V(G) = E - N + 2P

b) V(G) = N + E - 2P

c) V(G) = E + N - 2

d) V(G) = P - N + 2E

Answer: a) V(G) = E - N + 2P

(Where E = Number of edges, N = Number of nodes, P = Number of connected


components)
What is the Cyclomatic Complexity of a program with 10 edges, 7 nodes, and
1 connected component?

a) 4

b) 5

c) 3

d) 6

Answer: b) 5

(Using the formula: V(G) = E - N + 2P = 10 - 7 + 2(1) = 5)

A higher Cyclomatic Complexity indicates:

a) Simpler code with fewer test cases

b) More maintainable code

c) More complex code that requires more testing

d) Less error-prone code

Answer: c) More complex code that requires more testing

Which of the following statements about Cyclomatic Complexity is TRUE?

a) It helps in identifying independent paths in the program

b) It decreases as more decision points (if/else, loops) are added

c) It is unrelated to software testing

d) It does not impact code maintainability

Answer: a) It helps in identifying independent paths in the program


LEC -25
Which of the following techniques is commonly used in black-box test case
generation?

A) Statement Coverage
B) Equivalence Partitioning
C) Cyclomatic Complexity
D) Mutation Testing

Answer: B) Equivalence Partitioning

Explanation: Black-box testing focuses on input-output behavior, and


Equivalence Partitioning helps by dividing inputs into valid and invalid classes
for efficient test coverage.

In black-box testing, what does Boundary Value Analysis (BVA) help with?

A) Identifying errors in loops


B) Checking conditions at extreme ends of input ranges
C) Ensuring every function is executed at least once
D) Analyzing internal program logic

Answer: B) Checking conditions at extreme ends of input ranges

Explanation: BVA tests edge cases of input ranges (e.g., min, max, just
below/above limits) since errors often occur at boundaries.

Which of the following is NOT a black-box test case design technique?


A) Decision Table Testing
B) Use Case Testing
C) Statement Coverage Testing
D) Cause-Effect Graphing
Answer: C) Statement Coverage Testing
Explanation: Statement Coverage is a white-box testing technique, whereas the
others are used in black-box testing to assess functionality without looking at
code structure.
In black-box testing, test cases are designed based on which of the following?
A) Internal program structure
B) Expected software behavior
C) Number of lines of code
D) Cyclomatic complexity
Answer: B) Expected software behavior
Explanation: Black-box testing is functionality-based and does not consider
internal code; it focuses on expected outputs for given inputs.
LEC -26-27
What is the primary challenge in testing polymorphism in object-oriented
applications?
A) Lack of encapsulation
B) Difficulty in identifying overridden methods
C) Unavailability of test tools
D) Testing procedural code

Answer: B) Difficulty in identifying overridden methods

Which type of testing is best suited for checking the behavior of derived
classes in object-oriented programming?
A) Unit testing
B) Regression testing
C) Integration testing
D) Inheritance testing

Answer: D) Inheritance testing

In object-oriented testing, what is the main focus of class testing?


A) Validating object interactions
B) Checking individual functions
C) Testing data structures
D) Ensuring database connectivity

Answer: A) Validating object interactions

What is the key difference between conventional testing and object-oriented


testing?
A) Object-oriented testing focuses on functions, while conventional testing
focuses on objects
B) Object-oriented testing deals with relationships between objects, inheritance,
and encapsulation
C) Conventional testing is more complex than object-oriented testing
D) Object-oriented testing does not require test cases

Answer: B) Object-oriented testing deals with relationships between objects,


inheritance, and encapsulation

What is the primary goal of Object-Oriented Analysis and Design (OOAD)?


A) To develop functional programming models
B) To break a system into modules without relationships
C) To model software systems using objects, classes, and their relationships
D) To write code without any planning

Answer: C) To model software systems using objects, classes, and their


relationships

Which of the following is NOT a phase in Object-Oriented Analysis and


Design?
A) Object-Oriented Analysis (OOA)
B) Object-Oriented Programming (OOP)
C) Object-Oriented Design (OOD)
D) Object-Oriented Implementation

Answer: B) Object-Oriented Programming (OOP)


In OOAD, which concept ensures that an object’s data is hidden from
external access and modification?
A) Polymorphism
B) Inheritance
C) Encapsulation
D) Abstraction

Answer: C) Encapsulation

What does UML stand for in the context of OOAD?


A) Unified Modeling Language
B) Universal Machine Learning
C) User Management Library
D) Unified Management Logic

Answer: A) Unified Modeling Language

Which UML diagram is used to represent the dynamic behavior of a system?


A) Class diagram
B) Use case diagram
C) Sequence diagram
D) Component diagram

Answer: C) Sequence diagram

Which concept in OOA helps in breaking down complex systems into smaller,
manageable objects?

A) Generalization
B) Modularity
C) Hard coding
D) Sequential processing

Answer: B) Modularity

What is the role of Use Case Diagrams in Object-Oriented Analysis?


A) To show the internal code structure of a system
B) To model the static structure of a system
C) To capture functional requirements by modeling interactions between actors and the
system
D) To represent database schema design

Answer: C) To capture functional requirements by modeling interactions between


actors and the system

What is the primary focus of Object-Oriented Analysis (OOA)?

A) Implementing software using object-oriented programming languages


B) Defining the system’s functionality using structured programming
C) Identifying and modeling real-world objects and their interactions
D) Writing low-level code without planning

Answer: C) Identifying and modeling real-world objects and their interactions

1. What is the primary objective of Object-Oriented Design (OOD)?


A) To identify the requirements of the system
B) To define the implementation of software using objects, classes, and their
relationships
C) To develop a structured programming model
D) To create database tables for the system

Answer: B) To define the implementation of software using objects, classes,


and their relationships

Which of the following is NOT a key principle of Object-Oriented Design?


A) Encapsulation
B) Polymorphism
C) Hard coding
D) Inheritance

Answer: C) Hard coding

Which of the following UML diagrams is primarily used in Object-Oriented


Design to represent the static structure of a system?
A) Sequence Diagram
B) Activity Diagram
C) Class Diagram
D) State Diagram

Answer: C) Class Diagram

What role do design patterns play in Object-Oriented Design?


A) They provide predefined solutions to common design problems
B) They enforce strict coding guidelines
C) They eliminate the need for software architecture
D) They replace the need for Object-Oriented Programming

Answer: A) They provide predefined solutions to common design problems

Which Object-Oriented Design principle promotes designing classes that


have a single responsibility?
A) Open/Closed Principle
B) Liskov Substitution Principle
C) Single Responsibility Principle
D) Dependency Inversion Principle

Answer: C) Single Responsibility Principle

You might also like