Unit-2 Testing in The Software Lifecycle and Test Level (E-Next - In)
Unit-2 Testing in The Software Lifecycle and Test Level (E-Next - In)
UNIT-2
Testing in the Software Lifecycle and Test
Level
What is V and V model?
This model is an extension of the waterfall model.
V – V model is also known as Verification and Validation model.
This model is based on the association of the testing phase for each corresponding
development stage.
It determines the complex relationship between each phase of the software development is
associated with testing.
How V – V model works?
Every single phase in the software development life cycle, there is directly associated testing
phase.
This is a complete ordered model where next phase starts only after completion of the
previous phase.
Objectives of V – V model
In the above V – V model diagram, it defines the different phases in V – V model of SDLC.
At this model, the testing phases of the development phase is panned in parallel. There are
verification phases on one side and Validation phases on the other side of the V – V model.
Page 6 of 88
STQA NOTES SYMCA
The left side (Verification) analyzes and determines the requirements of the software to be
developed and the right side (Validation) includes the testing activities. Both the left and
right branches work concurrently and also established a relationship.
Advantages of V – V model
The processes are completed one at a time.
This model is easy to understand and simple to use.
This model is also working well for smaller software project, where requirements are
understood very well.
Each phase has specific deliverables and a review process.
It covers all functional areas.
It contains instructions and recommendations, which provide a detailed explanation of the
problems involved.
Disadvantages of V – V model
In this model, there is a possibility of high risk and uncertainty.
This model is not useful for long and ongoing projects.
It is not suitable for the projects where requirements are at a moderate to high risk of
changing.
This model is not good for complex and object oriented projects.
W Model
W Model
From the testing point of view all of the models are deficient in various ways. The test activities first
start after the implementation. The connection between the various test stages and the basis for the
test is not clear. The tight link between test, debug and change tasks during the test phase is not
clear.
Page 7 of 88
STQA NOTES SYMCA
In the models presented above, there usually appears an unattractive task to be carried out after
coding. In order to place testing on an equal footing, a second 'V' dedicated to testing is integrated
into the model. Both 'V's put together give the 'W' of the 'W-Model'.
The W Model removes the vague and ambiguous lines linking the left and right legs of the V and
replaces them with parallel testing activities, shadowing each of the development activities.
As the project moves down the left leg, the testers carry out static testing(i.e. inspections and
walkthroughs) of the deliverables at each stage. Ideally prototyping and early usability testing would
be included to test the system design of interactive systems at a time when it would be easy to solve
problems. The emphasis would then switch to dynamic testing once the project moves into the
integration leg.
There are several interesting aspects to the W Model. Firstly, it drops the arbitrary and unrealistic
assumption that there should be a testing stage in the right leg for each development stage in the
left leg. Each of the development stages has its testing shadow, within the same leg.
The illustration shows a typical example where there are the same number of stages in each leg, but
it's possible to vary the number and the nature of the testing stages as circumstances require
without violating the principles of the model.
Also, it explicitly does not require the test plan for each dynamic test stage to be based on the
specification produced in the twin stage on the left hand side. There is no twin stage of course, but
this does address one of the undesirable by-products of a common but unthinking adoption of the V
Model; a blind insistence that test plans should be generated from these equivalent documents, and
only from those documents.
A crucial advantage of the W Model is that it encourages testers to define tests that can be built into
the project plan, and on which development activity will be dependent, thus making it harder for
test execution to be squeezed at the end of the project.
However, starting formal test execution in parallel with the start of development must not mean
token reviews and sign-offs of the documentation at the end of each stage. Commonly under the V
Model, and the Waterfall, test managers receive specifications with the request to review and sign
off within a few days what the developers hope is a completed document. In such circumstances test
managers who detect flaws can be seen as obstructive rather than constructive. Such last minute
"reviews" do not count as early testing.
Component Testing
Component testing is a method where testing of each component in an application is done
separately. Suppose, in an application there are 5 components. Testing of each 5
components separately and efficiently is called as component testing.
Component testing is also known as module and program testing. It finds the defects in the
module and verifies the functioning of software.
Component testing is done by the tester.
Component testing may be done in isolation from rest of the system depending on the
development life cycle model chosen for that particular application. In such case the missing
software is replaced by Stubs and Drivers and simulate the interface between the software
components in a simple manner.
Let’s take an example to understand it in a better way. Suppose there is an application
consisting of three modules say, module A, module B and module C. The developer has
Page 8 of 88
STQA NOTES SYMCA
developed the module B and now wanted to test it. But in order to test the module B
completely few of it’s functionalities are dependent on module A and few on module C. But
the module A and module C has not been developed yet. In that case to test the module B
completely we can replace the module A and module C by stub and drivers as required.
Stub: A stub is called from the software component to be tested. As shown in the diagram
below ‘Stub’ is called by ‘component A’.
Driver: A driver calls the component to be tested. As shown in the diagram below
‘component B’ is called by the ‘Driver’.
As discussed in the previous article of the ‘Unit testing’ it is done by the developers where
they do the testing of the individual functionality or procedure. After unit testing is
executed, component testing comes into the picture. Component testing is done by the
testers.
Component testing plays a very important role in finding the bugs. Before we start with the
integration testing it’s always preferable to do the component testing in order to ensure that
each component of an application is working effectively.
Integration testing is followed by the component testing.
Integration Testing
Also after integrating two different components together we do the integration testing.
As displayed in the image below when two different modules ‘Module A’ and ‘Module
B’ are integrated then the integration testing is done.
Page 9 of 88
STQA NOTES SYMCA
In Big Bang integration testing all components or modules are integrated simultaneously,
after which everything is tested as a whole. As per the below image all the modules from
‘Module 1’ to ‘Module 6’ are integrated simultaneously then the testing is carried out.
Advantage: Big Bang testing has the advantage that everything is finished before integration
testing starts.
Page 10 of 88
STQA NOTES SYMCA
Disadvantage: The major disadvantage is that in general it is time consuming and difficult to trace
the cause of failures because of this late integration.
2. Top-down integration testing: Testing takes place from top to bottom, following the control flow
or architectural structure (e.g. starting from the GUI or main menu). Components or systems are
substituted by stubs. Below is the diagram of ‘Top down Approach’:
The tested product is very consistent because the integration testing is basically
performed in an environment that almost similar to that of reality
Stubs can be written with lesser time because when compared to the drivers then
Stubs are simpler to author.
3. Bottom-up integration testing: Testing takes place from the bottom of the control flow
upwards. Components or systems are substituted by drivers. Below is the image of ‘Bottom
up approach’:
Page 11 of 88
STQA NOTES SYMCA
In this approach development and testing can be done together so that the product or
application will be efficient and as per the customer specifications.
Incremental testing:
Another extreme is that all programmers are integrated one by one, and a test is
carried out after each step.
The incremental approach has the advantage that the defects are found early in a
smaller assembly when it is relatively easy to detect the cause.
A disadvantage is that it can be time-consuming since stubs and drivers have to be
developed and used in the test.
Within incremental integration testing a range of possibilities exist, partly depending
on the system architecture.
Functional incremental: Integration and testing takes place on the basis of the functions and
functionalities, as documented in the functional specification.
System Testing
In system testing the behavior of whole system/product is tested as defined by the scope of
the development project or product.
It may include tests based on risks and/or requirement specifications, business process, use
cases, or other high level descriptions of system behavior, interactions with the operating
systems, and system resources.
System testing is most often the final test to verify that the system to be delivered meets the
specification and its purpose.
System testing is carried out by specialist’s testers or independent testers.
System testing should investigate both functional and non-functional requirements of the
testing.
Acceptance Testing
After the system test has corrected all or most defects, the system will be delivered to the
user or customer for Acceptance Testing or User Acceptance Testing (UAT).
Acceptance testing is basically done by the user or customer although other stakeholders
may be involved as well.
The goal of acceptance testing is to establish confidence in the system.
Acceptance testing is most often focused on a validation type testing.
Acceptance testing may occur at more than just a single level, for example:
A Commercial Off the shelf (COTS) software product may be acceptance tested when it is
installed or integrated.
Page 12 of 88
STQA NOTES SYMCA
Interface Testing
System Testing
Regression Testing
UAT
Page 13 of 88
STQA NOTES SYMCA
Unit Testing
A unit test is the smallest testable part of an application like functions, classes, procedures,
interfaces. Unit testing is a method by which individual units of source code are tested to
determine if they are fit for use.
Unit tests are basically written and executed by software developers to make sure that
code meets its design and requirements and behaves as expected.
The goal of unit testing is to segregate each part of the program and test that the individual
parts are working correctly.
This means that for any function or procedure when a set of inputs are given then it should
return the proper values. It should handle the failures gracefully during the course of
execution when any invalid input is given.
A unit test provides a written contract that the piece of code must assure. Hence it has
several benefits.
Unit testing is basically done before integration as shown in the image below.
Method Used for unit testing: White Box Testing method is used for executing the unit test.
1. Issues are found at early stage. Since unit testing are carried out by developers where they test
their individual code before the integration. Hence the issues can be found very early and can be
resolved then and there without impacting the other piece of codes.
2. Unit testing helps in maintaining and changing the code. This is possible by making the codes less
interdependent so that unit testing can be executed. Hence chances of impact of changes to any
other code gets reduced.
3. Since the bugs are found early in unit testing hence it also helps in reducing the cost of bug fixes.
Just imagine the cost of bug found during the later stages of development like during system testing
or during acceptance testing.
4. Unit testing helps in simplifying the debugging process. If suppose a test fails then only latest
changes made in code needs to be debugged.
Page 14 of 88
STQA NOTES SYMCA
Sanity Testing
Sanity testing is usually performed when any minor bug is fixed or when there is a small
change in the functionality. It is a kind of software testing which is done by the testers to
ensure that the functionality is working as expected.
Sanity testing is narrow and deep. Unlike Smoke testing, Sanity testing is focused on one or
two functionalities whereas smoke testing is done to ensure that all the major features of
the project is working fine.
After the changes or fixes are done in the code the software build is available to the testers.
Post installation of the build the testers will do the Sanity testing of the changed
functionality instead of doing the entire regression testing which will take more time.
If the bug fixes and the changed functionalities are not working as expected then the testers
should not accept the build. This failure is caught early in the stage because of the sanity
testing.
It is a surface level testing which follows narrow and deep approach concentrating on
the detailed testing of some limited features
In sanity testing the testers verifies the commands and functions and all the menus in
the product
It is a subset of regression testing
It is performed when we do not have enough time for detailed testing
Sanity testing is usually not scripted
Sanity testing is brief or quick testing in order to ensure that the changes are working
as expected and as per the specification documents
Sanity testing checks the minor bug fixes and the functionality changes are working at
the same time it also ensures that the related functionality is intact.
It saves lots of time and effort because Sanity testing is focused on one or few areas of
functionality
There is no effort put in towards it’s documentation because it’s usually unscripted
It helps in identifying the dependent missing objects.
It is used to verify that a small functionality of the application is still working fine
after a minor change.
Sanity testing focuses only on the commands and functions of the software
It does not go to the design structure level so it’s very difficult for the developers to
understand as how to fix the issues found during the sanity testing
In sanity testing the testing is performed only for some limited features so if there is
any issue in other functionalities then it will be difficult to catch them
Sanity testing is usually unscripted so future references are not available
Page 15 of 88
STQA NOTES SYMCA
Availability Testing
Baseline testing
Compatibility testing
Compliance testing
Configuration Testing
Documentation testing
Endurance testing
Ergonomics Testing
Interoperability Testing
Page 16 of 88
STQA NOTES SYMCA
Installation Testing
Load testing
Localization testing and Internationalization testing
Maintainability Testing
Operational Readiness Testing
Performance testing
Recovery testing
Reliability Testing
Resilience testing
Security testing
Scalability testing
Stress testing
Usability testing
Volume testing
Baseline Testing
Compatibility Testing
Compliance Testing
Documentation Testing
Page 17 of 88
STQA NOTES SYMCA
Endurance Testing
Load Testing
Page 18 of 88
STQA NOTES SYMCA
Load testing involves simulating real-life user load for the target application. It helps
you determine how your application behaves when multiple users hits it
simultaneously.
Load testing differs from stress testing, which evaluates the extent to which a system
keeps working when subjected to extreme workloads or when some of its hardware or
software has been compromised.
The primary goal of load testing is to define the maximum amount of work a system
can handle without significant performance degradation.
Examples of load testing include:
Downloading a series of large files from the internet.
Running multiple applications on a computer or server simultaneously.
Assigning many jobs to a printer in a queue.
Subjecting a server to a large amount of traffic.
Writing and reading data to and from a hard disk continuously.
Maintainability Testing
It basically defines that how easy it is to maintain the system. This means that how easy it is to
analyze, change and test the application or product.
Maintainability testing shall use a model of the maintainability requirements of the
software/system. The maintainability testing shall be specified in terms of the effort required to
effect a change under each of the following four categories:
Performance Testing
Page 19 of 88
STQA NOTES SYMCA
This process can involve quantitative tests done in a lab, such as measuring the response
time or the number of MIPS (millions of instructions per second) at which a system
functions.
Recovery Testing
Reliability Testing
Reliability Testing is about exercising an application so that failures are discovered and
removed before the system is deployed. The purpose of reliability testing is to determine
product reliability, and to determine whether the software meets the customer’s reliability
requirements.
Software reliability is a key part in software quality. The study of software reliability can be
categorized into three parts:
1.Modelling
2.Measurement
3. Improvement
1. Modeling:
Software reliability modeling has matured to the point that meaningful results can be obtained by
applying suitable models to the problem. There are many models exist, but no single model can
Page 20 of 88
STQA NOTES SYMCA
capture a necessary amount of the software characteristics. Assumptions and abstractions must be
made to simplify the problem. There is no single model that is universal to all the situations.
2. Measurement:
Software reliability measurement is naive. Measurement is far from commonplace in software, as in
other engineering field. “How good is the software, quantitatively?” As simple as the question is,
there is still no good answer. Software reliability can not be directly measured, so other related
factors are measured to estimate software reliability and compare it among products. Development
process, faults and failures found are all factors related to software reliability.
3. Improvement:
Software reliability improvement is hard. The difficulty of the problem stems from insufficient
understanding of software reliability and in general, the characteristics of software. Until now there
is no good way to conquer the complexity problem of software. Complete testing of a moderately
complex software module is infeasible. Defect-free software product can not be assured. Realistic
constraints of time and budget severely limits the effort put into software reliability improvement.
Security Testing
Scalability Testing
Stress Testing
Page 21 of 88
STQA NOTES SYMCA
Usability Testing
In usability testing basically the testers tests the ease with which the user interfaces can be
used. It tests that whether the application or the product built is user-friendly or not.
Learnability: How easy is it for users to accomplish basic tasks the first time they encounter
the design?
Efficiency: How fast can experienced users accomplish tasks?
Memorability: When users return to the design after a period of not using it, does the user
remember enough to use it effectively the next time, or does the user have to start over
again learning everything?
Errors: How many errors do users make, how severe are these errors and how easily can
they recover from the errors?
Satisfaction: How much does the user like using the system?
Usability test can be modified to cover many other types of testing such
as functional testing, system integration testing, unit testing, smoke testing etc.
Usability testing can be very economical if planned properly, yet highly effective and
beneficial.
If proper resources (experienced and creative testers) are used, usability test can
help in fixing all the problems that user may face even before the system is finally
released to the user. This may result in better performance and a standard system.
Page 22 of 88
STQA NOTES SYMCA
Usability testing can help in discovering potential bugs and potholes in the system
which generally are not visible to developers and even escape the other type of
testing.
Usability testing is a very wide area of testing and it needs fairly high level of understanding of this
field along with creative mind. People involved in the usability testing are required to possess skills
like patience, ability to listen to the suggestions, openness to welcome any idea, and the most
important of them all is that they should have good observation skills to spot and fix the issues or
problems.
Volume testing
Regression Testing
When any modification or changes are done to the application or even when any small
change is done to the code then it can bring unexpected issues. Along with the new changes it
becomes very important to test whether the existing functionality is intact or not. This can be
achieved by doing the regression testing.
The purpose of the regression testing is to find the bugs which may get introduced
accidentally because of the new changes or modification.
During confirmation testing the defect got fixed and that part of the application started
working as intended. But there might be a possibility that the fix may have introduced or
uncovered a different defect elsewhere in the software. The way to detect these
‘unexpected side-effects’ of fixes is to do regression testing.
This also ensures that the bugs found earlier are NOT creatable.
Usually the regression testing is done by automation tools because in order to fix the defect
the same test is carried out again and again and it will be very tedious and time consuming
to do it manually.
During regression testing the test cases are prioritized depending upon the changes done to
the feature or module in the application. The feature or module where the changes or
modification is done that entire feature is taken into priority for testing.
This testing becomes very important when there are continuous modifications or
enhancements done in the application or product. These changes or enhancements should
NOT introduce new issues in the existing tested code.
This helps in maintaining the quality of the product along with the new changes in the
application.
Page 23 of 88
STQA NOTES SYMCA
1) Corrective Regression Testing: Corrective regression testing can be used when there is no change
in the specifications and test cases can be reused.
2) Progressive Regression Testing: Progressive regression testing is used when the modifications are
done in the specifications and new test cases are designed.
3) Retest-All Strategy: The retest-all strategy is very tedious and time consuming because here we
reuse all test which results in the execution of unnecessary test cases. When any small modification
or change is done to the application then this strategy is not useful.
4) Selective Strategy: In selective strategy we use a subset of the existing test cases to cut down the
retesting effort and cost. If any changes are done to the program entities, e.g. functions, variables
etc., then a test unit must be rerun. Here the difficult part is to find out the dependencies between a
test case and the program entities it covers.
It helps us to make sure that any changes like bug fixes or any enhancements to the
module or application have not impacted the existing tested code.
It ensures that the bugs found earlier are NOT creatable.
Regression testing can be done by using the automation tools
It helps in improving the quality of the product.
If regression testing is done without using automated tools then it can be very tedious
and time consuming because here we execute the same set of test cases again and
again.
Regression test is required even when a very small change is done in the code because
this small modification can bring unexpected issues in the existing functionality.
Page 24 of 88