Software Engineering
Software Engineering
Unit -2
Requirement analysis
(Security,storage, configuration,
Performance ,cost ,interoperability ,
Software requirements:- flexibility , disaster , recovery, accessibility.
It is the description of features and
functionalitites of the target system.
SRS(software requirements specification):-
It is the description of what the system should
do. SRS is a description of a software system to be
developed.
Requirements engineering refers to the process of
defining, documenting and maintaining requirements in It lays out functional and not functional requirements
the engineering design process. of the software to be developed.
It is a four step process ,which includes- It may include a set of use cases that describe user
interactions that the software must provide to the user
1. Feasibility Study for perfect interaction.
2. Requirement gathering/elicitation
3. Software requirement specification
4. Software requirement validation
SRS STRUCTURE:-
1. Introduction
Tools support for requirement engineering:- Purpose
Intended audience
Observation reports(user observation)
Scope
Questionaries
Definations
Use cases
References.
User stories
2. Overall Description
Requirement workshops
User interfaces
Mind mapping
System Interfaces
Role-playing
Constraints,Assumptions and dependencies
Prototyping
User charcateristics
3. System features and requirements
Functional Requirements
Functional vs Non-functional requirements:- Use cases
Requiremnets which are related to External interface requirements
functional/working aspect of software fall into Logical database requirement
this category Non-functional requirements
Non-functional requirements are expected 4. Deliver for approval
charcateristics of target software.
User requirememts:-
Easy and simple to operate
Quick response
Effectivey handling operational errors
Customer support
Unit -4
Risk management
Identifying risk is one of most important or There are many different types of risks which
essential and initial steps in risk affects the software project:
management process. By chance, if failure 1. Technology risks
occurs in identifying any specific or 2. Tools risks
particular risk, then all other steps that 3. Estimation risks
are involved in risk management will not be 4. People risks
implemented for that particular risk. For 5. Requirement risks
identifying risk, project team should review 6. Organizational risks
scope of program, estimate cost, schedule,
technical maturity, parameters of key Methods for Identifying Risks : Earlier,
performance, etc. To manage risk, project there were no easy methods available that
team or organization are needed to know about will surely identify all risks. But nowadays,
what risks it faces, and then to evaluate there are some additional approaches
them. Generally, identification of risk is an available for identifying risks. Some of
iterative process. It basically includes approaches for risk identification are given
generating or creating comprehensive list of below:
threats and opportunities that are based on 1. Checklist Analysis – Checklist Analysis is
events that can enhance, prevent, degrade, type of technique generally used to identify
accelerate, or might delay successful or find risks and manage it. The checklist is
achievement of objectives. In simple words, basically developed by listing items, steps,
if you don’t find or identify risk, you won’t or even tasks and is then further analyzed
be able to manage it. against criteria to just identify and
The organizer of project needs to expect some determine if procedure is completed correctly
of the risk in the project as early as or not. It is list of risk that is just found
possible so that the performance of risk may to occur regularly in development of software
project. Below is the list of software
development risk by Barry Boehm- modified and unique technique to gather risks
version. spontaneously by team members. The team
members identify and determine risks in ‘no
Risk Risk Reduction Technique
wrong answer’ environment. This technique
also provides opportunity for team members to
Various techniques include always develop on each other’s ideas. This
training and career technique is also used to determine best
Personnel development, job-matching, possible solution to problems and issue that
Shortfalls teambuilding, etc. arises and emerge.
3. Casual Mapping – Causal mapping is method
that builds or develops on reflection and
Various techniques include review of failure factors in cause and effect
incremental development, of the diagrams. It is very useful for
Unrealistic standardization of methods, facilitating learning with an organization or
time and cost recording, and analysis of system simply as method of project-post
estimates the past project, etc. evaluation. It is also key tool for risk
assessment.
4. SWOT Analysis – Strengths-Weaknesses-
Development of Various techniques include Opportunities-Threat (SWOT) is very technique
wrong software formal specification and helpful for identifying risks within
functions methods, user surveys, etc. greater organization context. It is generally
used as planning tool for analyzing business,
its resources, and also its environment
Development of Various techniques include
simply by looking at internal strengths and
the wrong user user involvement,
weaknesses and opportunities and threats in
interface prototyping, etc. external environment. It is technique often
used in formulation of strategy. The
2. Brainstorming – This technique provides appropriate time and effort should be spent
and gives free and open approach that usually on thinking seriously about weaknesses and
encourages each and everyone on project team threats of organization for SWOT analysis to
to participate. It also results in greater more effective and successful in risk
sense of ownership of project risk, and team identification.
generally committed to managing risk for 5. Flowchart Method – This method allows for
given time period of project. It is creative dynamic process to be diagrammatically
represented in paper. This method is Failure in function identification and
generally used to represent activities of its’ completion
process graphically and sequentially to 2. Budget Risk: Budget related risks refers
simply identify the risk. to the monetary risks mainly it occurs due
to budget overruns. Always the financial
aspect for the project should be managed
as per decided but if financial aspect of
Various Kinds of Risks in Software Development project mismanaged then there budget
The following are the types of risk concerns will arise by giving rise to
in software development : budget risks. So proper finance
distribution and management are required
Various kinds of risks in software development for the success of project otherwise it
may lead to project failure. Some reasons
1. Schedule Risk : Schedule related risks for Budget risks –
refers to time related risks or project Wrong/Improper budget estimation
delivery related planning risks. The wrong Unexpected Project Scope expansion
schedule affects the project development Mismanagement in budget handling
and delivery. These risks are mainly Cost overruns
indicates to running behind time as a Improper tracking of Budget
result project development doesn’t 3. Operational Risks : Operational risk
progress timely and it directly impacts to refers to the procedural risks means these
delivery of project. Finally if schedule are the risks which happen in day-to-day
risks are not managed properly it gives operational activities during project
rise to project failure and at last it development due to improper process
affect to organization/company economy implementation or some external
very badly. Some reasons for Schedule operational risks. Some reasons for
risks – Operational risks –
Time is not estimated perfectly Insufficient resources
Improper resource allocation Conflict between tasks and employees
Tracking of resources like system, Improper management of tasks
skill, staff etc No proper planning about project
Frequent project scope expansion Less number of skilled people
Lack of communication and cooperation
Lack of clarity in roles and 2. Security Risks: Vulnerabilities that might
responsibilities compromise the privacy, reliability or
Insufficient training accessibility of the set are known as
4. Technical Risks : Technical risks refers security risks and they have become common
to the functional risk or performance risk in a time.
which means this technical risk mainly 3. Quality Risks: The risk associated with
associated with functionality of product quality is the potential for a product to
or performance part of the software be delivered that does not meet end user
product. Some reasons for Technical risks satisfaction or required criteria.
– 4. Risks associated with Law and
Frequent changes in requirement Compliance: Rules and laws are often
Less use of future technologies overlooked when it comes to project
Less number of skilled employee development. Ignoring them may result in
High complexity in implementation penalties, legal issues or just a lot of
Improper integration of modules difficulties.
5. Programmatic Risks : Programmatic risks 5. Cost Risks: Unexpected costs, changes in
refers to the external risk or other the project scope or excess funds may
unavoidable risks. These are the external completely halt your financial plan.
risks which are unavoidable in nature. 6. Market Risks: The effectiveness of your
These risks come from outside and it is programme in the market may be compromised
out of control of programs. Some reasons by evolving technology trends, new
for Programmatic risks – competitors or shifting the customer
Rapid development of market wants.
Running out of fund / Limited fund for
project development
Changes in Government rules/policy
Loss of contracts due to any reason Risk Mitigation, Monitoring,
More risks associated with software
development and Management (RMMM) plan
1. Communication Risks: Misunderstandings, Last Updated : 22 Mar, 2021
mistakes and a general sense of confusion
can result from inadequate or absent
communication.
RMMM Plan : 1. To check if predicted risks occur or not.
A risk management technique is usually seen 2. To ensure proper application of risk
in the software Project plan. This can be aversion steps defined for risk.
divided into Risk Mitigation, Monitoring, and 3. To collect data for future risk analysis.
Management Plan (RMMM). In this plan, all 4. To allocate what problems are caused by
works are done as part of risk analysis. As which risks throughout the project.
part of the overall project plan project Risk Management and planning :
manager generally uses this RMMM plan. It assumes that the mitigation activity
In some software teams, risk is documented failed and the risk is a reality. This task
with the help of a Risk Information Sheet is done by Project manager when risk becomes
(RIS). This RIS is controlled by using a reality and causes severe problems. If the
database system for easier management of project manager effectively uses project
information i.e creation, priority ordering, mitigation to remove risks successfully then
searching, and other analysis. After it is easier to manage the risks. This shows
documentation of RMMM and start of a project, that the response that will be taken for each
risk mitigation and monitoring steps will risk by a manager. The main objective of the
start. risk management plan is the risk register.
This risk register describes and focuses on
Risk Mitigation :
the predicted threats to a software project.
It is an activity used to avoid problems
(Risk Avoidance).
Steps for mitigating the risks as follows.
1. Finding out the risk.
2. Removing causes that are the reason for
risk creation.
3. Controlling the corresponding documents
from time to time.
4. Conducting timely reviews to speed up the
work.
Risk Monitoring :
It is an activity used for project tracking.
It has the following primary objectives as
follows.
1. Portability: A software is claimed to be
transportable, if it may be simply created
to figure in several package environments,
in several machines, with alternative code
Unit -5 merchandise, etc.
2. Usability: A software has smart usability
Quality management
if completely different classes of users
(i.e. knowledgeable and novice users) will
What is Software Quality? simply invoke the functions of the
Software Quality shows how good and reliable merchandise.
a product is. To convey an associate degree 3. Reusability: A software has smart
example, think about functionally correct reusability if completely different
software. It performs all functions as laid modules of the merchandise will simply be
out in the SRS document. But, it has an reused to develop new merchandise.
associate degree virtually unusable program. 4. Correctness: Software is correct if
even though it should be functionally completely different needs as laid out in
correct, we tend not to think about it to be the SRS document are properly enforced.
a high-quality product. 5. Maintainability: A software is reparable,
Another example is also that of a product if errors may be simply corrected as and
that will have everything that the users once they show up, new functions may be
need but has an associate degree virtually simply added to the merchandise, and
incomprehensible and not maintainable code. therefore the functionalities of the
Therefore, the normal construct of quality merchandise may be simply changed, etc
as “fitness of purpose” for code merchandise 6. Reliability: Software is more reliable if
isn’t satisfactory. it has fewer failures. Since software
engineers do not deliberately plan for
their software to fail, reliability
depends on the number and type of mistakes
Factors of Software Quality they make. Designers can improve
The modern read of high-quality associates reliability by ensuring the software is
with software many quality factors like the easy to implement and change, by testing
following: it thoroughly, and also by ensuring that
if failures occur, the system can handle
them or can recover easily.
7. Efficiency. The more efficient software Umbrella activity that is applied throughout
is, the less it uses of CPU-time, memory, the software process.
disk space, network bandwidth, and other
resources. This is important to customers
in order to reduce their costs of running
the software, although with today’s Software Quality Assurance (SQA) encompasse s
powerful computers, CPU time, memory and SQA process Specific quality assurance and
disk usage are less of a concern than in quality control tasks (including technical
years gone by. reviews and a multitiered testing strategy)
Effective software engineering practice
(methods and tools) Control of all software
work products and the changes made to them a
procedure to ensure compliance with software
development standards (when applicable)
Software Quality Assurance – measurement and reporting mechanisms
Software Engineering
Last Updated : 02 Aug, 2024
Elements of Software Quality Assurance (SQA)
1. Standards: The IEEE, ISO, and other
standards organizations have produced a
broad array of software engineering
Software Quality Assurance (SQA) is simply a standards and related documents. The job
way to assure quality in the software. It is of SQA is to ensure that standards that
the set of activities that ensure processes, have been adopted are followed and that
procedures as well as standards are suitable all work products conform to them.
for the project and implemented correctly. 2. Reviews and audits: Technical reviews are
Software Quality Assurance is a process that a quality control activity performed by
works parallel to Software Development. It software engineers for software engineers.
focuses on improving the process of Their intent is to uncover errors. Audits
development of software so that problems can are a type of review performed by SQA
be prevented before they become major issues. personnel (people employed in an
Software Quality Assurance is a kind of organization) with the intent of ensuring
that quality guidelines are being followed 9. Risk management : The SQA organization
for software engineering work. ensures that risk management activities
3. Testing: Software testing is a quality are properly conducted and that risk-
control function that has one primary goal related contingency plans have been
—to find errors. The job of SQA is to established.
ensure that testing is properly planned
and efficiently conducted for primary goal
of software.
4. Error/defect collection and analysis : SQA Software Quality Assurance (SQA) Include
collects and analyzes error and defect 1. A quality management approach.
data to better understand how errors are 2. Formal technical reviews.
introduced and what software engineering 3. Multi testing strategy.
activities are best suited to eliminating 4. Effective software engineering technology.
them. 5. Measurement and reporting mechanism.
5. Change management: SQA ensures that
adequate change management practices have
been instituted.
6. Education: Every software organization Major Software Quality Assurance (SQA)
wants to improve its software engineering Activities
practices. A key contributor to 1. SQA Management Plan: Make a plan for how
improvement is education of software you will carry out the SQA throughout the
engineers, their managers, and other project. Think about which set of software
stakeholders. The SQA organization takes engineering activities are the best for
the lead in software process improvement project. check level of SQA team skills.
which is key proponent and sponsor of 2. Set The Check Points: SQA team should set
educational programs. checkpoints. Evaluate the performance of
7. Security management: SQA ensures that the project on the basis of collected data
appropriate process and technology are on different check points.
used to achieve software security. 3. Measure Change Impact: The changes for
8. Safety: SQA may be responsible for making the correction of an error
assessing the impact of software failure sometimes re introduces more errors keep
and for initiating those steps required to the measure of impact of change on
reduce risk. project. Reset the new change to check the
compatibility of this fix with whole Benefits of Software Quality Assurance (SQA)
project. 1. SQA produces high quality software.
4. Multi testing Strategy: Do not depend on a 2. High quality application saves time and
single testing approach. When you have a cost.
lot of testing approaches available use 3. SQA is beneficial for better reliability.
them. 4. SQA is beneficial in the condition of no
5. Manage Good Relations: In the working maintenance for a long time.
environment managing good relations with 5. High quality commercial software increase
other teams involved in the project market share of company.
development is mandatory. Bad relation of 6. Improving the process of creating
SQA team with programmers team will impact software.
directly and badly on project. Don’t play 7. Improves the quality of the software.
politics. 8. It cuts maintenance costs. Get the release
6. Maintaining records and right the first time, and your company can
reports: Comprehensively document and forget about it and move on to the next
share all QA records, including test big thing. Release a product with chronic
cases, defects, changes, and cycles, for issues, and your business bogs down in a
stakeholder awareness and future costly, time-consuming, never-ending cycle
reference. of repairs.
7. Reviews software engineering
activities: The SQA group identifies and
documents the processes. The group also Disadvantage of Software Quality Assurance
verifies the correctness of software (SQA)
product. There are a number of disadvantages of
8. Formalize deviation handling: Track and quality assurance.
document software deviations meticulously. Cost: Some of them include adding more
Follow established procedures for handling resources, which cause the more budget its
variances. not, Addition of more resources For
betterment of the product.
Time Consuming: Testing and Deployment of
the project taking more time which cause
delay in the project.
Overhead : SQA processes can introduce
administrative overhead, requiring
documentation, reporting, and tracking of
quality metrics. This additional
administrative burden can sometimes Software Review – Software
outweigh the benefits, especially for
smaller projects.
Engineering
Resource Intensive : SQA requires skilled Last Updated : 29 Jan, 2024
personnel with expertise in testing
methodologies, tools, and quality
assurance practices. Acquiring and
retaining such talent can be challenging
and expensive. Software Review is a systematic inspection of
Resistance to Change : Some team members software by one or more individuals who work
may resist the implementation of SQA together to find and resolve errors and
processes, viewing them as bureaucratic or defects in the software during the early
unnecessary. This resistance can hinder stages of the Software Development Life Cycle
the adoption and effectiveness of quality (SDLC). A software review is an essential
assurance practices within an part of the Software Development Life Cycle
organization. (SDLC) that helps software engineers in
Not Foolproof : Despite thorough testing validating the quality, functionality, and
and quality assurance efforts, software other vital features and components of the
can still contain defects or software. It is a whole process that includes
vulnerabilities. SQA cannot guarantee the testing the software product and it makes
elimination of all bugs or issues in sure that it meets the requirements stated by
software products. the client.
Complexity : SQA processes can be complex, Usually performed manually, software review
especially in large-scale projects with is used to verify various documents like
multiple stakeholders, dependencies, and requirements, system designs, codes, test
integration points. Managing the plans, and test cases.
complexity of quality assurance activities Objectives of Software Review
requires careful planning and The objective of the software review is:
coordination. 1. To improve the productivity of the
development team.
2. To make the testing process time and cost-
effective.
3. To make the final software with fewer team preparation, you can determine the
defects. software’s availability.
4. To eliminate the inadequacies. 2. Management Preparation: To get ready for
Process of Software Review the review process, assign roles, gather
resources and provide brief management.
3. Review Planning: Establish the review’s
goals and scope, invite relevant
parties and set a time for the meeting.
4. Preparation: Distribute appropriate
resources, give reviewers time to get
familiar and promote issue identification
to help them prepare.
5. Examination and Exit Evaluation: Reviewers
should collaborate to examine the results,
record concerns, and encourage candid
communication in meetings. It assess the
results, make remedial plans based on flaws
that have been reported and assess the
process’s overall efficacy.
Types of Software Reviews
There are mainly 3 types of software
reviews:
1. Software Peer Review
Peer review is the process of assessing the
technical content and quality of the product
and it is usually conducted by the author of
the work product along with some other
developers.
Peer review is performed in order to examine
Software Review process
or resolve the defects in the software, whose
quality is also checked by other members of
1. Entry Evaluation: By confirming the team.
documentation, fulfilling entry Peer Review has following types:
requirements and assessing stakeholder and
1. Code Review: Computer source code is 2. Earlier inspection also reduces the
examined in a systematic way. maintenance cost of software.
2. Pair Programming: It is a code review where 3. It can be used to train technical authors.
two developers develop code together at the 4. It can be used to remove process
same platform. inadequacies that encourage defects.
3. Walkthrough: Members of the development
team is guided by author and other
interested parties and the participants ask
questions and make comments about defects.
4. Technical Review: A team of highly
qualified individuals examines the software
product for its client’s use and identifies
technical defects from specifications and
standards.
5. Inspection: In inspection the reviewers
follow a well-defined process to find
defects.
2. Software Management Review
Software Management Review evaluates the work
status. In this section decisions regarding
downstream activities are taken.
3. Software Audit Review
Software Audit Review is a type of external
review in which one or more critics, who are
not a part of the development team, organize
an independent inspection of the software
product and its processes to assess their
compliance with stated specifications and
standards. This is done by managerial level
people.
Advantages of Software Review
1. Defects can be identified earlier stage of
development (especially in formal review).
Objectives of Software Design
Unit-6 1. Correctness: A good design should be
correct i.e., it should correctly
Design engineering
implement all the functionalities of the
system.
2. Efficiency: A good software design should
Introduction of Software address the resources, time, and cost
optimization issues.
Design Process – 3. Flexibility: A good software design should
Last Updated : 25 Feb, 2024 have the ability to adapt and accommodate
changes easily. It includes designing the
software in a way, that allows for
modifications, enhancements, and
scalability without requiring significant
Software Design is the process of rework or causing major disruptions to the
transforming user requirements into a existing functionality.
suitable form, which helps the programmer in 4. Understandability: A good design should be
software coding and implementation. During easily understandable, it should be
the software design phase, the design modular, and all the modules are arranged
document is produced, based on the customer in layers.
requirements as documented in the SRS 5. Completeness: The design should have all
document. Hence, this phase aims to the components like data structures,
transform the SRS document into a design modules, external interfaces, etc.
document. 6. Maintainability: A good software design
The following items are designed and aims to create a system that is easy to
documented during the design phase: understand, modify, and maintain over
1. Different modules are required. time. This involves using modular and
2. Control relationships among modules. well-structured design principles e.g.,
3. Interface among different modules. (employing appropriate naming conventions
4. Data structure among the different and providing clear documentation).
modules. Maintainability in Software and design
5. Algorithms are required to be implemented also enables developers to fix bugs,
among the individual modules. enhance features, and adapt the software
to changing requirements without excessive
effort or introducing new issues.
Software Design Concepts
Concepts are defined as a principal idea or
invention that comes into our mind or in
thought to understand something.
The software design concept simply means the
idea or principle behind the design. It
describes how you plan to solve the problem
of designing software, and the logic, or
thinking behind how you will design
software. It allows the software engineer to
create the model of the system software or
product that is to be developed or built.
The software design concept provides a
supporting and essential structure or model
for developing the right software. There are
many concepts of software design and some of Software Design Concepts
Validation
Validation is the process of checking whether
the software product is up to the mark or in
other words product has high-level System testing is a type of software testing
requirements. It is the process of checking that evaluates the overall functionality and
the validation of the product i.e. it checks performance of a complete and fully
what we are developing is the right product. integrated software solution. It tests if
it is a validation of actual and expected the system meets the specified requirements
products. Validation is simply known and if it is suitable for delivery to the
as Dynamic Testing. end-users. This type of testing is performed
after the integration testing and before the requirements specification (SRS) . System
acceptance testing. Testing is performed by a testing team
Table of Content that is independent of the development
team and helps to test the quality of the
What is System Testing?
system impartial.
System Testing Process
It has both functional and non-functional
Types of System Testing
testing. System Testing is a black-box
Tools used for System Testing
testing . System Testing is performed
Advantages of System Testing
after the integration testing and before
Disadvantages of System Testing
the acceptance testing.
What is System Testing ?
System testing is evergreen role in software
System Testing is a type of software
engineering because every software is needed
testing that is performed on a completely
to test and very update is needed to test so
integrated system to evaluate the compliance
the demand of the software tester is always
of the system with the corresponding
needed. If you wish to learn software
requirements. In system testing, integration
testing from the scratch and want to grab a
testing passed components are taken as
good grip on testing tools and concept you
input.
can check our new software testing course
The goal of integration testing is to
detect any irregularity between the units
that are integrated. System testing
detects defects within both the integrated
units and the whole system. The result of
system testing is the observed behavior of
a component or a system when it is tested.
System Testing is carried out on the whole
system in the context of either system
requirement specifications or functional
requirement specifications or the context
of both. System testing tests the design
and behavior of the system and also the
expectations of the customer.
It is performed to test the system beyond
the bounds mentioned in the software
Defect Reporting: Defects in the system
are detected.
Regression Testing: It is carried out to
test the side effects of the testing
process.
Log Defects: Defects are fixed in this
step.
Retest: If the test is not successful then
again test is performed.
2. Branch Coverage
In this technique, test cases are designed
so that each branch from all decision points 4 test cases are required such that all branches of all decisions
is traversed at least once. In a flowchart, are covered, i.e, all edges of the flowchart are covered
all edges must be traversed at least once.
3. Condition Coverage V(G) = P + 1, where P is the number of
In this technique, all individual conditions predicate nodes in the flow graph
must be covered as shown in the following V(G) = E – N + 2, where E is the number of
example: edges and N is the total number of nodes
READ X, Y V(G) = Number of non-overlapping regions
IF(X == 0 || Y == 0) in the graph
PRINT ‘0’ #P1: 1 – 2 – 4 – 7 – 8
#TC1 – X = 0, Y = 55 #P2: 1 – 2 – 3 – 5 – 7 – 8
#TC2 – X = 5, Y = 0 #P3: 1 – 2 – 3 – 6 – 7 – 8
4. Multiple Condition Coverage #P4: 1 – 2 – 4 – 7 – 1 – . . . – 7 – 8
In this technique, all the possible 6. Loop Testing
combinations of the possible outcomes of Loops are widely used and these are
conditions are tested at least once. Let’s fundamental to many algorithms hence, their
consider the following example: testing is very important. Errors often
READ X, Y occur at the beginnings and ends of loops.
IF(X == 0 || Y == 0) Simple loops: For simple loops of size n,
PRINT ‘0’ test cases are designed that:
#TC1: X = 0, Y = 0 1. Skip the loop entirely
#TC2: X = 0, Y = 5 2. Only one pass through the loop
#TC3: X = 55, Y = 0 3. 2 passes
#TC4: X = 55, Y = 5 4. m passes, where m < n
5. Basis Path Testing 5. n-1 ans n+1 passes
In this technique, control flow graphs are Nested loops: For nested loops, all the
made from code or flowchart and then loops are set to their minimum count, and
Cyclomatic complexity is calculated which we start from the innermost loop. Simple
defines the number of independent paths so loop tests are conducted for the innermost
that the minimal number of test cases can be loop and this is worked outwards till all
designed for each independent path. Steps: the loops have been tested.
Make the corresponding control flow graph Concatenated loops: Independent loops, one
Calculate the cyclomatic complexity after another. Simple loop tests are
Find the independent paths applied for each. If they’re not
Design test cases corresponding to each independent, treat them like nesting.
independent path
White
Black Box Box Gray Box
Black Box vs White Box vs Gray Box Testing Aspect Testing Testing Testing
Here is a simple comparison of Black Box,
White Box, and Gray Box testing, Smaller
Smaller
highlighting key aspects: than both
Test Case compared
Largest Black Box
White Input to Black
and White
Box
Black Box Box Gray Box Size Box
Aspect Testing Testing Testing
Easier due
Challengin
Knowledge to
Finding g, may be
of Not Partially Difficult internal
found at
Required Hidden
Internal required required code
user level
Code Errors access
Structural Well-
Functional testing, Not suited and Not
testing, clear box Algorithm suitable recommende suitable
data-driven testing, Translucen Testing d
testing, code-based t testing
closed box testing, Depends on High due Moderate,
Other testing transparen Time functional to complex faster
Names t testing Consumpti specificati code than White
on ons analysis Box
Verificati
Trial and on of Combinatio
error, internal n of both
based on coding, black box
external system and white Process of White Box Testing
functionali boundaries box 1. Input: Requirements, Functional
ty , and data approaches specifications, design documents, source
Approach domains code.
2. Processing: Performing risk analysis to 2. Access to the source code: White box
guide through the entire process. testing requires access to the
3. Proper test planning: Designing test cases application’s source code, which makes it
to cover the entire code. Execute rinse- possible to test individual functions,
repeat until error-free software is methods, and modules.
reached. Also, the results are 3. Knowledge of programming
communicated. languages: Testers performing white box
4. Output: Preparing the final report of the testing must have knowledge of programming
entire testing process. languages like Java, C++, Python, and PHP
White Testing is performed in 2 Steps to understand the code structure and write
1. Tester should understand the code well tests.
2. Tester should write some code for test 4. Identifying logical errors: White box
cases and execute them testing helps to identify logical errors
Tools required for White box testing: in the code, such as infinite loops or
PyUnit incorrect conditional statements.
Sqlmap 5. Integration testing: White box testing is
Nmap useful for integration testing, as it
Parasoft Jtest allows testers to verify that the
Nunit different components of an application are
VeraUnit working together as expected.
CppUnit 6. Unit testing: White box testing is also
Bugzilla used for unit testing, which involves
Fiddler testing individual units of code to ensure
JSUnit.net that they are working correctly.
OpenGrok 7. Optimization of code: White box testing
Wireshark can help to optimize the code by
HP Fortify identifying any performance issues,
CSUnit redundant code, or other areas that can be
Features of White box Testing improved.
1. Code coverage analysis: White box testing 8. Security testing: White box testing can
helps to analyze the code coverage of an also be used for security testing, as it
application, which helps to identify the allows testers to identify any
areas of the code that are not being vulnerabilities in the application’s code.
tested.
9. Verification of Design: It verifies that 4. Integration with SDLC: White box testing
the software’s internal design is can be easily started in Software
implemented in accordance with the Development Life Cycle.
designated design documents. 5. Detection of Complex Defects: Testers can
10. Check for Accurate Code: It identify defects that cannot be detected
verifies that the code operates in through other testing techniques.
accordance with the guidelines and 6. Comprehensive Test Cases: Testers can
specifications. create more comprehensive and effective
11. Identifying Coding Mistakes: It finds test cases that cover all code paths.
and fix programming flaws in your code, 7. Testers can ensure that the code meets
including syntactic and logical errors. coding standards and is optimized for
12. Path Examination: It ensures that each performance.
possible path of code execution is Disadvantages of White Box Testing
explored and test various iterations of 1. Programming Knowledge and Source Code
the code. Access: Testers need to have programming
13. Determining the Dead Code: It finds and knowledge and access to the source code to
remove any code that isn’t used when the perform tests.
programme is running normally (dead code). 2. Overemphasis on Internal Workings: Testers
may focus too much on the internal
Advantages of White Box Testing workings of the software and may miss
external issues.
3. Bias in Testing: Testers may have a biased
1. Thorough Testing : White box testing is
view of the software since they are
thorough as the entire code and structures
familiar with its internal workings.
are tested.
4. Test Case Overhead: Redesigning code and
2. Code Optimization: It results in the
rewriting code needs test cases to be
optimization of code removing errors and
written again.
helps in removing extra lines of code.
5. Dependency on Tester Expertise: Testers
3. Early Detection of Defects: It can start
are required to have in-depth knowledge of
at an earlier stage as it doesn’t require
the code and programming language as
any interface as in the case of black box
opposed to black-box testing.
testing.
6. Inability to Detect Missing
Functionalities: Missing functionalities
cannot be detected as the code that exists 2. Compute the Cyclomatic Complexity of the
is tested. Graph
7. Increased Production Errors: High chances 3. Identify the Independent Paths
of errors in production. 4. Design Test cases from Independent Paths
Let’s understand each step one by one. 1.
Control Flow Graph – A control flow graph (or
simply, flow graph) is a directed graph which
represents the control structure of a program
or module. A control flow graph (V, E) has V
Basis Path Testing in number of nodes/vertices and E number of
Software Testing edges in it. A control graph can also have :
Junction Node – a node with more than one
Last Updated : 15 Dec, 2022 arrow entering it.
Decision Node – a node with more than one
arrow leaving it.
Region – area bounded by edges and nodes
(area outside the graph is also counted as
Prerequisite – Path Testing Basis Path a region.).
Testing is a white-box testing technique
based on the control structure of a program
or a module. Using this structure, a control
flow graph is prepared and the various
possible paths present in the graph are
executed as a part of testing. Therefore, by
definition, Basis path testing is a technique
of selecting the paths in the control flow
graph, that provide a basis set of execution
paths through the program or module. Since
this testing is based on the control
structure of the program, it requires
complete knowledge of the program’s
structure. To design test cases using this
technique, four steps are followed :
1. Construct the Control Flow Graph
Sequential Statements –
If – Then – Else –