0% found this document useful (0 votes)
2 views

unit-5

The document discusses the concepts of software verification and validation, highlighting their definitions, methods, and differences. Verification is a static process focused on ensuring that software meets specified requirements without executing the code, while validation is a dynamic process that involves executing the software to ensure it meets customer expectations. The document also covers testing methodologies, levels of testing, and the importance of documentation in the software testing process.

Uploaded by

farazali9045
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

unit-5

The document discusses the concepts of software verification and validation, highlighting their definitions, methods, and differences. Verification is a static process focused on ensuring that software meets specified requirements without executing the code, while validation is a dynamic process that involves executing the software to ensure it meets customer expectations. The document also covers testing methodologies, levels of testing, and the importance of documentation in the software testing process.

Uploaded by

farazali9045
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

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

and specification analysis. It is a relatively objective process.

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.

Methods of Verification : Static Testing

• Walkthrough

• Inspection

• Review

Validation

Definition: The process of evaluating software during or at the end of the development process

to determine whether it satisfies specified requirements.

Validation is the process of evaluating the final product to check whether the software meets

the customer expectations and requirements. It is a dynamic mechanism of validating and

testing the actual product.

Methods of Validation : Dynamic Testing

• Testing

• End Users

Difference between Verification and Validation

The distinction between the two terms is largely to do with the role of specifications.
?”

Verification Validation

1. Verification is a static practice of verifying 1. Validation is a dynamic mechanism of

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.

3. It is human based checking of documents and


3. It is computer based execution of program.
files.

4. Validation uses methods like black box


4. Verification uses methods like inspections,
(functional) testing, gray box testing, and
reviews, walkthroughs, and Desk-checking etc.
white box (structural) testing etc.

5. Validation is to check whether software


5. Verification is to check whether the software
meets the customer expectations and
conforms to specifications.
requirements.

6. It can catch errors that validation cannot catch. 6. It can catch errors that verification cannot

It is low level exercise. catch. It is High Level Exercise.

7. Target is requirements specification, 7. Target is actual product-a unit, a module, a

application and software architecture, high level, bent of integrated modules, and effective final

complete design, and database design etc. product.

8. Verification is done by QA team to ensure that


8. Validation is carried out with the
the software is as per the specifications in the SRS
involvement of testing team.
document.

9. It generally comes first-done before validation. 9. It generally follows after verification.


Software Verification and Validation : The V-Model

• 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.

• Since, we want to carry out the development(software verification) and testing(software

validation) process in parallel, this model helps us to do the same in order to save time

and reduce the cost.

The V-Model : Software Validation and Verification

Impracticality of Testing All Data

• For almost every program, it is impossible to make an attempt to test the program with

all sets of inputs.

• 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.

Impracticality of Testing All Paths

• For almost every program, it is impossible to attempt to test all executable paths through

the project because of the number of combination i.e. combination explosion.

• Developing an algorithm for this purpose is also not possible.

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

should behave when it is used correctly.

If the software behaves incorrectly, it might take considerable amount of time to achieve the

task or sometimes it is impossible to achieve it.

Important rules:

Below are some of the important rules for effective programming which are consequences of

the program correctness theory.

• Defining the problem completely.

• Develop the algorithm and then the program logic.

• Reuse the proved models as much as possible.

• Prove the correctness of algorithms during the design phase.

• Developers should pay attention to the clarity and simplicity of your program.

• Verifying each part of a program as soon as it is developed.

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 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.

Target of the test are -

• Errors - These are actual coding mistakes made by developers. In addition, there is a

difference in output of software and desired output, is considered as an error.

• Fault - When error exists fault occurs. A fault, also known as a bug, is a result of an

error which can cause system to fail.

• Failure - failure is said to be the inability of the system to perform the desired task.

Failure occurs when fault exists in the system.

Manual Vs Automated Testing

Testing can either be done manually or using an automated testing tool:

• 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

the tests and reports the result to the manager.

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

quite impossible to test manually.


There are software and hardware tools which helps tester in conducting load testing, stress

testing, regression testing.

Testing Approaches

Tests can be conducted based on two 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

functionality is tested but the way it is implemented is also analyzed.

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

value in real world scenario if the range of values is large.

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.

Black-box testing techniques:

• Equivalence class - The input is divided into similar classes. If one element of a class

passes the test, it is assumed that all the class is passed.

• 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

tested. Cause (input) – Effect (output) is a testing technique where combinations of

input values are tested in a systematic way.

• Pair-wise Testing - The behavior of software depends on multiple parameters. In

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

are tested based on their states and input.

White-box testing

It is conducted to test program and its implementation, in order to improve code efficiency or

structure. It is also known as ‘Structural’ testing.

In this testing method, the design and structure of the code are known to the tester.

Programmers of the code conduct this test on the code.

The below are some White-box testing techniques:

• 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

being true and false, so that all statements can be covered.

• 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

where they were used or changed.

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

software. Software is tested on various levels -


Unit Testing

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

and data updation etc.

System Testing

The software is compiled as product and then it is tested as a whole. This can be accomplished

using one or more of the following tests:

• 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

various platforms and accessed by number of persons.

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

works, it may be rejected.


• Alpha testing - The team of developer themselves perform alpha testing by using the

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

problems, which were skipped to attend.

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

Testing documents are prepared at different stages -

Before Testing

Testing starts with test cases generation. Following documents are needed for reference –

• SRS document - Functional Requirements document

• Test Policy document - This describes how far testing should take place before

releasing the product.

• Test Strategy document - This mentions detail aspects of test team, responsibility

matrix and rights/responsibility of test manager and test engineer.

• Traceability Matrix document - This is SDLC document, which is related to

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

forward and backward.

While Being Tested


The following documents may be required while testing is started and is being done:

• 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

procedures to execute them.

• 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

The following documents may be generated after testing :

• Test summary - This test summary is collective analysis of all test reports and logs. It

summarizes and concludes if the software is ready to be launched. The software is

released under version control system if it is ready to launch.

The two major types of testing typically used to obtain quality software are:

0. Functional-Testing.

1. Structural-Testing.

Software Quality Testing : Functional-Testing

• It is a type of testing that can be used to assess the features and functionality of the

system or software product.

• Functional-Testing has a special feature with the help of which each and every function

of a software product so that it can be verified with requirement specifications.

Software Quality Testing : Functional-Testing Need

• Checking a software product for its functionalities is the prime objective of functional-

testing. It mainly focuses on:


0. Basic Usability: It deals with basic usability testing of software product which

involves basic functionalities of user interface and navigation through pages.

1. Mainline Functions: Main functions and features are tested of the software

product.

2. Accessibility: To check, how much the software product is accessible to users.

3. Error Conditions: Error conditions either generate warnings or displays error

messages, if any.

Software Quality Testing : Structural-Testing

• The structure of a software product is responsible for designing test cases in order to

test a software product.

• Since, the whole structure is known, it is also known as white box testing.

• Structural-Testing is more technical than functional-testing as it attempts to design test

cases from the source code and not from the specifications

• The major structural testing approaches are:

0. Statement Coverage: In this, the aim is to achieve 100% statement coverage i.e.

each and every statement of program is executed.

1. Branch Coverage: In this, the aim is to achieve 100% branch coverage i.e. every

branch either containing “true” or “false” conditions needs to be executed.

2. Path Coverage: This technique corresponds to test all possible paths i.e. it is a

combination of branch and statement coverage techniques.

Software Quality Testing : Structural Testing Types

• Structural-Testing can broadly be classified into four types. These are:


Ty

pes of Structural Testing

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

o It is a technique used for determining improper use of data inside a software

programs.

o Incorrect variable declaration, Multiple times declaration and assigning values

to variables can be some of the examples.

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 These changes are known as mutants.

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

be powerful enough to fail the mutants in the code.

Software Quality Testing : Testing Tools

• 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

test the actual execution of the software . These tools are:

▪ Flow Analyzers.

▪ Coverage Analyzer.

▪ Interface Analyzer.

1. Dynamic-Testing Tools

▪ These tools are used to test the software system with live data. Dynamic

test tools includes the following:

▪ 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

of software programmes by detecting flaws early in the development process.

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.

Examples of work documents are given below −

• Requirement specifications

• Design document

• Source Code

• Test Plans

• Test Cases

• Test Scripts

• Help or User document

• Web Page content

The following are the primary goals of static testing −

• Static testing will help to reduce manufacturing flaws.

• Static testing will detect, anticipate, and correct issues as soon as possible.

• It is utilised to save time as well as money.

• It's used to find faults early in the SDLC process, when they're easier to fix.

Advantages of Static Testing

• Product quality has improved. Static testing will improve product quality by

identifying faults or problems early in the software development process.

• 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

order to build and maintain high-quality test cases.


• SDLC costs are lower. Because it identifies defects in the early stages of the software

development life cycle, static testing lowered SDLC costs. As a result, changing and

repairing the product requires less effort and time.

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 following are some of the benefits of dynamic testing −

• It verifies the software application's functionality.

• 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

defects in the testing process that static analysis cannot cover.

• 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

number of bugs that can be discovered.

Technique of Dynamic testing are given below −

• Unit Testing − Individual units or modules are tested by the developers as part of unit

testing. It consists source code checking by developers.


• Integration Testing − Individual modules are bundled together and tested by

developers during integration testing. The goal is to figure out which modules perform

as expected after they've been integrated.

• System Testing − System Testing examines the entire system to see if it fits the

requirements specified in the requirement specification document.

Static Testing Dynamic Testing

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.

It is less expensive It is more expensive

Static testing covers more statements in less There are fewer statement stages in

time than dynamic testing. dynamic testing because it just covers a

small area of code

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

any code. of execution.

Static testing evaluates both the code and the Dynamic Testing identifies software

documentation system bottlenecks.

A checklist is generated for the testing The test cases are conducted using the

procedure in Static Testing Methods Dynamic Testing methodology.


Static Testing Dynamic Testing

In Static testing,Walkthroughs and code reviews Functional and nonfunctional testing are

are types of methods both part of dynamic testing.

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

logging and test analysis.

Classification of Tools
S.No. Tool Type Used for Used by

1. Test Management Tool Test Managing, scheduling, defect testers

logging, tracking and analysis.

2. Configuration For Implementation, execution, tracking All Team

management tool changes members

3. Static Analysis Tools Static Testing Developers

4. Test data Preparation Analysis and Design, Test data Testers

Tools generation

5. Test Execution Tools Implementation, Execution Testers

6. Test Comparators Comparing expected and actual results All Team

members

7. Coverage measurement Provides structural coverage Developers

tools

8. Performance Testing Monitoring the performance, response Testers

tools time

9. Project planning and For Planning Project

Tracking Tools Managers

10. Incident Management For managing the tests Testers

Tools

You might also like