Important Question Se For Final
Important Question Se For Final
Ans.
3. Explain Black box testing and White box testing.
Ans.
4. List and explain different types of testing done during testing phase.
Ans.
During the testing phase, various types of tests are conducted to verify different aspects of the
software. Let’s explore some of the key testing types:
1. Unit Testing:
o Definition: Unit testing focuses on testing individual units of code (such as
functions, methods, or classes) in isolation.
o Purpose: It ensures that each unit behaves correctly and meets its specifications.
o Scope: Typically performed by developers during the development process. o
Tools: Unit testing frameworks like JUnit, NUnit, or pytest are commonly used.
o Example: Verifying that a specific function correctly calculates the square root of
a given number.
2. Integration Testing:
o Definition: Integration testing evaluates how different individual units of code
work together when integrated.
o Purpose: It identifies issues related to data flow, communication, and interactions
between components.
o Scope: Focuses on interactions between modules or subsystems.
o Example: Testing the interaction between a payment gateway and an ecommerce
application.
3. System Testing:
o Definition: System testing verifies the entire software system as a whole.
o Purpose: It ensures that the system functions correctly, meets requirements, and
handles real-world scenarios.
o Scope: Covers end-to-end functionality, including user interfaces, databases, and
external integrations.
o Example: Testing an online banking system by simulating user transactions.
4. Acceptance Testing:
o Definition: Acceptance testing validates whether the software meets user
expectations and business requirements.
o Purpose: It ensures that the software is ready for deployment and use. o Scope:
Performed by end-users or product owners. o Example: Conducting user
acceptance testing (UAT) to verify that the software aligns with business
processes.
5. Functional Testing:
o Definition: Functional testing checks whether the software functions as expected
based on specified requirements.
o Purpose: It validates features, inputs, outputs, and user interactions. o Scope:
Covers both positive and negative scenarios.
o Example: Testing login functionality, form submissions, and navigation.
6. Performance Testing:
o Definition: Performance testing assesses the software’s responsiveness,
scalability, and resource usage.
o Purpose: It identifies bottlenecks, response times, and system limits. o Types:
Includes load testing, stress testing, and scalability testing.
o Example: Evaluating how an e-commerce website handles concurrent user
requests during a sale.
7. Security Testing:
o Definition: Security testing examines vulnerabilities, threats, and risks related
to the software’s security. o Purpose: It ensures protection against
unauthorized access, data breaches, and attacks.
o Types: Includes penetration testing, vulnerability scanning, and code review. o
Example: Checking for SQL injection or cross-site scripting (XSS)
vulnerabilities.
8. Usability Testing:
o Definition: Usability testing assesses the software’s user-friendliness and user
experience. o Purpose: It identifies usability issues, navigation challenges, and
user satisfaction.
o Scope: Involves real users performing tasks. o Example: Observing users
as they interact with a mobile app to find any usability issues.
Ans.
Cyclomatic complexity is a software metric used to quantify the complexity of a program. It
provides insights into how intricate the code is by measuring the number of linearly
independent paths through the program’s source code.
1. Definition:
o Cyclomatic complexity represents the number of decision points in the code. o
It was developed by Thomas J. McCabe, Sr. in 1976.
o The higher the cyclomatic complexity, the more complex the code.
2. Calculation:
o Cyclomatic complexity is computed using the Control Flow Graph (CFG) of
the program. o The CFG consists of nodes (representing groups of
commands) and directed edges (connecting nodes where the second command
might immediately follow the first). o The formula for cyclomatic
complexity is: ▪ (M = E - N + 2P) ▪ Where:
(E) is the number of edges in the control flow graph.
(N) is the number of nodes in the control flow graph.
(P) is the number of connected components (usually 1 for a single
method).
3. Example:
o Consider the following code snippet:
o A = 10 o IF B > C THEN o A = B o ELSE o A = C o ENDIF o Print
A o Print B o Print C o The control flow graph for this code has seven nodes
and seven edges.
o Therefore, the cyclomatic complexity is calculated as: [M = 7 - 7 + 2 = 2]
4. Use and Benefits:
o Test Coverage: Cyclomatic complexity helps ensure that every path in the code
has been tested at least once.
o Code Improvement: It highlights areas of complexity, allowing developers to
focus on uncovered paths.
o Risk Evaluation: By understanding complexity, risks associated with the
program can be evaluated. o Quality Metric: It serves as a quality metric, aiding
in design decisions.
6. Define Coupling and Cohesion. What is the difference between cohesion and
coupling?
Ans.
Cohesion refers to how closely related the functionalities within a single module are.
7. difference between unit testing and integration testing and systaem testing.
Ans.
1. Unit Testing:
o Definition: Unit testing focuses on testing individual software components
(such as functions, methods, or classes) in isolation.
o Purpose: It ensures that each unit behaves correctly and meets its specifications.
o Scope: Typically performed by developers during the development
process. o Tester’s Knowledge: Developers have knowledge of the internal
design of the software.
o Method: White box testing. o Timing: Unit testing is performed first,
even before integration testing. o Cost: Less costly compared to other testing
types. o Focus: Observes functionality of individual units.
o Example: Verifying that a specific function correctly calculates the square root of
a given number.
2. Integration Testing:
o Definition: Integration testing evaluates the interactions and interfaces between
different units or modules of the software. o Purpose: It identifies issues
related to data flow, communication, and interactions. o Scope: Focuses on
the combined behavior of multiple modules. o Tester’s Knowledge: Testers
don’t know the internal design of the software.
o Method: Black box testing. o Timing: Performed after unit testing and
before system testing. o Cost: More costly due to the integration of
modules. o Focus: Ensures correctness of the interface between integrated
units.
o Example: Testing the interaction between a payment gateway and an ecommerce
application.
3. System Testing:
o Definition: System testing verifies the entire software system as a whole.
o Purpose: It ensures that the system functions correctly, meets requirements, and
handles real-world scenarios. o Scope: Covers end-to-end functionality,
including user interfaces, databases, and external integrations. o Tester’s
Knowledge: Focuses on external behavior without knowing the internal design.
o Method: Black box testing. o Timing: Performed after integration testing.
o Cost: More expensive due to comprehensive testing. o Focus:
Validates the entire system against specified requirements. o Example:
Testing an online banking system by simulating user transactions.
In summary:
Ans.
9. What is Cyclomatic complexity? find Cyclomatic complexity
Ans.
o The graph consists of seven nodes (labeled from ‘1’ to ‘7’). o Each
node represents a command or statement in the program.
o The edges connect the nodes, indicating the flow of control.
2. Flow Paths:
o Starting from node ‘1’, we have the following paths:
Path 1: 1 → 2 → 3 → 4 → 5 → 6 → 7
Path 2: 1 → 2 → 4 → 5 → 6 → 7
Path 3: 1 → 2 → 4 → 5 → 6 → 6 (loop)
Path 4: 1 → 2 → 4 → 5 → 6 → 5 (loop)
Path 5: 1 → 2 → 4 → 5 → 7 ▪ Path 6: 1 → 2 → 4 → 5 → 6 → 5 →
7
3. Cyclomatic Complexity:
o Using the formula (M = E - N + 2P):
(E) (edges) = 9
(N) (nodes) = 7
(P) (connected components) = 1 (single method)
Calculating: (M = 9 - 7 + 2 = 4) o The cyclomatic complexity of this
control flow graph is 4.
4. Summary: o The graph represents a program with decision points
and loops. o Understanding its complexity helps in testing
and maintenance.
Risk management is the systematic process of identifying, assessing, and mitigating threats
or uncertainties that can affect an organization. It involves analyzing the likelihood and impact
of risks, developing strategies to minimize harm, and monitoring the effectiveness of those
measures1. Here are some key points about risk management:
1. Purpose:
o Identify Threats: Risk management helps organizations recognize potential
dangers and threats.
o Minimize Impact: It aims to minimize or control the probability or impact of
unfortunate events.
o Maximize Opportunities: Additionally, risk management seeks to maximize the
realization of opportunities.
2. Components:
o Risk Identification: Identifying and assessing risks related to financial, legal,
strategic, and security aspects.
o Risk Analysis: Evaluating the probability and potential outcomes of each risk.
o Risk Assessment: Comparing and ranking risks based on prominence and
consequence.
o Risk Mitigation: Planning and implementing methods to reduce threats.
o Risk Monitoring: Continuously monitoring and adapting risk management
processes.
3. Types of Risks:
o Operational Risk: Internal operational errors that disrupt products or services. o
Strategic Risk: Pressures due to growth, culture, or information management. o
Reputational Risk: Risks affecting an organization’s reputation.
o Financial Risk: Risks related to financial uncertainty or legal liabilities.
4. Importance:
o Business Continuity: Effective risk management ensures business continuity. o
Cost Reduction: It reduces costs associated with unforeseen events.
o Stakeholder Confidence: Organizations that embrace strategic risk management
gain stakeholder confidence and better business outcomes.
Ans.
The W5HH Principle, proposed by software engineer Barry Boehm, is a philosophy that helps
guide software project management. It involves asking a series of questions to define key project
characteristics and create an effective project plan. Let’s explore each part of the W5HH
principle:
In summary, the W5HH principle assists project managers in efficiently managing software
projects by addressing objectives, timelines, responsibilities, management styles, and
resources1234.
13. A project size of 2000 LOC is to be developed. Software development team has
average experience on similar type of projects. The project schedule is not very
tight.
Calculate the Effort, development time, average staff size, and productivity of the project.
Ans.
14. E-R Diagram Ans.
• Entities: These are objects or concepts that can have data stored about them. Entities are
represented by rectangles.
• Attributes: These are the properties or details of an entity, like a person’s name or a
car’s model. Attributes are represented by ellipses.
• Relationships: These show how entities are related to each other. Relationships are
represented by diamonds.
• Keys: These are special attributes that uniquely identify an entity within an entity set.
1. WATERFALL MODEL:-
2.Incremental MODEL:-
The Incremental Model is a software development process where requirements are broken
down into multiple standalone modules within the software development cycle. Let’s explore its
characteristics, use cases, advantages, and disadvantages:
Incremental Phases:
1. Requirement Analysis: In the initial phase, product analysis experts identify the
requirements. The functional requirements of the system are understood during this
crucial phase.
2. Design & Development: The system functionality design and development occur in this
phase. New functionality is added incrementally.
3. Testing: The testing phase checks the performance of existing and additional
functionality. Various methods are used to test each task.
4. Implementation: This phase involves coding and finalizing the functionality. The
product working is enhanced and upgraded incrementally.
The Evolutionary Process Model in software development life cycle (SDLC) is a dynamic
approach that combines elements of the Iterative and Incremental models. It focuses on the
gradual evolution of the software product through iterative cycles, allowing for continuous
feedback and adaptation. Here’s a detailed look at the model:
Overview:
• Initial Development: Starts with the creation of an initial version of the software.
• Iterations: The software goes through multiple iterations, each adding functionality and
incorporating feedback.
• Feedback Loop: Continuous feedback during development ensures the product meets
user needs.
Types of Evolutionary Process Models:
1. Iterative Model: Enhances the product over multiple iterations, refining it until the final
product meets user expectations.
2. Incremental Model: Begins with basic features, evolving the project in each iteration,
often used for large projects.
3. Spiral Model: Combines the waterfall and iterative models, focusing on risk
management and incremental delivery.
Key Features:
• Adaptability: Can adapt to changing requirements throughout the development process.
• Customer Involvement: Customers are involved at every stage, providing feedback that
shapes the product.
• Risk Management: Prioritizes risk assessment and mitigation in each iteration.
Application:
• Suitable for large projects where modules can be incrementally implemented.
• Ideal when core features are needed quickly, without waiting for the full software.
• Often used in object-oriented development due to the ease of partitioning the system into
objects.
Advantages:
• Flexibility: Supports changes in requirements and scope.
• Early Deliverables: Allows for early distribution of functional components or
prototypes.
• Risk Reduction: Continuous risk analysis and mitigation.
Necessary Conditions:
• Clear customer needs and deep explanation to the development team.
• Availability of time for market constraints.
• High risk with continuous targets and customer reporting.
The Evolutionary Process Model is particularly effective when dealing with new technologies
that require time to learn and when working on projects where requirements may change or are
not fully understood at the outset12.