SE Unit 4
SE Unit 4
Verification and Validation (V&V) are key activities in the software development process,
ensuring that the software being developed meets its requirements and satisfies customer
expectations.
1. Verification:
Verification answers the question: "Are we building the product right?"
It focuses on ensuring that the software conforms to its specified functional and
non-functional requirements. Verification involves systematic checks and reviews of
system representations at every stage of development, such as requirements
documents, design diagrams, and code. Techniques include inspections, formal
reviews, and static analysis.
2. Validation:
Validation answers the question: "Are we building the right product?"
It ensures that the software meets the customer’s expectations and is fit for its
intended use. Validation goes beyond checking conformity to the specification; it
ensures the software behaves as intended and delivers the expected functionality in
real-world scenarios. Validation often involves dynamic activities, such as testing the
software under operational conditions.
i) Validation Testing
● Validation testing ensures that the software meets its requirements and fulfills the
needs of the customer.
● It uses test cases that reflect how the system is expected to be used.
● This type of testing may involve statistical methods to evaluate the software's
performance and reliability under operational conditions.
● For custom software, validation testing includes at least one test for every
requirement in the user and system requirements documents. For generic software, it
covers all features to be released.
● Validation testing is also referred to as acceptance testing when customers formally
check the delivered system against its specification.
● Defect testing aims to find faults or defects where the software behaves incorrectly,
undesirably, or does not conform to its specification.
● The primary goal is to expose undesirable system behaviors, such as crashes, data
corruption, incorrect calculations, or improper interactions with other systems.
● Test cases in defect testing are specifically designed to uncover defects and often
include edge cases or unusual conditions not typical of normal usage.
● A test is considered successful if it identifies a defect causing incorrect system
behavior.
iii) Debugging
● Debugging is the process of locating and fixing defects discovered during testing.
● It is interleaved with the verification and validation (V&V) process.
● Debugging involves forming hypotheses about the cause of a defect, testing those
hypotheses, and using tools or manual tracing to pinpoint the fault.
● Interactive debugging tools may be used to examine program variables, step through
the code, or simulate scenarios to identify the issue.
● Debugging requires expertise in common programming errors and patterns, as well
as knowledge of the programming language and system.
● Software inspection is a static V&V technique that involves analyzing and reviewing
system artifacts such as requirements documents, design diagrams, and source
code, without executing the software.
● The main goal is to identify logical errors, coding anomalies, or violations of
standards.
● Inspections can be applied at any stage of the software development process,
beginning with the requirements phase.
● Inspections are often conducted by a team that includes a leader, the author of the
artifact, a reader, and a tester.
● Checklists and heuristics are used to systematically uncover errors.
v) Component Testing
3. Describe the different checks carried out during the inspection process.
During the inspection process, several checks are carried out to identify defects and ensure
the quality of the software. These checks are often based on checklists that focus on
common programmer errors and standards. The specific checks can vary depending on the
programming language and the type of software being developed. Here’s a breakdown of
the different types of checks:
● Data Faults:
○ Ensuring all program variables are initialised before their values are used.
○ Checking if all constants have been named.
○ Verifying the correct use of array bounds, specifically whether the upper
bound should be equal to the size of the array or Size -1.
○ Confirming that character strings have an explicitly assigned delimiter.
○ Checking for any possibility of buffer overflows.
● Control Faults:
○ Verifying that all function and method calls have the correct number of
parameters.
○ Checking that formal and actual parameter types match.
○ Ensuring the parameters are in the right order.
○ Verifying that components accessing shared memory have the same model of
the shared memory structure.
● Storage Management Faults:
○ Verifying that all possible error conditions have been taken into account.
The checks performed during inspection are specifically focused on identifying defects,
anomalies, and noncompliance with standards. They are not meant to address broader
design issues, which are addressed in other types of reviews. These checks are essential for
ensuring the quality of software and are a key part of a thorough verification and validation
process.
System testing involves integrating two or more components that implement system
functions or features and then testing this integrated system. In an iterative development
process, system testing is concerned with testing an increment to be delivered to the
customer. In a waterfall process, system testing is concerned with testing the entire system.
Definition
Key Concepts
1. Types of Integration:
○ Components are added incrementally, and tests are rerun after each
integration to detect unexpected interactions.
○ Makes it easier to localize and debug errors.
3. Regression Testing:
○ After adding new components, previously passed tests are rerun to ensure
that new integrations do not break existing functionality.
4. Test Automation:
○ Automated testing frameworks (e.g., JUnit) are often used to rerun tests
efficiently during regression testing.
Neat Diagram
Here is the diagram representing Incremental Integration Testing (as shown in your
uploaded file):
● Test Sequence 1: Components A and B are integrated and tested with T1, T2, and
T3.
● Test Sequence 2: Component C is added, previous tests (T1-T3) are rerun, and new
test T4 is performed.
● Test Sequence 3: Component D is integrated, all previous tests (T1-T4) are rerun,
and new test T5 is added.
Process Steps
○ Run new tests specific to the newly added component and its interactions.
● Perform Regression Testing:
○ Ensure that no new defects are introduced into the system by retesting all
previous configurations.
● Localize Errors:
○ Incremental testing makes it easier to identify the source of errors, as they are
likely related to the most recently added component.
● Repeat Until All Components Are Integrated:
1. Objective:
○To demonstrate that the system meets its functional, performance, and
dependability requirements.
○ To ensure the system does not fail under normal conditions.
2. Black-Box Testing Approach:
○Treats the system as a "black box," focusing on its behavior through inputs
and outputs.
○ Test cases are derived from system specifications, without considering
internal code or implementation.
3. Functional Testing:
○ Inputs that are likely to trigger system anomalies or failures (denoted as IeI_e)
are selected.
○ Outputs revealing defects (OeO_e) are monitored and analyzed.
Process:
1. Input Testing:
Testers provide inputs to the system based on the requirements and testing
guidelines.
2. Output Validation:
○ Test cases are designed to "break" the software by generating inputs with a
high probability of revealing defects (IeI_e).
Scenario-Based Testing:
This involves developing scenarios that mimic real-world use cases, deriving test cases from
them to validate that the system behaves as expected under various conditions.
Diagram Explanation
● Input Test Data: Includes both normal and boundary inputs. The subset IeI_e
represents inputs that may cause anomalous behavior.
● System: The software being tested. It processes inputs and generates outputs.
● Output Test Results: Includes both expected and erroneous outputs. The subset Oe
represents outputs that reveal defects.
Component Testing
Definition:
Component testing, also known as unit testing, involves testing individual components of a
system to identify and expose defects. The primary goal is to ensure that each component
operates as intended and meets its specifications. Component testing is typically carried out
by the developers of the components.
1. Parameter Interfaces:
○ Explicitly list all calls to external components and design tests for extreme
parameter values.
○ Test with null pointer parameters where pointers are passed.
○ Use procedural interface tests that simulate failure conditions.
○ Perform stress testing in message-passing systems to identify timing issues.
○ Test shared memory components by varying the activation order of interacting
components.
2. For Object Classes:
○ Ensure comprehensive coverage of operations, attributes, and state changes.
○ Identify equivalence classes for initializing, accessing, and updating object
attributes.
● Strongly Typed Languages (e.g., Java): Errors are detected at compile time,
reducing testing effort.
● Weaker Languages (e.g., C): Tools like LINT or static analyzers can detect interface
errors.
● Program Inspections: Focus on component interfaces to verify assumptions about
interface behavior.
Partition Testing
Definition:
Partition testing is a test case design technique where the input and output domains of a
system are divided into groups (or partitions) that share common characteristics. Tests are
then designed to include inputs from all these partitions, ensuring that the program executes
and processes each group correctly.
Characteristics of Partitions
Key concept: The program is expected to behave equivalently for all data points within a
partition.
Types of Partitions
1. Input Equivalence Partitions:
Groups of input data that should be processed similarly.
2. Output Equivalence Partitions:
Groups of program outputs with common characteristics.
3. Invalid Input Partitions:
Data outside valid partitions to test the system's error handling.
● Choose test cases at the boundaries of partitions and around the mid-point of
the partition.
● Boundary values often cause errors and are thus critical to test.
● Test cases close to the mid-point represent typical scenarios developers anticipate.
Example:
Scenario:
Partitions:
Test Cases:
Specification:
A search component searches a sequence for a given key and sets a variable Found to
true if the key exists in the sequence.
Partitions:
Test Cases:
1. Initial:
2. Repeatable:
3. Defined:
4. Managed:
5. Optimizing:
1. Initial:
● Initial Level:
The company has no formal processes. Staff selection and compensation practices
are inconsistent, and employee satisfaction depends on individual managers.
● Repeatable Level:
The company implements policies for training, career development, and workforce
planning. For instance, employees are offered defined training modules to enhance
their technical skills.
● Defined Level:
Best practices like mentoring programs and team-building exercises are
standardized across the organization. For example, all new hires are assigned
mentors, and regular team-building workshops are conducted.
● Managed Level:
Quantitative performance metrics are introduced. The company tracks employee
productivity and skill growth using KPIs (Key Performance Indicators).
● Optimizing Level:
Continuous improvement methods are adopted. The company conducts regular
feedback sessions, aligns individual goals with organizational needs, and updates
training programs based on emerging industry trends.
Conclusion
The People Capability Maturity Model provides a flexible framework for organizations to
systematically enhance their workforce capabilities. By progressing through the P-CMM
levels, organizations can motivate employees, improve skill sets, retain experienced staff,
and ultimately achieve greater productivity and effectiveness.
1. Formal Specification:
Teams Involved
1. Specification Team:
1. Formal Specification:
The specification team creates a precise, mathematical specification that defines the
system. This acts as the blueprint for all subsequent work.
2. Incremental Development:
○ After integration, the certification team tests the software statistically, using
test cases developed from an operational profile.
○This testing determines the software’s reliability and identifies any remaining
defects.
5. Feedback Loop:
● High Quality:
Programs produced with the Cleanroom process exhibit significantly fewer defects,
typically around 2.3 defects per 1,000 lines of code.
● Efficient Development:
Less effort is required for testing and debugging due to rigorous inspections and
static verification.
● Incremental Delivery:
Customers can provide feedback on critical functionalities early in the process.
1. The Specification Team defines formal state models for the system, such as
calculating employee wages, deductions, and bonuses.
2. The Development Team uses structured programming to build increments for critical
functionalities like wage calculation, followed by less critical tasks such as generating
reports.
3. The Certification Team creates statistical tests to validate that the system reliably
calculates wages under different operational scenarios.
By following the Cleanroom process, the payroll system is delivered with minimal defects,
and critical features are thoroughly validated before the complete system is finalized.
The verification and validation (V&V) planning process for software development revolves
around systematically ensuring that the system meets its functional and non-functional
requirements. The process emphasizes careful planning and execution to maximize the
value of inspections and testing while controlling costs. A widely used approach for V&V
planning is the V-model, which is a variation of the waterfall model that explicitly aligns
development stages with their corresponding testing stages.
2. V-Model Structure
○The V-model aligns development phases on the left side of the "V" with
corresponding testing phases on the right side.
○ For example:
■ Requirements specification maps to acceptance testing.
■ System design maps to system testing.
■ Detailed design maps to integration testing.
■ Implementation maps to unit testing.
3. Dynamic and Static Verification Techniques
○ Test plans are dynamic and evolve during development to adapt to delays,
incomplete system components, and changes in project priorities.
○ Testers may be redeployed to other activities during delays and reassigned
once components are ready for testing.
7. Integration with Agile Processes
Key Takeaways
The V&V planning process emphasizes alignment between development and testing stages,
effective resource management, and adaptability to changes. By systematically tracing
requirements, defining clear procedures, and maintaining flexibility, the process ensures the
development of a high-quality, reliable system.
The inspection process involves multiple roles, each with specific responsibilities to ensure
the effective identification and correction of errors in programs or documents. Below is a list
and explanation of the roles in the inspection process based on the image provided:
1. Author or Owner
Each role is essential for ensuring the success of the inspection process, contributing to the
identification and resolution of issues while fostering a systematic approach to quality
assurance.
11. Explain the major components of a test plan for a large and complex
system.
A test plan for a large and complex system includes several major components that ensure
the testing process is systematic, thorough, and well-organized. These components are as
follows:
1. The Testing Process: This section outlines the main phases of the testing process,
such as:
3. Tested Items: Specifies which products of the software development process will be
tested. These can include program units, subsystems, or the entire system. This
section helps clarify what components are subject to testing.
4. Testing Schedule: A timeline for the testing activities, detailing the test phases,
resource allocation, and linking the testing process with the overall project
development schedule. The schedule should include buffers to account for potential
delays.
5. Test Recording Procedures: Describes the methods and tools for recording test
results in an organized and systematic way. This is important for tracking progress
and ensuring that the testing process can be audited for compliance and
thoroughness.
6. Hardware and Software Requirements: Lists the necessary tools, hardware, and
software resources required to carry out the testing. This helps ensure that the
appropriate environment is available for testing.
Additionally, a test plan may outline testing standards to be followed and ensure that testing
efforts are balanced with other validation techniques. In agile processes, testing may be
integrated directly into the development process, ensuring continuous validation and
feedback.
In summary, the major components of a test plan are designed to ensure comprehensive,
organized, and efficient testing. They cover all aspects, from the testing phases and
schedule to traceability and resource requirements, making sure that the system is
thoroughly validated and meets its intended requirements.
● Definition:
○ Inspection can occur at any stage, starting from the requirements phase.
○ Testing can only occur once there is an executable version or prototype of
the software.
● Advantages:
○ Inspection can uncover many errors quickly in a single session and avoids
errors masking each other, as may happen in testing.
○ Testing is crucial for V&V and can evaluate emergent properties of the
system, like performance and reliability.
● Limitations:
● Integration Testing:
○ Purpose: Ensures the system meets its requirements and is ready for use by
customers, verifying that it is dependable.
○ Focus: Ensures the software works according to customer requirements.
○ Access: The test team usually does not have access to the source code and
treats the system as a black box.
○ Nature: It tests the system before it is released, based on its specifications.
○ Testing Approach: Focuses on functional testing, often including acceptance
testing to ensure it aligns with customer expectations.
● Overlap:
A manager can encourage group cohesiveness through several key strategies that foster
unity and shared purpose among team members:
○Managers can help the team view themselves as a unified group by naming
the team, organizing social events, and involving members in activities that
build team spirit, such as sports or games.
2. Promoting Open Communication:
○ By promoting the idea that designs and programs are shared group assets,
managers encourage collaboration, feedback, and constant improvement.
This is particularly important in environments like extreme programming.
5. Balancing Individual and Group Needs:
○Managers should ensure that personal goals align with the team and
organization’s objectives, fostering mutual support and learning among team
members.
6. Managing Conflict:
By actively using these strategies, a manager can build a cohesive team that values
collaboration, supports individual growth, and works towards collective success.
1. Physiological Needs: These are the basic, fundamental needs for survival, such as
food, water, sleep, and warmth. In a workplace context, these needs translate to
providing a comfortable and safe working environment.
2. Safety Needs: Once physiological needs are met, the next priority is safety. This
includes the need for security, stability, and protection from harm, which can relate to
job security, health benefits, and a safe work environment.
3. Social Needs: After safety needs are fulfilled, people seek belongingness and social
connection. This involves the need for friendships, social interaction, and a sense of
community. In the workplace, managers can satisfy these needs by fostering
teamwork, collaboration, and providing opportunities for social interaction.
4. Esteem Needs: These needs pertain to the desire for respect, recognition, and a
sense of accomplishment. People want to feel valued and appreciated for their
contributions. Managers can fulfill these needs by acknowledging employees'
achievements, offering recognition, and ensuring fair compensation.
5. Self-Realization Needs: At the top of the hierarchy is the need for self-actualization,
or the desire to realize one's full potential and personal growth. This can involve
seeking challenging tasks, pursuing creativity, and continuous self-improvement.
Managers can help meet these needs by providing opportunities for professional
development, offering stimulating work, and encouraging personal growth.