unit-5
unit-5
Verification
Definition : The process of evaluating software to determine whether the products of a given
development phase satisfy the conditions imposed at the start of that phase.
Verification is a static practice of verifying documents, design, code and program. It includes
all the activities associated with producing high quality software: inspection, design analysis
Verification will help to determine whether the software is of high quality, but it will not ensure
that the system is useful. Verification is concerned with whether the system is well-engineered
and error-free.
• Walkthrough
• Inspection
• Review
Validation
Definition: The process of evaluating software during or at the end of the development process
Validation is the process of evaluating the final product to check whether the software meets
• Testing
• End Users
The distinction between the two terms is largely to do with the role of specifications.
?”
Verification Validation
documents, design, code and program. validating and testing the actual product.
2. It does not involve executing the code. 2. It always involves executing the code.
6. It can catch errors that validation cannot catch. 6. It can catch errors that verification cannot
application and software architecture, high level, bent of integrated modules, and effective final
• The V-Model is a systematic approach with the help of which verification and
validation process can be carried out simultaneously, where the left arm of the model
describes the software verification process and right arm describes the software
validation process.
validation) process in parallel, this model helps us to do the same in order to save time
• For almost every program, it is impossible to make an attempt to test the program with
• The correctness of the output for a particular test input is determined using a testing
oracle.
• A testing oracle is a mechanism that can be used for determining whether a test has pass
or failed.
• For almost every program, it is impossible to attempt to test all executable paths through
Prof of Correctness
Correctness from software engineering perspective can be defined as the adherence to the
specifications that determine how users can interact with the software and how the software
If the software behaves incorrectly, it might take considerable amount of time to achieve the
Important rules:
Below are some of the important rules for effective programming which are consequences of
• Developers should pay attention to the clarity and simplicity of your program.
Software Testing
defects.
Software Testing is evaluation of the software against requirements gathered from users and
system specifications. Testing is conducted at the phase level in software development life
cycle or at module level in program code. Software testing comprises of Validation and
Verification.
• Errors - These are actual coding mistakes made by developers. In addition, there is a
• Fault - When error exists fault occurs. A fault, also known as a bug, is a result of an
• Failure - failure is said to be the inability of the system to perform the desired task.
• Manual - This testing is performed without taking help of automated testing tools. The
software tester prepares test cases for different sections and levels of the code, executes
Manual testing is time and resource consuming. The tester needs to confirm whether
or not right test cases are used. Major portion of testing involves manual testing.
• Automated This testing is a testing procedure done with aid of automated testing tools.
The limitations with manual testing can be overcome using automated test tools.
A test needs to check if a webpage can be opened in Internet Explorer. This can be easily done
with manual testing. But to check if the web-server can take the load of 1 million users, it is
Testing Approaches
• Functionality testing
• Implementation testing
When functionality is being tested without taking the actual implementation in concern it is
known as black-box testing. The other side is known as white-box testing where not only
Exhaustive tests are the best-desired method for a perfect testing. Every single possible value
in the range of the input and output values is tested. It is not possible to test each and every
Black-box testing
It is carried out to test functionality of the program. It is also called ‘Behavioral’ testing. The
tester in this case, has a set of input values and respective desired results. On providing input,
if the output matches with the desired results, the program is tested ‘ok’, and problematic
otherwise.
In this testing method, the design and structure of the code are not known to the tester, and
testing engineers and end users conduct this test on the software.
• Equivalence class - The input is divided into similar classes. If one element of a class
• Boundary values - The input is divided into higher and lower end values. If these values
pass the test, it is assumed that all values in between may pass too.
• Cause-effect graphing - In both previous methods, only one input value at a time is
pairwise testing, the multiple parameters are tested pair-wise for their different values.
• State-based testing - The system changes state on provision of input. These systems
White-box testing
It is conducted to test program and its implementation, in order to improve code efficiency or
In this testing method, the design and structure of the code are known to the tester.
• Control-flow testing - The purpose of the control-flow testing to set up test cases which
covers all statements and branch conditions. The branch conditions are tested for both
• Data-flow testing - This testing technique emphasis to cover all the data variables
included in the program. It tests where the variables were declared and defined and
Testing Levels
Testing itself may be defined at various levels of SDLC. The testing process runs parallel to
software development. Before jumping on the next stage, a stage is tested, validated and
verified.
Testing separately is done just to make sure that there are no hidden bugs or issues left in the
While coding, the programmer performs some tests on that unit of program to know if it is
error free. Testing is performed under white-box testing approach. Unit testing helps
developers decide that individual units of the program are working as per requirement and are
error free.
Integration Testing
Even if the units of software are working fine individually, there is a need to find out if the
units if integrated together would also work without errors. For example, argument passing
System Testing
The software is compiled as product and then it is tested as a whole. This can be accomplished
• Functionality testing - Tests all functionalities of the software against the requirement.
• Performance testing - This test proves how efficient the software is. It tests the
effectiveness and average time taken by the software to do desired task. Performance
testing is done by means of load testing and stress testing where the software is put
under high user and data load under various environment conditions.
• Security & Portability - These tests are done when the software is meant to work on
Acceptance Testing
When the software is ready to hand over to the customer it has to go through last phase of
testing where it is tested for user-interaction and response. This is important because even if
the software matches all user requirements and if user does not like the way it appears or
system as if it is being used in work environment. They try to find out how user would
react to some action in software and how the system should respond to inputs.
• Beta testing - After the software is tested internally, it is handed over to the users to
use it under their production environment only for testing purpose. This is not as yet
the delivered product. Developers expect that users at this stage will bring minute
Regression Testing
Whenever a software product is updated with new code, feature or functionality, it is tested
thoroughly to detect if there is any negative impact of the added code. This is known as
regression testing.
Testing Documentation
Before Testing
Testing starts with test cases generation. Following documents are needed for reference –
• Test Policy document - This describes how far testing should take place before
• Test Strategy document - This mentions detail aspects of test team, responsibility
requirement gathering process. As new requirements come, they are added to this
matrix. These matrices help testers know the source of requirement. They can be traced
• Test Case document - This document contains list of tests required to be conducted. It
includes Unit test plan, Integration test plan, System test plan and Acceptance test
plan.
• Test description - This document is a detailed description of all test cases and
• Test case report - This document contains test case report as a result of the test.
• Test logs - This document contains test logs for every test case report.
After Testing
• Test summary - This test summary is collective analysis of all test reports and logs. It
The two major types of testing typically used to obtain quality software are:
0. Functional-Testing.
1. Structural-Testing.
• It is a type of testing that can be used to assess the features and functionality of the
• Functional-Testing has a special feature with the help of which each and every function
• Checking a software product for its functionalities is the prime objective of functional-
1. Mainline Functions: Main functions and features are tested of the software
product.
messages, if any.
• The structure of a software product is responsible for designing test cases in order to
• Since, the whole structure is known, it is also known as white box testing.
cases from the source code and not from the specifications
0. Statement Coverage: In this, the aim is to achieve 100% statement coverage i.e.
1. Branch Coverage: In this, the aim is to achieve 100% branch coverage i.e. every
2. Path Coverage: This technique corresponds to test all possible paths i.e. it is a
1. Control Flow
o In this, various paths of programs and various test cases are designed to execute
those paths which ultimately results in finding out the cyclomatic complexity of
the programs.
2. Data Flow
programs.
3. Slice Based
o Slicing a software program and testing those slices individually for defects and
errors.
4. Mutation-Testing
o When small changes are made in some certain statements of source code to
check whether the test cases are able to find the errors or not.
o The changes are very small such that they does not affect the overall objective
of the program.
o The goal of mutation testing is to assess the quality of test cases which should
• Testing tools are the software tools which can be used in software for error detection
and corrections. Static Testing tools and Dynamic testing tools are their types.
0. Static-Testing Tools
▪ These tools does not involves in actual input and output i.e. they do not
▪ Flow Analyzers.
▪ Coverage Analyzer.
▪ Interface Analyzer.
1. Dynamic-Testing Tools
▪ These tools are used to test the software system with live data. Dynamic
▪ Test Drivers.
▪ Test Beds.
▪ Emulators.
▪ Mutation Analyzers.
Static Testing
Static testing is a sort of software testing in which an application is tested without executing
any code. In order to discover errors, manual or automated reviews of code, requirement
papers, and document design are performed. Static testing's major goal is to improve the quality
Static testing entails manual or automated document evaluations. This evaluation is carried out
at the initial round of testing in order to detect defects early in the STLC process. It looks over
work documents and gives feedback. Non-execution testing is sometimes known as verification
testing.
• Requirement specifications
• Design document
• Source Code
• Test Plans
• Test Cases
• Test Scripts
• Static testing will detect, anticipate, and correct issues as soon as possible.
• It's used to find faults early in the SDLC process, when they're easier to fix.
• Product quality has improved. Static testing will improve product quality by
• Dynamic testing will become more efficient after static testing. Static testing will
boost Dynamic Testing performance since the code will get cleaner and better when
Static Testing is completed. Static testing necessitates considerable effort and time in
development life cycle, static testing lowered SDLC costs. As a result, changing and
Dynamic Testing
A code is executed during Dynamic Testing. It examines the software system's functionality,
memory/CPU use, and overall system performance. As a result, the term "Dynamic" was
coined.
The major goal of this testing is to ensure that the software product meets the needs of the
business. This type of testing is also known as execution technique or validation testing.
Dynamic testing runs the software and compares the results to what was predicted. Dynamic
testing is conducted at all levels of testing and can be done with either a black or a white box.
• The use of dynamic testing ensures the software product's dependability and
consistency.
• It can be automated with the use of tools that uncover troublesome and sophisticated
• It aids the testing team in identifying the run-time environment's weak points.
• The most significant advantage of dynamic testing versus static testing is the greater
• Unit Testing − Individual units or modules are tested by the developers as part of unit
developers during integration testing. The goal is to figure out which modules perform
• System Testing − System Testing examines the entire system to see if it fits the
Static testing is a type of white box testing that Dynamic testing, on the other hand, occurs
is performed early in the development life cycle. later in the development process.
Static testing covers more statements in less There are fewer statement stages in
It is completed prior to the deployment of the It is completed after the deployment of the
code. code.
It is carried out at the Verification Stage. It is carried out at the Validation Stage.
This method of testing doesn't involve running The execution of code is used for this form
Static testing evaluates both the code and the Dynamic Testing identifies software
A checklist is generated for the testing The test cases are conducted using the
In Static testing,Walkthroughs and code reviews Functional and nonfunctional testing are
Testing Tools:
Tools from a software testing context can be defined as a product that supports one or more
test activities right from planning, requirements, creating a build, test execution, defect
Classification of Tools
S.No. Tool Type Used for Used by
Tools generation
members
tools
tools time
Tools