Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

UNIT IV SYSTEM TESTING

Testing is the process of evaluating a system or its component(s) with the intent to find whether it satisfies the
specified requirements or not.

Testing is executing a system in order to identify any gaps, errors, or missing requirements in contrary to the
actual requirements.

According to ANSI/IEEE 1059 standard, Testing can be defined as - A process of analyzing a software item to
detect the differences between existing and required conditions (that is defects/errors/bugs) and to evaluate the
features of the software item.

2.0 Who does Testing?

It depends on the process and the associated stakeholders of the project(s). In the IT industry, large companies
have a team with responsibilities to evaluate the developed software in context of the given requirements.
Moreover, developers also conduct testing which is called Unit Testing. In most cases, the following
professionals are involved in testing a system within their respective capacities:

 Software Tester
 Software Developer
 Project Lead/Manager
 End User

Different companies have different designations for people who test the software on the basis of their experience
and knowledge such as Software Tester, Software Quality Assurance Engineer, QA Analyst, etc.

Software Testing

Black-Box Testing

The technique of testing without having any knowledge of the interior workings of the application is called black-
box testing. The tester is oblivious to the system architecture and does not have access to the source code.
Typically, while performing a black-box test, a tester will interact with the system's user interface by providing
inputs and examining outputs without knowing how and where the inputs are worked upon.

The following table lists the advantages and disadvantages of black-box testing.

Advantages Disadvantages
 Well suited and efficient for large code
segments.  Limited coverage, since only a selected number
 Code access is not required. of test scenarios is actually performed.
 Clearly separates user's perspective from the  Inefficient testing, due to the fact that the tester
developer's perspective through visibly defined only has limited knowledge about an
roles. application.
 Large numbers of moderately skilled testers  Blind coverage, since the tester cannot target
can test the application with no knowledge of specific code segments or error-prone areas.
implementation, programming language, or  The test cases are difficult to design.
operating systems.

White-Box Testing

White-box testing is the detailed investigation of internal logic and structure of the code. White-box testing is
also called glass testing or open-box testing. In order to perform white-box testing on an application, a tester
needs to know the internal workings of the code.

The tester needs to have a look inside the source code and find out which unit/chunk of the code is behaving
inappropriately.

The following table lists the advantages and disadvantages of white-box testing.

Advantages Disadvantages
 As the tester has knowledge of the source code,  Due to the fact that a skilled tester is needed to
it becomes very easy to find out which type of perform white-box testing, the costs are
data can help in testing the application increased.
effectively.  Sometimes it is impossible to look into every
 It helps in optimizing the code. nook and corner to find out hidden errors that
 Extra lines of code can be removed which can may create problems, as many paths will go
bring in hidden defects. untested.
 Due to the tester's knowledge about the code,  It is difficult to maintain white-box testing, as it
maximum coverage is attained during test requires specialized tools like code analyzers
scenario writing. and debugging tools.

Grey-Box Testing

Grey-box testing is a technique to test the application with having a limited knowledge of the internal workings
of an application. In software testing, the phrase the more you know, the better carries a lot of weight while testing
an application.
Mastering the domain of a system always gives the tester an edge over someone with limited domain knowledge.
Unlike black-box testing, where the tester only tests the application's user interface; in grey-box testing, the tester
has access to design documents and the database. Having this knowledge, a tester can prepare better test data and
test scenarios while making a test plan.
Advantages Disadvantages
 Offers combined benefits of black-box and
white-box testing wherever possible.  Since the access to source code is not available,
 Grey box testers don't rely on the source code; the ability to go over the code and test coverage
instead they rely on interface definition and is limited.
functional specifications.  The tests can be redundant if the software
 Based on the limited information available, a designer has already run a test case.
grey-box tester can design excellent test  Testing every possible input stream is
scenarios especially around communication unrealistic because it would take an
protocols and data type handling. unreasonable amount of time; therefore, many
 The test is done from the point of view of the program paths will go untested.
user and not the designer.

Software Testing - Levels

Levels of testing include different methodologies that can be used while conducting software testing. The main
levels of software testing are:

 Functional Testing
 Non-functional Testing

Functional Testing

This is a type of black-box testing that is based on the specifications of the software that is to be tested. The
application is tested by providing input and then the results are examined that need to conform to the functionality
it was intended for. Functional testing of a software is conducted on a complete, integrated system to evaluate the
system's compliance with its specified requirements.

There are five steps that are involved while testing an application for functionality.

1. The determination of the functionality that the intended application is meant to perform.

2. The creation of test data based on the specifications of the application.

3. The output based on the test data and the specifications of the application.

4. The writing of test scenarios and the execution of test cases.

5. The comparison of actual and expected results based on the executed test cases.
An effective testing practice will see the above steps applied to the testing policies of every organization and
hence it will make sure that the organization maintains the strictest of standards when it comes to software quality.

11.1.1 Unit Testing

This type of testing is performed by developers before the setup is handed over to the testing team to formally
execute the test cases. Unit testing is performed by the respective developers on the individual units of source
code assigned areas. The developers use test data that is different from the test data of the quality assurance team.

The goal of unit testing is to isolate each part of the program and show that individual parts are correct in terms
of requirements and functionality.

Limitations of Unit Testing

Testing cannot catch each and every bug in an application. It is impossible to evaluate every execution path in
every software application. The same is the case with unit testing.

There is a limit to the number of scenarios and test data that a developer can use to verify a source code. After
having exhausted all the options, there is no choice but to stop unit testing and merge the code segment with other
units.

11.1.2 Integration Testing

Integration testing is defined as the testing of combined parts of an application to determine if they function
correctly. Integration testing can be done in two ways: Bottom-up integration testing and Top-down integration
testing.
S.N. Integration Testing Method

Bottom-up integration
1
This testing begins with unit testing, followed by tests of progressively higher-level combinations of units
called modules or builds.
Top-down integration
2
In this testing, the highest-level modules are tested first and progressively, lower-level modules are tested
thereafter.

In a comprehensive software development environment, bottom-up testing is usually done first, followed by top-
down testing. The process concludes with multiple tests of the complete application, preferably in scenarios
designed to mimic actual situations.
11.1.3 System Testing

System testing tests the system as a whole. Once all the components are integrated, the application as a whole is
tested rigorously to see that it meets the specified Quality Standards. This type of testing is performed by a
specialized testing team.

System testing is important because of the following reasons:

 System testing is the first step in the Software Development Life Cycle, where the application is tested
as a whole.
 The application is tested thoroughly to verify that it meets the functional and technical specifications.
 The application is tested in an environment that is very close to the production environment where the
application will be deployed.
 System testing enables us to test, verify, and validate both the business requirements as well as the
application architecture.

11.1.4 Regression Testing

Whenever a change in a software application is made, it is quite possible that other areas within the application
have been affected by this change. Regression testing is performed to verify that a fixed bug hasn't resulted in
another functionality or business rule violation. The intent of regression testing is to ensure that a change, such as
a bug fix should not result in another fault being uncovered in the application.

Regression testing is important because of the following reasons:

 Minimize the gaps in testing when an application with changes made has to be tested.
 Testing the new changes to verify that the changes made did not affect any other area of the application.
 Mitigates risks when regression testing is performed on the application.
 Test coverage is increased without compromising timelines.
 Increase speed to market the product.

11.1.5 Acceptance Testing

This is arguably the most important type of testing, as it is conducted by the Quality Assurance Team who will
gauge whether the application meets the intended specifications and satisfies the client’s requirement. The QA
team will have a set of pre-written scenarios and test cases that will be used to test the application.

More ideas will be shared about the application and more tests can be performed on it to gauge its accuracy and
the reasons why the project was initiated. Acceptance tests are not only intended to point out simple spelling
mistakes, cosmetic errors, or interface gaps, but also to point out any bugs in the application that will result in
system crashes or major errors in the application.
By performing acceptance tests on an application, the testing team will deduce how the application will perform
in production. There are also legal and contractual requirements for acceptance of the system.

11.1.6 Alpha Testing

This test is the first stage of testing and will be performed amongst the teams (developer and QA teams). Unit
testing, integration testing and system testing when combined together is known as alpha testing. During this
phase, the following aspects will be tested in the application:

 Spelling Mistakes
 Broken Links
 Cloudy Directions
 The Application will be tested on machines with the lowest specification to test loading times and any
latency problems.

11.1.7 Beta Testing

This test is performed after alpha testing has been successfully performed. In beta testing, a sample of the intended
audience tests the application. Beta testing is also known as pre-release testing. Beta test versions of software
are ideally distributed to a wide audience on the Web, partly to give the program a "real-world" test and partly to
provide a preview of the next release. In this phase, the audience will be testing the following:

 Users will install, run the application and send their feedback to the project team.
 Typographical errors, confusing application flow, and even crashes.
 Getting the feedback, the project team can fix the problems before releasing the software to the actual
users.
 The more issues you fix that solve real user problems, the higher the quality of your application will be.
 Having a higher-quality application when you release it to the general public will increase customer
satisfaction.

Software Verification Techniques

Verification is the process of checking or verifying the credentials, data or information to confirm their credibility
and accuracy.In the field of software engineering, software verification is defined as the process of evaluating
software product, to ensure that the development phase is being carried out accurately, to build the desired
software product.
It is performed during the ongoing phase of software development, to ensure the detection of defects and faults in
the early stage of the development life cycle and to determine whether it satisfies the requirements of the
customer.
Types of Verification:
Software verifications are of two types, each of which, is focused on verifying various aspects of the software and
ensuring its high quality. Together, these two verification types ensure that the software conforms to and satisfies
specified requirements. The two types of software verification are:
1. Static Verification: Static verification involves inspection of the code before its execution, which ensures
that the software meets its specified requirements and specifications.
o It is an analysis based approach, usually carried out by just making an analysis of static aspects of
the software system, such as the code conventions, software metrics calculation, anti-pattern
detection, etc.
o It does not involve the operation of the system or component.
o Static verification includes both manual as well as automated testing techniques, such as
consistency techniques and measurement techniques.
2. Dynamic Verification: It concerns with the working behavior of the software and is being carried out
along with the execution of software. Also, know by 'Test phase' dynamic verification executes test data on
the software, to assess the behavior of the software.
o Unlike static verification, dynamic verification involves execution of the system or its components.
o The team selects a group of test cases consisting of tests data, which are then used to find out the
output test results.
o There are three subtypes of dynamic verification: functional testing, structural testing, and random
testing.
How to Perform Software Verification?
The process of software verification involves the assessment of the development phase and intermediary software
product, based on the pre-defined specifications and guidelines.
It ensures that the methodology used for software development adheres to the specified specifications, set-up
before the development phase, to build the correct software product.
Thus, this process requires cross-checking of these pre-defined specifications with the partially developed
software product, to satisfy the process of carrying out the development of the product, in a right way.

Approaches:
As stated above, the process of software verification involves reviews, walkthrough, and inspection, which
together helps to evaluate the accuracy of the product and ensure its quality. Therefore, defined below are these
approaches of software verification:
The process of software verification can be performed through following approaches:
1. Reviews: It is an organized way of examining the documents such as design specifications, requirements
specifications, code, etc. by one or more than one person, to explore defects in the software.
2. Walkthroughs: It is, usually an informal way of evaluating the software product, where different teams,
whether associated or non-associated with the software development, goes through the software product
and have discussion on possible errors and other defects, present in the software.
3. Inspection: It is one of the preferred and most common methods of the static testing. Unlike,
walkthroughs, it's a formal way of testing the software, through examination of documents, carried out by
the skilled moderator. This method usually, checklist, rules, entry & exist criteria along with preparation
and sharing of reports, in order to take corrective & necessary actions.
Advantages of Software Verification:
The advantages offered by software verification are numerous. It is among those processes, which makes the
process of software development easy and allows the team to create an end product that conforms to the rules and
regulations, as well as customer’s requirements. Other advantages of this process are:
 It helps reduce the number of defects found during the later stages of development.
 Verifying the software in its initial development phase allows the team to get a better understanding of the
product.
 It helps reduce the chances of system failures and crashes.
 Assists the team in developing a software product that conforms to the specified requirements and design
specifications.

Structural Testing

Structural Testing is a type of software testing. This testing is used to test the internal design of the software or the
structure of the coding for the particular software. Structural testing uses white box testing techniques. The
structural testing is concentrated on how the system is doing rather than the functionality of the system.
The testing phase starts after the development phase. The development team is included in the structural
testing. It must be noted that the working of structural testing is different from behavioral testing.
Types of Structural Testing
The following are the types of structural testing:
1. Mutation Testing
2. Data Flow Testing
3. Control flow Testing
4. Slice-based Testing

1. Mutation Testing
Mutation testing is structural testing that is performed to design new software tests and also evaluate the quality of
tests. It is related to the modification of a program in small ways.
It is a structural testing technique, which uses the structure of the code to guide the testing process. Mutation
testing has the following three types:
 Value Mutation
 Decision Mutation
 Statement Mutation
Value Mutation: It is mutation testing that changes the values of constants to detect errors.
Decision Mutation: It is a type of testing that changes the logical or arithmetic operations to detect any errors. Let
us understand this using simple coding snippet.
Statement Mutation: A statement mutation either deletes a statement or replaces the statement to check for errors.
2. Data Flow Testing
Data Flow testing is structural testing it is used to find the test paths of a program according to the values. It is
used to analyze the flow of data in the program. These are mainly concerned with
 Statements where variables receive values,
 Where these values are being used or referenced.
3. Control Flow Testing
Control flow testing is a type of software testing technique that uses the control flow technique. It is a form of
testing that depicts the execution order of the statements. It is used to develop the test cases of the programs. The
tester selects a test case from a large portion of the program to test. The whole test cases are represented in the
form of a control flow graph with basic blocks as a node, edge, etc. This consists of various nodes such as entry
node, exit node, decision node, junction node. The node holds a statement whereas the edge is used to connect or
determine the flow of nodes.
We use the following steps in the control flow testing:
1. Control Flow Graph Creation: A graph is created from the source code either manually or using the
software.
2. Coverage Test: A coverage test is defined over the graph and elements of the graph such as nodes, edges,
paths, etc.
3. Test Case Creation: A set of test cases are created to cover the coverage target for control flow graphs.
4. Test Case Execution: The test cases are executed after the creation of test cases.
5. Analysis of results: Analysis of results is the phase where we find out if the program consists of any errors
or not.
3. Slice-Based Testing
Slicing or program slicing is a technique used in software testing which takes a slice or a group of program
statements in a program. It consists of two types which are as follows:
 Static Slicing: Static slicing is a group of statements that affects the final result of any variable at any point
in time.
 Dynamic Slicing: The dynamic slice of a program contains all the statements that actually affect the value
of a variable at any point for a particular execution of the program.
Techniques used in Structural Testing
The following are the techniques used in structural testing:
1. Statement Coverage
2. Branch Coverage
3. Path Coverage
Statement Coverage: Statement Coverage is a white box testing technique, which involves the execution of all
the statements at least once in the source code. It is a metric used to calculate the number of statements that have
been executed. It is also used to check the quality of the code and the flow of different paths.
Statement Coverage can be given by:
Statement Coverage= (No of statements executed/Total no of statements in the source code) * 100
The main drawback of this technique is that we cannot test the false condition to it
Branch Coverage: Branch Coverage is a testing method, it aims to ensure that each one of the possible branches
from each decision point is executed at least once. That is for each branch two conditions true and false are taken.
It helps in validating each and every branch in the program
The branch coverage is calculated as follows:
Branch Testing=(No of decision outcomes tested/ Total no of decision outcomes) * 100%
Structural Testing Tools
Structural testing contains some open-source and commercial tools that have their functionality. The most
common tools are
 Cucumber
 JBehave
 Cfix
 JUnit
Let us know about these a little bit.
 Cucumber: It is the most widely used structural testing tool, it delivers an easily understandable testing
script. It is used by test engineers to develop test cases for the system
 JBehave: It is a framework for BDD (Behaviour-driven Development). It is purely executing in Java. In
this, we can write the user stories. It allows stories to be executed through an Ant task
 CFix: CFix is an XUnit testing framework supported by the C/C++ programming language. In this tool,
the unit tests are compiled and linked into a DLL. It supports the development of both user and kernel
mode
 JUnit: It is one of the essential tools of structural testing. It is an open-source unit testing framework,
which was in Java language.

Unit Testing OR Class 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.
The purpose of unit testing is to test the correctness of isolated code. A unit component is an individual
function or code of the application. White box testing approach used for unit testing and usually done by the
developers.
Whenever the application is ready and given to the Test engineer, he/she will start checking every component of
the module or module of the application independently or one by one, and this process is known as Unit
testing or components testing.
Why Unit Testing?
In a testing level hierarchy, unit testing is the first level of testing done before integration and other remaining
levels of the testing. It uses modules for the testing process which reduces the dependency of waiting for Unit
testing frameworks, stubs, drivers and mock objects are used for assistance in unit testing.

Generally, the software goes under four level of testing: Unit Testing, Integration Testing, System Testing, and
Acceptance Testing but sometimes due to time consumption software testers does minimal unit testing but
skipping of unit testing may lead to higher defects during Integration Testing, System Testing, and Acceptance
Testing or even during Beta Testing which takes place after the completion of software application.
Some crucial reasons are listed below:
o Unit testing helps tester and developers to understand the base of code that makes them able to change
defect causing code quickly.
o Unit testing helps in the documentation.
o Unit testing fixes defects very early in the development phase that's why there is a possibility to occur a
smaller number of defects in upcoming testing levels.
o It helps with code reusability by migrating code and test cases.

Mutation Testing

Mutation Testing is a type of Software Testing that is performed to design new software tests and also evaluate
the quality of already existing software tests. Mutation testing is related to modification a program in small ways.
It focuses to help the tester develop effective tests or locate weaknesses in the test data used for the program.

Mutation Testing is a White Box Testing.


Mutation testing can be applied to design models, specifications, databases, tests, and XML. It is a structural
testing technique, which uses the structure of the code to guide the testing process. It can be described as the
process of rewriting the source code in small ways in order to remove the redundancies in the source code.
Objective of Mutation Testing:
The objective of mutation testing is:
 To identify pieces of code that are not tested properly.
 To identify hidden defects that can’t be detected using other testing methods.
 To discover new kinds of errors or bugs.
 To calculate the mutation score.
 To study error propagation and state infection in the program.
 To assess the quality of the test cases.
Types of Mutation Testing:
Mutation testing is basically of 3 types:
1. Value Mutations:
In this type of testing the values are changed to detect errors in the program. Basically a small value is changed to
a larger value or a larger value is changed to a smaller value. In this testing basically constants are changed.
Example:
Initial Code:

int mod = 1000000007;


int a = 12345678;
int b = 98765432;
int c = (a + b) % mod;

Changed Code:

int mod = 1007;


int a = 12345678;
int b = 98765432;
int c = (a + b) % mod;
2. Decision Mutations:
In decisions mutations are logical or arithmetic operators are changed to detect errors in the program.
Example:
Initial Code:

if(a < b)
c = 10;
else
c = 20;

Changed Code:

if(a > b)
c = 10;
else
c = 20;
3. Statement Mutations:
In statement mutations a statement is deleted or it is replaces by some other statement.
Example:
Initial Code:

if(a < b)
c = 10;
else
c = 20;

Changed Code:

if(a < b)
d = 10;
else
d = 20;
Tools used for Mutation Testing :
 Judy
 Jester
 Jumble
 PIT
 MuClipse.
Advantages of Mutation Testing:
 It brings a good level of error detection in the program.
 It discovers ambiguities in the source code.
 It finds and solves the issues of loopholes in the program.
 It helps the testers to write or automate the better test cases.
 It provides more efficient programming source code.
Disadvantages of Mutation Testing:
 It is highly costly and time-consuming.
 It is not able for Black Box Testing.
 Some, mutations are complex and hence it is difficult to implement or run against various test cases.
 Here, the team members who are performing the tests should have good programming knowledge.
 Selection of correct automation tool is important to test the programs

Levels of Testing

There are 4 levels of testing - unit testing, integration testing, system testing and acceptance testing. These levels
are based on the extent of module testing. Unit testing is done by the developer, whereas integration testing and
system testing are done by the testing team.

Different Levels of Testing


Unit Testing
 Unit testing is when every module of the application gets tested respectively.
 Unit testing is done by the developer himself. After he has written code for a feature, he will ensure it is
working fine.
 Unit tests are the smallest testable component of the application.
Integration Testing
 Integration testing is a testing technique where two or more independent components are tested together.
 Integration testing is done by the developer. Here test cases are written to ensure the data flowing between
them is correct.
 For example, testing the signup form where UI validations are correct, data reaching API, and getting
stored are all validated.
 Integration testing is done when the application is still developing to find bugs early on in the development
process.
System Testing
 System testing is done by the tester where the entire application is tested as a single unit.
 Hence, system testing test cases are also performance test cases, load testing, and stress testing test cases.
 System testing is done to find the errors which might have been overlooked during unit or integration
testing.
 System testing evaluates both functional and non-functional test cases.
Acceptance Testing
 Acceptance testing is done by the client where he evaluates whether the product is made by the
requirement he listed out.
 Acceptance testing is done at the UAT server where a well-tested product is deployed by the team for the
client's reference so he can track ongoing changes in the project
 There is a defined acceptance criterion that is laid at the time of requirement listing so that the client can
validate that the product is meeting the acceptance criteria.
 Once the client completes acceptance testing the product goes to production where users can use the final
application

Static and Dynamic Testing Tools


Static testing tools seek to support the static testing process whereas dynamic testing tools support dynamic testing
process. It may be noted that static testing is different from dynamic testing.
Few points of differences among static and dynamic testing are as under:

Static Testing Dynamic Testing


Static testing does not require the actual Dynamic testing involves testing the software
1 execution of software. by actually executing it.
2 It is more cost effective. It is less cost effective.
It achieves less than 50% statement coverage
It may achieve 100% statement coverage in because it finds bugs only in part of codes those
3 relatively short time. are actually executed.
It may involve running several test cases, each
4 It usually takes shorter time. of which may take longer then compilation.
It uncovers limited type of bugs that are
5 It may uncover variety of bugs. explorable through execution.
It can take place only after executables are
6 It can be done before compilation. ready
Software testing tools are frequently used to ensure consistency, thoroughness and efficiency in testing software
products and to fulfil the requirements of planned testing activities. These tools may facilitate unit (module)
testing and subsequent integration testing (e.g., drivers and stubs) as well as commercial software testing tools.
Testing tools can be classified into following two categories:
Static Test Tools: These tools do not involve actual input and output. Rather, they take a symbolic approach to
testing, i.e. they do not test the actual execution of the software. These tools include the following: ,
1) Flow analyzers: They ensure consistency in data flow from input to output.
2) Path tests: They find unused code and code with contradictions.
3) Coverage analyzers: It ensures that all logic paths are tested.
4) Interface analyzers: It examines the effects of passing variables and data between modules.
Dynamic Test Tools: These tools test the software system with ‘live’ data. Dynamic test tools include the
following
1) Test driver: It inputs data into a module-under-test (MUT).
2) Test beds: It simultaneously displays source code along with the program under execution.
3) Emulators: The response facilities are used to emulate parts of the system not yet developed.
4) Mutation analyzers: The errors are deliberately ‘fed’ into the code in order to test fault tolerance of the
system.

Software Maintenance
Software maintenance is a part of the Software Development Life Cycle. Its primary goal is to modify and update
software application after delivery to correct errors and to improve performance. Software is a model of the real
world. When the real world changes, the software require alteration wherever possible.
Software Maintenance is an inclusive activity that includes error corrections, enhancement of capabilities, deletion
of obsolete capabilities, and optimization.
Need for Maintenance
Software Maintenance is needed for:-
o Correct errors
o Change in user requirement with time
o Changing hardware/software requirements
o To improve system efficiency
o To optimize the code to run faster
o To modify the components
o To reduce any unwanted side effects.
Thus the maintenance is required to ensure that the system continues to satisfy user requirements.

Categories of Software Maintenance


1. Corrective Maintenance
Corrective maintenance aims to correct any remaining errors regardless of where they may cause specifications,
design, coding, testing, and documentation, etc.
2. Adaptive Maintenance
It contains modifying the software to match changes in the ever-changing environment.
3. Preventive Maintenance
It is the process by which we prevent our system from being obsolete. It involves the concept of reengineering &
reverse engineering in which an old system with old technology is re-engineered using new technology. This
maintenance prevents the system from dying out.
4. Perfective Maintenance
It defines improving processing efficiency or performance or restricting the software to enhance changeability.
This may contain enhancement of existing system functionality, improvement in computational efficiency, etc.

CHALLENGES OF SOFTWARE MAINTENANCE


Most problems that are associated with software maintenance can be traced to deficiencies of the software
Development process. There are several technical and managerial problems encountered while maintaining
software.
A. Costs
Various research studies proposed that software maintenance consumes 60% to 80% of cost in whole
development life cycle; these surveys also report that maintenance costs are mainly due to enhancements,
rather than corrections.
B. Impact Analysis
One of the most important challenges in software maintenance is to find out the effects of a proposed
modification on the rest of the system. Impact analysis is the action of assessing the probable effects of a
change with the plan of reducing sudden side effects. The task involves assessing the correctness of a
projected modification and evaluating the risks related with its completion, plus the estimates of the
effects on properties, energy and development.
C. Corrective Changes:
One of the major key issues is corrective changes because it is hard to find the correct place to do the
changes. It can be difficult to recognize the code base. If the preliminary design is reduced a minute
change might insist architecture changes that take a lot of time. If there has been a complete workaround
of one problem then the next are even harder to crack. Design errors are tough to repair because it takes a
lot of time and understanding of the entire code base and are linked to risks.
D. Adaptive Changes
Adaptive changes are frequently not easy due to deficiency of information about what the software is
being modified to. The diverse facts of the new technology to adjust to be difficult to take hold of. Also
impact analysis and discovering interfaces to the new things are difficult. Problems due to unbalanced
preliminary design are a matter of concern.
E. Program Comprehension
Another key issue is program comprehension which involves that extensive amount of time should be
expended by maintenance engineers to read and understand the code, the relevant documentation to have
a better perspective on its logic, purpose and structure to maintain a part of software and to enhance the
quality of software.

Regression Testing
Regression testing is the process of testing the modified parts of the code and the parts that might get affected due
to the modifications to ensure that no new errors have been introduced in the software after the modifications have
been made. Regression means the return of something and in the software field, it refers to the return of a bug.
When to do regression testing?
 When a new functionality is added to the system and the code has been modified to absorb and integrate
that functionality with the existing code.
 When some defect has been identified in the software and the code is debugged to fix it.
 When the code is modified to optimize its working.
Process of Regression testing:
Firstly, whenever we make some changes to the source code for any reason like adding new functionality,
optimization, etc. then our program when executed fails in the previously designed test suite for obvious reasons.
After the failure, the source code is debugged in order to identify the bugs in the program. After identification of
the bugs in the source code, appropriate modifications are made. Then appropriate test cases are selected from the
already existing test suite which covers all the modified and affected parts of the source code. We can add new test
cases if required. In the end, regression testing is performed using the selected test cases.

Techniques for the selection of Test cases for Regression Testing:


 Select all test cases: In this technique, all the test cases are selected from the already existing test suite. It
is the simplest and safest technique but not much efficient.
 Select test cases randomly: In this technique, test cases are selected randomly from the existing test-suite,
but it is only useful if all the test cases are equally good in their fault detection capability which is very
rare. Hence, it is not used in most of the cases.
 Select modification traversing test cases: In this technique, only those test cases are selected which
covers and tests the modified portions of the source code the parts which are affected by these
modifications.
 Select higher priority test cases: In this technique, priority codes are assigned to each test case of the test
suite based upon their bug detection capability, customer requirements, etc. After assigning the priority
codes, test cases with the highest priorities are selected for the process of regression testing. The test case
with the highest priority has the highest rank. For example, test case with priority code 2 is less important
than test case with priority code 1.
 Tools for regression testing:
In regression testing, we generally select the test cases from the existing test suite itself and hence, we need not
compute their expected output, and it can be easily automated due to this reason. Automating the process of
regression testing will be very much effective and time saving. Most commonly used tools for regression testing
are:
 Selenium
 WATIR (Web Application Testing In Ruby)
 QTP (Quick Test Professional)
 RFT (Rational Functional Tester)
 Winrunner
 Silktest
Advantages of Regression Testing:
 It ensures that no new bugs has been introduced after adding new functionalities to the system.
 As most of the test cases used in Regression Testing are selected from the existing test suite, and we
already know their expected outputs. Hence, it can be easily automated by the automated tools.
 It helps to maintain the quality of the source code.
Disadvantages of Regression Testing:
 It can be time and resource consuming if automated tools are not used.
 It is required even after very small changes in the code.

You might also like