CH 3
CH 3
Quality Assurance
8
Unit Test Design
Create test cases with:
Input data
Expected outputs
Test procedures
Organize test cases in a tabular or network format,
including:
Object ID
Test Case ID
Purpose
Test Case Steps
9
Test Harness
A test harness is a framework used to test software
components.
It includes drivers that call the component and stubs that
simulate modules it interacts with.
10
Running the unit tests and recording results
Unit tests can begin when:
Units are available from developers.
Test cases are designed and reviewed.
Test harness and supporting tools are ready.
Other potential causes for test failures:
Incorrect test case specification.
Execution errors.
Environment faults.
Unit design flaws
11
Continued…
The test summary report should document the causes
of any test failures.
12
Integration Testing
Integration testing is a software testing method that combines
individual units and tests them as a group to verify their
interactions and interfaces.
It ensures that different parts of the system work together
seamlessly.
ANALOGY
During the process of manufacturing a ballpoint pen, the cap, the
body, the tail and clip, the ink cartridge and the ballpoint are
produced separately and unit tested separately. When two or more
units are ready, they are assembled and Integration Testing is
performed. For example, whether the cap fits into the body or not.
METHOD
Any of Black Box, White Box, grey Box Testing methods can be
used.
The integration testing strategy determines the order in which
subsystems are tested and integrated
13
Integration Testing Strategy
Top Down is an approach to
Integration Testing where top
level units are tested first and
lower level units are tested step
by step after that. This approach
is taken when top down
development approach is
followed
Bottom Up is an approach to
Integration Testing where
bottom level units are tested
first and upper level units step
by step after that. This approach
is taken when bottom up
development approach is
followed.
Figure 5.6. integration testing
14
Continued...
Big Bang is an approach to
Integration Testing where all or
most of the units are combined
together and tested at one go. This
approach is taken when the testing
team receives the entire software in
a bundle.
Sandwich/Hybrid is an approach to
Integration Testing which is a
combination of Top Down and
Bottom Up approaches.
Figure 5.8. integration testing
15
Continued...
Integration test plan includes:
Dependencies: Clusters this cluster relies on.
Functionality: A description of what the cluster does.
Classes: A list of classes within the cluster.
Test Cases: A set of tests for the cluster.
The integration testing strategy depends on various
factors, including:
Project complexity
Module dependencies
Team structure and skills
Time constraints
16
System Testing
It involves testing the entire system to ensure it meets all
requirements.
It involves creating a detailed test plan, designing test
cases, and executing them to identify and fix defects.
This process is crucial for verifying both functional
behaviour and non-functional attributes like
performance, security, and usability.
Resource-intensive to verify both functional behaviour
and quality attributes.
Crucial for detecting external interface defects and
complex issues.
Performed by a dedicated team.
Followed by user acceptance testing (alpha/beta).
17
Continued…
18
Functional Testing
Goal: Test functionality of system
Functional tests: Verify system behaviour against
requirements.
Example: Personal finance system tests account setup,
entry management, and reporting.
Client expectation: Functional tests are essential for
acceptance.
Black box testing: Focus on external behaviour.
Test cases: Based on requirements and key functions
(use cases).
Test case reuse: Unit test cases can be reused, but new
ones are needed.
19
Performance Testing
Performance testing aims to evaluate a system's response to
various workloads and conditions. It involves:
Stress testing: Simulating heavy loads to assess the system's
behaviour under stress.
Volume testing: Testing the system's performance with large
volumes of data.
Endurance testing: Assessing the system's ability to handle
sustained workloads over time.
Goals:
Identify performance bottlenecks.
Optimize resource allocation.
Predict future performance.
Ensure the system meets non-functional requirements.
20
Stress Testing
Stress testing subjects a system to a load that exceeds
its expected capacity.
Purpose: Identifies the system's breaking point and
assesses behaviour under extreme conditions.
Example: An operating system designed for 10
interrupts/second might be tested with 20
interrupts/second.
Goal: Push the system to its limits to identify
bottlenecks, degradation, and failures.
Importance: Ensures reliability under peak
workloads, boosting user confidence.
21
Configuration Testing
22
Security Testing
Protect software systems from vulnerabilities
Ensure the safety of user data
Meet increasing reliance on internet-based applications
Safeguard user data (confidentiality, integrity,
availability)
The Role of Security Testing is to evaluate a system's
ability to withstand threats.
Users and clients must communicate security
requirements clearly to developers and testers.
Effective communication ensures proper implementation.
Incorporate security measures early in the development
process.
23
Other types of Performance Testing
Volume testing
Test what happens if large amounts of data are handled
Compatibility test
Test backward compatibility with existing systems
Timing testing
Evaluate response times and time to perform a function
Environmental test
Test tolerances for heat, humidity, motion
Quality testing
Test reliability, maintain- ability & availability
Recovery testing
Test system’s response to presence of errors or loss of data
Human factors testing
Test with end users.
24
Acceptance Testing
Goal: Demonstrate system is ready for operational use
Test selection: Client chooses tests, often based on
integration testing.
Client performs testing: Using requirements and user
manual.
Test reusability: System test cases may be applicable, but
real-world evaluation is needed.
Post-acceptance feedback: Client identifies
fulfilled/unfulfilled requirements.
Client approval: If satisfied, approves installation.
Installation and retesting: Developers set up the system,
retest if needed.
25
Alpha and Beta test
Alpha test: Beta test:
Alpha testing is conducted Pre-release stage where
by the client in the software is deployed in a real-
developer's environment.
world environment.
Developers can directly
observe and address No developer presence.
problems. Assesses performance under
Key areas tested include actual usage conditions.
usability, functionality, Users provide feedback on:
content accuracy
Typographical errors
It aims to identify and fix
Confusing application flow
issues like typos, broken
links, and unclear Crashes or unexpected
instructions before release. behavior
26
Information needed at different Levels of
Testing
29
Regression Testing Levels
Unit Level: Test individual units of code after changes.
Re-integration: Test interactions between changed units
and the rest of the system.
Function Level: Test specific functionalities after changes.
System Level: Test the entire system after changes.
Requirements:
Change information: Details of modifications.
Updated documentation: Updated requirements, design,
and user manuals.
Testing process: Plan, design, execution, and evaluation.
Testing methods: Techniques used (e.g., test cases,
automation).
Criteria: Pass/fail conditions for test cases.
30
Continued…
Software Change
Analysis
Software Change
Impact Analysis
Define Regression
Testing Strategy
Build Regression
Test Suite
Run Regression
Tests at different levels
Report Retest
Results
Thank you!
Questions?