Se 5
Se 5
Software Quality
Software quality product is defined in term of its fitness of purpose. That is, a
quality product does precisely what the users want it to do. For software products,
the fitness of use is generally explained in terms of satisfaction of the requirements
laid down in the SRS document. Although "fitness of purpose" is a satisfactory
interpretation of quality for many devices such as a car, a table fan, a grinding
machine, etc.for software products, "fitness of purpose" is not a wholly satisfactory
definition of quality.
Example: Consider a functionally correct software product. That is, it performs all
tasks as specified in the SRS document. But, has an almost unusable user interface.
Even though it may be functionally right, we cannot consider it to be a quality
product.
The modern view of a quality associated with a software product several
quality methods such as the following:
Portability: A software device is said to be portable, if it can be freely made to
work in various operating system environments, in multiple machines, with other
software products, etc.
Usability: A software product has better usability if various categories of users can
easily invoke the functions of the product.
Reusability: A software product has excellent reusability if different modules of
the product can quickly be reused to develop new products.
Correctness: A software product is correct if various requirements as specified in
the SRS document have been correctly implemented.
Maintainability: A software product is maintainable if bugs can be easily
corrected as and when they show up, new tasks can be easily added to the product,
and the functionalities of the product can be easily modified, etc.
The Software Dilemma
Any time software and business come together, there is an inherent conflict
between “get it done fast” and “do a good job”. This conflict often comes to a head
when deadlines are missed, whether through unrealistic expectation or
underestimation on the part of the developers.
The dilemma between quantity, speed and feature set isn’t going to go away any
time soon. It’s an inherent dilemma in software. But there are approaches we can
take to help solve it.
Any software project has three core elements: the speed at which the software
ships, the fidelity of the feature set, and the quality of the underlying code base. In
a perfect world, we’d be right in the middle, like so:
The triangle makes clear that as you move towards one goal, you tend to move
away from the others. Pushing for speed, for example, sacrifices quality and
feature fidelity to some degree.
And yet, often its impossible to live completely in the center of the triangle. After
all, there are deadlines to be met, and sometimes we need to push software out,
even while incurring technical debt. But leaving the center of the triangle does not
necessarily mean project ruin.
Achieving Software Quality
•Software quality doesn’t just appear
•Software quality is the result of good project management and solid engineering
practice
•This comes into play in four broad activities:
a)Software engineering methods
b)Project management techniques
c)Quality control
d)Quality assurance46
c)Quality control
•Quality control encompasses a set of software engineering actions that help to
ensure that each work product meets its quality goals
•Models are reviewed to ensure that they are complete and consistent
•Code may be inspected to uncover and correct errors before testing commences
•A series of testing steps is applied to uncover errors in processing logic, data
manipulation, and interface communication
•A combination of measurement and feedback allows a software team to tune the
process when any of these work products fail to meet quality goals49
d)Quality assurance
•Quality assurance establishes the infrastructure that supports solid software
engineering methods, rational project management, and quality control actions
•The goal of quality assurance is to provide management and technical staff with
the data necessary to be informed about product quality
Software Testing
Software testing is a process of identifying the correctness of software by
considering its all attributes (Reliability, Scalability, Portability, Re-usability,
Usability) and evaluating the execution of software components to find the
software bugs or errors or defects.
software testing has the following objectives:
• The process of investigating and checking a program to find whether there is an
error or not and does it fulfill the requirements or not is called testing.
• When the number of errors found during the testing is high, it indicates that the
testing was good and is a sign of good test case.
• Finding an unknown error that’s wasn’t discovered yet is a sign of a successful
and a good test case.
The main objective of software testing is to design the tests in such a way that it
systematically finds different types of errors without taking much time and effort
so that less time is required for the development of the software.
The overall strategy for testing software includes:
1. Before testing starts, it’s necessary to identify and specify the requirements of
the product in a quantifiable manner.
3. For the software, identifying the user’s category and developing a profile for
each user.
4. Developing a test plan to give value and focus on rapid-cycle testing.
7. Conduct formal technical reviews to evaluate the nature, quality or ability of the
test strategy and test cases.
8. For the testing process, developing a approach for the continuous development.
Testing levels
Unit Testing
Unit testing involves the testing of each unit or an individual component of the
software application. It is the first level of functional testing. The aim behind unit
testing is to validate unit components with its performance.
A unit is a single testable part of a software system and tested during the
development phase of the application software.
Let us see one sample example for a better understanding of the concept of unit
testing:
1. Amount transfer
Below are the application access details, which is given by the customer
When we feel that the maximum test coverage is achieved, we will stop the
testing.
Now, we will start performing the unit testing on the different components such as
Values Description
1234 accept
Copy and paste the value Error message→ type the value
• Provide the values just like we did in From account number (FAN)
components
For Amount component
• Provide the values just like we did in FAN and TAN components.
Disadvantages
• It cannot identify integration or broad level error as it works on units of the
code.
• In the unit testing, evaluation of all execution paths is not possible, so unit
testing is not able to catch each and every error in a program.
• It is best suitable for conjunction with other testing activities.
Integration testing
Integration testing is the second level of the software testing process comes after
unit testing. In this testing, units or individual components of the software are
tested in a group. The focus of the integration testing level is to expose defects at
the time of interaction between integrated components or units.
Example of integration testing
Let us assume that we have a Gmail application where we perform the integration
testing.
First, we will do functional testing on the login page, which includes the various
components such as username, password, submit, and cancel button. Then only
we can perform integration testing.
The different integration scenarios are as follows:
Scenarios1:
• First, we login as P users and click on the Compose mail and performing the
functional testing for the specific components.
• Now we click on the Send and also check for Save Drafts.
• After that, we send a mail to Q and verify in the Send Items folder of P to
check if the send mail is there.
• Now, we will log out as P and login as Q and move to the Inbox and verify
that if the mail has reached.
Secanrios2: We also perform the integration testing on Spam folders. If the
particular contact has been marked as spam, then any mail sent by that user should
go to the spam folder and not in the inbox.
As we can see in the below image, we will perform the functional testing for all
the text fields and every feature. Then we will perform integration testing for
the related functions. We first test the add user, list of users, delete user, edit
user, and then search user
Top-Down Approach
The top-down testing strategy deals with the process in which higher level modules
are tested with lower level modules until the successful completion of testing of all
the modules. Major design flaws can be detected and fixed early because critical
modules tested first. In this type of method, we will add the modules incrementally
or one by one and check the data flow in the same order.
Advantages:
• Identification of defect is difficult.
• An early prototype is possible.
Disadvantages:
• Due to the high number of stubs, it gets quite complicated.
• Lower level modules are tested inadequately.
• Critical Modules are tested first so that fewer chances of defects.
Bottom-Up Method
The bottom to up testing strategy deals with the process in which lower level
modules are tested with higher level modules until the successful completion of
testing of all the modules. Top level critical modules are tested at last, so it may
cause a defect. Or we can say that we will be adding the modules from bottom to
the top and check the data flow in the same order.
Advantages
• Identification of defect is easy.
• Do not need to wait for the development of all the modules as it saves time.
Disadvantages
• Critical modules are tested last due to which the defects can occur.
• There is no possibility of an early prototype.
System Testing
System Testing includes testing of a fully integrated software system. a computer
system consists of a group of software to perform the various tasks, but only
software cannot perform the task; for that software must be interfaced with
compatible hardware. System testing is a series of different type of tests with the
purpose to exercise and examine the full working of an integrated software
computer system against requirements.
System testing falls under Black box testing as it includes testing of the external
working of the software. Testing follows user's perspective to identify minor
defects.
System Testing includes the following steps.
• Verification of input functions of the application to test whether it is
producing the expected output or not.
• Testing of integrated software by including external peripherals to check the
interaction of various components with each other.
• Testing of the whole system for End to End testing.
• Behavior testing of the application via auser's experience
Load Testing
Load testing is performed under system testing to clarify whether the system can
work under real-time loads or not.
Functional Testing
Functional testing of a system is performed to find if there's any missing function
in the system. Tester makes a list of vital functions that should be in the system and
can be added during functional testing and should improve quality of the system.
Recovery Testing
Recovery testing of a system is performed under system testing to confirm
reliability, trustworthiness, accountability of the system and all are lying on
recouping skills of the system. It should be able to recover from all the possible
system crashes successfully.
Migration Testing
Migration testing is performed to ensure that if the system needs to be modified in
new infrastructure so it should be modified without any issue.
Usability Testing
The purpose of this testing to make sure that the system is well familiar with the
user and it meets its objective for what it supposed to do
Software and Hardware Testing
This testing of the system intends to check hardware and software compatibility.
The hardware configuration must be compatible with the software to run it without
any issue. Compatibility provides flexibility by providing interactions between
hardware and software.
Acceptance testing
Acceptance testing is formal testing based on user requirements and function
processing. It determines whether the software is conforming specified
requirements and user requirements or not. It is conducted as a kind of Black Box
testing where the number of required users involved testing the acceptance level of
the system. It is the fourth and last level of software testing.
For example, the blue-dart company gives the requirement to TCS for developing
the application, and the TCS will accept the needs and agree to deliver the
application in the two releases as we can see in the below image:
On August 10, the test manager tells the project manager that there is a critical bug
in the application, and that will take another four days to fix it.
But the project manager said we have to deliver the software within a given time. It
takes another 30 days to fix the defect, or otherwise, we will have to pay the
penalty (fine) for each day after the given release date. Is this the real situation?
NO, let us see three different cases and understand who perform the acceptance
testing.
Case1
In this, we will discuss how the acceptance testing is performed, and here the test
engineer will do the acceptance testing.
Mostly, the actual flow for testing the application will be seen in the above image,
but here it is little difference, as we know where the end-to-end testing or system
testing ends and the acceptance testing will proceed. To understand this scenario,
follow the below process:
The blue-dart provides the requirements, and TCS develops the application and
performs all the testing and handover to the blue-dart company.
Now the question arises the blue-dart will use the application as soon they get it
from TCS? NO, the blue dart company has a group of test engineers after they get
the software, and this team will start testing the application, and this end-to-end
testing is done at the customer environment, which is called the User Acceptance
Testing.
Let us see the difference between TCS test engineers and Blue-dart Engineers:
In TCS, the tester will perform the functional testing, integration testing, and
system testing and whereas in Blue-dart, the tester will do only the end-to-end or
system testing, which is known as acceptance testing.
Steps to Perform Acceptance Testing
3.Interface Testing:
Three areas to be tested here are - Application, Web and Database Server
• Application: Test requests are sent correctly to the Database and output at
the client side is displayed correctly. Errors if any must be caught by the
application and must be only shown to the administrator and not the end
user.
• Web Server: Test Web server is handling all application requests without
any service denial.
• Database Server: Make sure queries sent to the database give expected
results.
4. Database Testing:
Database is one critical component of your web application and stress must be laid
to test it thoroughly. Testing activities will include-
5. Compatibility testing.
Compatibility tests ensures that your web application displays correctly across
different devices. This would include-
Browser Compatibility Test: Same website in different browsers will display
differently. You need to test if your web application is being displayed correctly
across browsers, JavaScript, AJAX and authentication is working fine. You may
also check for Mobile Browser Compatibility.
The rendering of web elements like buttons, text fields etc. changes with change
in Operating System. Make sure your website works fine for various combination
of Operating systems such as Windows, Linux, Mac and Browsers such as Firefox,
Internet Explorer, Safari etc.
6. Performance Testing:
This will ensure your site works under all loads. Software Testing activities will
include but not limited to -
7. Security testing:
Security Testing is vital for e-commerce website that store sensitive customer
information like credit cards. Testing Activities will include-
Regression Testing :
• Regression testing is the re-execution of some subset of tests that have
already been conducted to ensure that changes have not propagated
unintended side effects.
Smoke Testing :
• Smoke testing is an integration testing approach that is commonly used
when product software is developed
• Smoke testing is performed by developers before releasing the build to the
testing team and after releasing the build to the testing team it is performed
by testers whether to accept the build for further testing or not.
Types of maintenance
In a software lifetime, type of maintenance may vary based on its nature. It may be
just a routine maintenance tasks as some bug discovered by some user or it may be
a large event in itself based on maintenance size or nature. Following are some types
of maintenance based on their characteristics:
• Corrective Maintenance - This includes modifications and updations done
in order to correct or fix problems, which are either discovered by user or
concluded by user error reports.
• Adaptive Maintenance - This includes modifications and updations applied
to keep the software product up-to date and tuned to the ever changing world
of technology and business environment.
• Perfective Maintenance - This includes modifications and updates done in
order to keep the software usable over long period of time. It includes new
features, new user requirements for refining the software and improve its
reliability and performance.
• Preventive Maintenance - This includes modifications and updations to
prevent future problems of the software. It aims to attend problems, which
are not significant at this moment but may cause serious issues in future.
Cost of Maintenance
Reports suggest that the cost of maintenance is high. A study on estimating software
maintenance found that the cost of maintenance is as high as 67% of the cost of
entire software process cycle.
On an average, the cost of software maintenance is more than 50% of all SDLC
phases. There are various factors, which trigger maintenance cost go high, such as:
Maintenance Activities
IEEE provides a framework for sequential maintenance process activities. It can be
used in iterative manner and can be extended so that customized items and
processes can be included.
Reverse Engineering
It is a process to achieve system specification by thoroughly analyzing,
understanding the existing system. This process can be seen as reverse SDLC
model, i.e. we try to get higher abstraction level by analyzing lower abstraction
levels.
An existing system is previously implemented design, about which we know
nothing. Designers then do reverse engineering by looking at the code and try to get
the design. With design in hand, they try to conclude the specifications. Thus, going
in reverse from code to system specification.
Program Restructuring
It is a process to re-structure and re-construct the existing software. It is all about
re-arranging the source code, either in same programming language or from one
programming language to a different one. Restructuring can have either source
code-restructuring and data-restructuring or both.
Re-structuring does not impact the functionality of the software but enhance
reliability and maintainability. Program components, which cause errors very
frequently can be changed, or updated with re-structuring.
The dependability of software on obsolete hardware platform can be removed via
re-structuring.
Forward Engineering
Forward engineering is a process of obtaining desired software from the
specifications in hand which were brought down by means of reverse engineering.
It assumes that there was some software engineering already done in the past.
Forward engineering is same as software engineering process with only one
difference – it is carried out always after reverse engineering.
Component reusability
A component is a part of software program code, which executes an independent
task in the system. It can be a small module or sub-system itself.
Example
The login procedures used on the web can be considered as components, printing
system in software can be seen as a component of the software.
Components have high cohesion of functionality and lower rate of coupling, i.e.
they work independently and can perform tasks without depending on other
modules.
In OOP, the objects are designed are very specific to their concern and have fewer
chances to be used in some other software.
In modular programming, the modules are coded to perform specific tasks which
can be used across number of other software programs.
There is a whole new vertical, which is based on re-use of software component, and
is known as Component Based Software Engineering (CBSE).
Reuse Process
Two kinds of method can be adopted: either by keeping requirements same and
adjusting components or by keeping components same and modifying
requirements.
• Requirement Specification - The functional and non-functional
requirements are specified, which a software product must comply to, with
the help of existing system, user input or both.
• Design - This is also a standard SDLC process step, where requirements are
defined in terms of software parlance. Basic architecture of system as a whole
and its sub-systems are created.
• Specify Components - By studying the software design, the designers
segregate the entire system into smaller components or sub-systems. One
complete software design turns into a collection of a huge set of components
working together.
• Search Suitable Components - The software component repository is
referred by designers to search for the matching component, on the basis of
functionality and intended software requirements..
• Incorporate Components - All matched components are packed together to
shape them as complete software.
Software Re-engineering
When we need to update the software to keep it to the current market, without
impacting its functionality, it is called software re-engineering. It is a thorough
process where the design of software is changed and programs are re-written.
Legacy software cannot keep tuning with the latest technology available in the
market. As the hardware become obsolete, updating of software becomes a
headache. Even if software grows old with time, its functionality does not.
For example, initially Unix was developed in assembly language. When language
C came into existence, Unix was re-engineered in C, because working in assembly
language was difficult.
Other than this, sometimes programmers notice that few parts of software need
more maintenance than others and they also need re-engineering.
Re-Engineering Process
• Decide what to re-engineer. Is it whole software or a part of it?
• Perform Reverse Engineering, in order to obtain specifications of existing
software.
• Restructure Program if required. For example, changing function-oriented
programs into object-oriented programs.
• Re-structure data as required.
• Apply Forward engineering concepts in order to get re-engineered
software.
There are few important terms used in Software re-engineering
Reverse Engineering –
Reverse Engineering is processes of extracting knowledge or design information
from anything man-made and reproducing it based on extracted information. It is
also called back Engineering.
Software Reverse Engineering –
Software Reverse Engineering is the process of recovering the design and the
requirements specification of a product from an analysis of it’s code. Reverse
Engineering is becoming important, since several existing software products, lack
proper documentation, are highly unstructured, or their structure has degraded
through a series of maintenance efforts.