Software Testing Tutorial #27 - Verification and Validation in Software Testing

Software Testing Mentor
23 Nov 202014:18

Summary

TLDRThis tutorial explains the key differences between verification and validation in software testing, a crucial concept often addressed in interviews. It highlights how verification (static testing) involves reviewing documents and code without execution, while validation (dynamic testing) involves executing the software to test its functionality. The tutorial emphasizes the importance of early defect detection in verification to reduce costs and effort. It also covers various testing techniques such as code reviews for verification and unit, integration, and system testing for validation, providing examples and tips for explaining these concepts confidently in interviews.

Takeaways

  • 🔍 Verification is static testing, while validation is dynamic testing.
  • 📄 Verification involves reviewing documents and code without execution (e.g., code review), focusing on identifying defects early in the development phase.
  • 🚀 Validation includes executing the actual software or application to check for defects in the functional behavior (e.g., launching an e-commerce website).
  • 📊 Verification checks if the software aligns with requirements and design documents, while validation ensures the final product meets user needs.
  • ⚙️ Verification helps in identifying issues early in the development process, reducing the cost and effort of fixing defects.
  • 🛠️ Code reviews, walkthroughs, and inspections are examples of verification techniques used to find issues before code execution.
  • 🔧 Validation is performed during testing phases like unit testing, integration testing, system testing, and acceptance testing.
  • 💡 In verification, defects are found by analyzing documents and code, whereas in validation, bugs are found during software execution.
  • ⏳ Dynamic testing (validation) is conducted once the code is complete, while static testing (verification) happens throughout development.
  • 💰 Identifying defects early through verification reduces the cost and complexity of fixing issues later in the software development lifecycle.

Q & A

  • What is the main difference between verification and validation in software testing?

    -Verification is static testing, where the code is not executed but documents and code are reviewed manually. Validation is dynamic testing, which involves executing the code to check if the software meets the required specifications.

  • What is static testing in the context of software verification?

    -Static testing refers to the process of manually checking documents, code, or designs without executing the software. It includes activities like code reviews, inspections, and walkthroughs.

  • What is dynamic testing in the context of software validation?

    -Dynamic testing involves executing the software to validate its functionality. It ensures that the software behaves as expected when running, such as testing an e-commerce website by launching and interacting with the application.

  • How is the V-model related to verification and validation?

    -In the V-model, verification activities are performed on the left side, where documents and designs are reviewed. Validation takes place on the right side after the code is ready and executed in various testing phases such as unit, integration, and system testing.

  • Why is it important to find defects early during verification?

    -Finding defects early in the verification phase saves time and cost. If issues are identified before coding, they can be corrected before they propagate to the design or code, reducing the complexity and cost of fixing them later in the development cycle.

  • What is an example of verification in software testing?

    -An example of verification is a code review, where developers manually inspect the code for adherence to coding standards without executing the program.

  • What is an example of validation in software testing?

    -An example of validation is launching an e-commerce website, navigating through it, and performing functional tests like adding items to the cart to ensure the site works as expected.

  • What types of defects are typically found during verification?

    -Verification helps identify defects in documentation, design flaws, or missing requirements. These issues can be caught early without executing the software.

  • What are some testing techniques used in verification?

    -Common testing techniques in verification include code reviews, walkthroughs, inspections, and technical reviews, which do not involve running the code but focus on reviewing the structure and design.

  • What testing techniques are used in validation?

    -Validation techniques include dynamic tests such as unit testing, integration testing, system testing, acceptance testing, and regression testing, all of which involve executing the software.

Outlines

00:00

🧑‍💻 Introduction to Verification and Validation in Software Testing

This paragraph introduces the key topic of verification and validation in software testing, emphasizing their importance in interviews for both freshers and experienced testers. It explains that verification (static testing) and validation (dynamic testing) are often discussed together, with verification being a non-execution activity and validation involving code execution. It also sets the stage for further explanation by referencing the V-model, which is central to understanding the difference between these two concepts.

05:02

📄 Verification: Checking Documentation without Code Execution

Here, the focus is on verification, described as a manual process where code is not executed. The purpose of verification is to review documentation like requirement and design documents, as well as the code itself through activities like peer code reviews. By examining these documents, teams can ensure that best practices and standards are followed without executing any software. The paragraph provides examples such as requirement verification and code review to explain static testing in greater detail.

10:05

🖥️ Validation: Testing Software through Code Execution

This paragraph contrasts validation with verification by explaining that validation involves dynamic testing, where the actual code is executed. After the code is written, it is installed in the test environment, and testers validate its functionality by running it. For example, in an e-commerce website, validation happens when the site is deployed and testers interact with it by launching it in a browser. This process verifies whether the software functions as expected, making it a dynamic activity.

🔍 Early Bug Detection through Verification

This paragraph explains the importance of finding defects early in the software development lifecycle through verification. In the V-model, verification is done during the early stages, such as requirement and design phases, allowing teams to identify and fix defects before they are implemented into the code. Early detection reduces the cost and effort needed to resolve issues later. If defects are found only during validation, after the code is written, it may require significant rework and resource expenditure.

📊 Cost-Effectiveness of Early Defect Detection

This paragraph emphasizes how early defect detection during verification is more cost-effective than finding bugs during validation. When defects are identified early in the development process, they can be resolved with minimal resources. However, if issues are found later in the validation phase, the defect must be traced back to earlier stages, such as requirements or design, leading to higher costs and more extensive rework.

🔁 Verification Techniques: Code Review, Walkthroughs, and Inspections

In this paragraph, common verification techniques like code reviews, technical reviews, walkthroughs, and inspections are discussed. These techniques ensure that the code and documentation are up to standard without executing the software. This process is essential in static testing to catch issues early, especially during the design and coding phases.

🧪 Validation Testing Types: Unit, Integration, System, and More

This paragraph outlines the different types of testing performed during validation, including unit, integration, system, acceptance, and regression testing. All of these require the actual software to be available and running to ensure that it meets the specified requirements. This dynamic testing phase is where code execution is necessary to validate the functionality and performance of the application.

💡 Key Points for Interviews: Verification vs. Validation

The final paragraph summarizes the key points about verification and validation, preparing readers for interviews. It reiterates the main differences between static testing (verification) and dynamic testing (validation), providing confidence that these concepts, when explained with examples, will be sufficient to answer related interview questions. Additionally, it encourages further exploration of other points and examples to deepen understanding.

Mindmap

Keywords

💡Verification

Verification in the context of software testing refers to the process of manually checking documents or code without executing it. It is akin to static testing, where one reviews requirements, design documents, or code for adherence to standards and completeness. The video emphasizes that verification is crucial for catching errors early in the development process, which is cost-effective and minimizes the risk of缺陷s propagating to later stages. An example from the script is when developers conduct a code review to ensure best practices and coding standards are followed.

💡Validation

Validation is the process of checking that the software meets the customer's requirements and is fit for its intended use. It is dynamic testing, where the software is executed to verify its functionality. The video explains that validation is akin to dynamic testing, where the software is launched in a test environment, and actual usage scenarios are tested. An example given is launching an e-commerce website and testing user registration or other functionalities.

💡Static Testing

Static testing is a method of software testing where the software is examined without executing its code. It involves reviewing documents and code for syntax errors, adherence to coding standards, and logical consistency. The video script mentions that static testing is synonymous with verification and is performed early in the development cycle to identify potential issues before the code is executed.

💡Dynamic Testing

Dynamic testing involves executing the software to validate its functionality and behavior. It is a form of testing where the software is run in a test environment to ensure it works as intended. The video script explains dynamic testing as being synonymous with validation, where the software is tested for functionality after it has been implemented and deployed.

💡V Model

The V Model is a software development model that illustrates the relationship between software development phases and testing phases. The video script uses the V Model to explain the difference between verification (which occurs on the left side of the V, dealing with requirements and design) and validation (which occurs on the right side of the V, dealing with the execution of the code).

💡Code Review

A code review is a process where a developer's code is examined by peers to ensure it meets coding standards and best practices. It is a key part of verification or static testing, as discussed in the video. The script mentions that code review is a common practice in software development where developers send their code to team leads or peers for review.

💡Defects

Defects in software testing refer to errors or faults in the software that cause it to behave incorrectly or fail to meet requirements. The video emphasizes the importance of finding and fixing defects early in the development cycle through verification to reduce costs and avoid complications in later stages.

💡Testing Techniques

Testing techniques are methods used to conduct software testing. The video script differentiates between techniques used for verification (like code review, technical review, walk-through, and inspection) and those used for validation (like unit testing, integration testing, system testing, acceptance testing, and regression testing).

💡Cost of Defect

The cost of a defect refers to the financial and resource implications of fixing a defect in software. The video script explains that finding defects early through verification is less costly than fixing them during validation or dynamic testing, where they may require significant redesign and retesting.

💡E-Commerce Website

The e-commerce website is used as an example throughout the video script to illustrate the concepts of validation and dynamic testing. It is used to demonstrate how software is tested for functionality once it is deployed and available for use, such as testing the registration process or product purchasing.

Highlights

Difference between verification and validation is a common question in software testing interviews.

Verification is static testing, while validation is dynamic testing.

Static testing (verification) does not involve code execution, but focuses on reviewing documentation, design, or code manually.

Dynamic testing (validation) involves executing the software to test its functionality after it has been developed.

Code review is an example of static testing, where developers manually check the code for best practices and coding standards.

Validation includes testing the functionality of an application, such as launching an e-commerce website and interacting with it to verify user processes.

Verification helps in finding defects early in the software development lifecycle, which reduces the cost of fixing them.

In the V-Model of software development, verification happens in the earlier stages (requirements and design), while validation occurs after the code is written.

Finding defects early in the verification phase prevents issues from flowing into the design and code, saving time and resources.

Validation tests can include unit testing, integration testing, system testing, acceptance testing, and regression testing.

The cost of fixing defects found during validation is higher, as it involves more phases and resources to correct the issues.

In static testing, techniques like code review, walkthroughs, inspections, and peer reviews are used.

During dynamic testing, the actual software is executed, and bugs are found by running test cases on the built application.

The V-Model diagram is helpful in interviews to explain the phases of verification and validation.

Combining static and dynamic testing methods ensures that software is thoroughly verified and validated before release.

Transcripts

play00:00

hello everyone welcome again in the

play00:02

software testing tutorial

play00:03

we are going to learn the difference

play00:05

between verification

play00:07

and validation now this is very

play00:10

important question

play00:11

and concept in terms of interviews

play00:15

so most of the software testing

play00:16

interviews if you are fresher or even

play00:18

you know experience in software testing

play00:20

and you are going for the interview

play00:22

you will be asked most of the time this

play00:24

particular question what is the

play00:25

difference between verification

play00:27

validation or static testing and dynamic

play00:30

testing

play00:30

now verification and validation or

play00:32

verification versus validation

play00:34

uh is similar to what is static testing

play00:38

and dynamic testing so verification

play00:40

is static testing so you can say static

play00:44

for the verification and validation is

play00:47

dynamic testing right so this is

play00:50

also asked what is the difference

play00:52

between static testing

play00:54

and dynamic testing right so i'll write

play00:57

it here

play01:00

so if somebody asks what is the

play01:02

difference between verification

play01:04

and validation or static testing and

play01:06

dynamic testing

play01:07

these are the points that you can

play01:09

explain

play01:11

for both of these questions because

play01:13

verification

play01:14

is static testing or static testing is

play01:16

verification and validation is dynamic

play01:18

testing

play01:19

or dynamic testing is validation right

play01:22

and this verification

play01:23

versus validation came from the v model

play01:26

okay and i'll explain what exactly

play01:28

verification versus validation means and

play01:30

what are the difference between

play01:32

verification and validation okay so

play01:35

let's start with the point one basically

play01:37

so here if you see the first point says

play01:39

process of checking document documents

play01:41

manually right so

play01:43

when we say verification verification is

play01:46

the process

play01:46

of manual verification or the static

play01:49

verification

play01:50

so static testing as the name suggests

play01:53

you do not

play01:54

execute the code in verification so you

play01:56

basically

play01:57

go through browse through the

play01:58

documentation or any uh

play02:00

documentation that is present or even

play02:02

the code that is present

play02:04

for your software right so for example

play02:06

software requirement documentation

play02:08

your plans your design documentation the

play02:10

code

play02:11

that is being written by the developers

play02:13

so the code review happens so when we

play02:15

say code review

play02:17

developers have a look at the code and

play02:20

basically provide the review so they do

play02:22

not execute but they

play02:24

just have a look or have a peer review

play02:27

so

play02:27

if i'm i'm a developer and i'm writing

play02:30

the code i'll send the code for review

play02:31

to another person maybe my team lead

play02:34

to have a review right and in the review

play02:37

the other person will just have a look

play02:39

at

play02:39

the code and he'll see whether i have

play02:41

followed the best practices

play02:43

or uh whether all the coding standards

play02:46

have been followed or not

play02:48

right so if somebody is verifying

play02:52

those sort of things without executing

play02:54

the code

play02:55

or just going through the plans and

play02:57

design and

play02:58

team is basically analyzing whether the

play03:01

requirement document that is there

play03:03

it has all the required details in it or

play03:06

whether there are any gaps

play03:08

so all those sort of analysis wherein

play03:10

the execution part is not involved

play03:13

and manual verification is done is the

play03:16

verification or

play03:17

static testing right when we come to

play03:20

validation validation is basically the

play03:22

dynamic testing right so when we say

play03:24

validation

play03:25

in the validation when you have the code

play03:28

written and the code available

play03:31

to you as a tester as a package that can

play03:34

be installed and executed

play03:36

so in the validation what happens is you

play03:40

once you get the build

play03:41

the build is installed in the test

play03:42

environment and

play03:44

the actual you actually launch the

play03:47

application or you

play03:48

you you know invoke the application

play03:51

uh by executing the software say for

play03:53

example if you talk about the e-commerce

play03:55

website so e-commerce

play03:57

website if you're building an e-commerce

play03:59

website so verification will be

play04:01

going through the requirement document

play04:03

that is given by the customer

play04:05

okay but validation will be once those

play04:08

requirements are

play04:09

implemented and deployed into the

play04:12

server and you are actually launching

play04:15

the web page

play04:17

or ecommerce portal on the browser so

play04:19

you are opening the browser

play04:21

on your computer and you are providing

play04:23

the url so www whatever name

play04:26

and hitting enter and then you are

play04:28

launching that particular web page

play04:30

that uh you know verify that is

play04:33

validation right so that is

play04:34

what dynamic testing is you are actually

play04:36

launching the url and then you are

play04:39

actually trying to register or trying to

play04:42

do the test cases

play04:43

after launching the application so that

play04:45

is what validation

play04:46

is so this is very you know um key

play04:49

difference that you need to

play04:50

understand and you can take examples of

play04:53

e-commerce website or any other examples

play04:56

that you can think of

play04:57

right to explain in the interview

play05:01

so that is the first point now coming to

play05:03

the second point so verification does

play05:05

not involve executing the code

play05:07

so which i've already covered in the

play05:08

first point so in the verification you

play05:10

just verify

play05:11

the documentation say for example you

play05:13

are going through the requirement or

play05:15

the design that has been made by the

play05:17

tech lead tech lead is

play05:19

walking through the whole team with that

play05:21

design and taking the feedback

play05:23

right so that does not involve any code

play05:26

execution however

play05:27

in the case of validation as we have

play05:29

seen that once that design is

play05:31

implemented into the application

play05:33

an application is being launched into

play05:36

the browser

play05:37

in case of e-commerce website then that

play05:40

is the

play05:40

validation because you are doing the

play05:43

code execution and validating the

play05:45

functionality right

play05:46

so when i launch the browser when i hit

play05:48

the server then there is some

play05:50

execution that happens behind the scene

play05:53

and that's when

play05:54

i'm getting the results on my web page

play05:57

so

play05:57

if there is a code execution involved

play06:00

then that is validation

play06:01

right now the third point is basically

play06:04

in the verification you find bugs or

play06:06

defects very early

play06:08

the reason for that is say for example

play06:12

in the v model as we have seen so

play06:14

usually b model it will look like this

play06:17

right let me remove this line here okay

play06:20

so v model will usually look like a v

play06:24

okay so here we have the coding okay

play06:27

if you haven't watched the v model

play06:30

of software development please go back

play06:32

and watch the v model

play06:34

in my previous tutorial in the previous

play06:36

tutorials of the same series

play06:38

so you'll understand what exactly view

play06:39

model is so usually

play06:41

in the model you have the requirement

play06:44

right and then you have you know design

play06:47

different levels of design

play06:49

phases and you know other design so low

play06:52

level design

play06:53

high level design and similarly here you

play06:55

have the

play06:56

different phases of testing so unit you

play06:59

know integration

play07:00

system and acceptance right

play07:03

so these these will be the phases so

play07:05

when we say verification so

play07:07

anything at this side of this v model

play07:10

is verification or the testing team's

play07:13

involvement or

play07:14

the team that is doing the verification

play07:16

at this side

play07:17

of the software development model is

play07:21

verification okay so this is

play07:23

verification

play07:24

because here you just have physical you

play07:26

just have the requirement document and

play07:28

then that those requirement documents

play07:30

are being converted into the design

play07:31

documents

play07:32

then design documents is basically you

play07:34

know being

play07:36

converted into the actual code and then

play07:38

code is reviewed so

play07:39

all the verification activities happen

play07:41

in this

play07:42

you know section here because

play07:45

team do not actually execute the code

play07:48

because the code is not ready so code

play07:50

gets ready here

play07:51

and in this side of the

play07:54

v model once the code is ready and the

play07:58

code is bundled

play07:59

as the build and available to the test

play08:02

team

play08:03

that's when the actual execution or

play08:06

dynamic testing starts right so here

play08:08

it's verification or static testing

play08:11

so this is static testing in this side

play08:14

and here

play08:14

it's dynamic okay so dynamic testing

play08:17

because

play08:18

the code is available as build it will

play08:20

be deployed and

play08:21

then you launch the application and

play08:23

you'll test the application in different

play08:25

phases

play08:26

that are available here right so this is

play08:28

validation

play08:30

or dynamic testing okay

play08:33

so when we talk about the third point

play08:36

it says bugs and defects are found early

play08:40

so what it means is because the code

play08:43

gets ready

play08:44

very late in the cycle so when you do a

play08:47

good verification

play08:48

techniques you are basically going

play08:50

through the requirement documents

play08:52

very early in the phase and figuring out

play08:54

if there are any gaps

play08:56

and if you are able to find any gaps in

play08:58

the requirement phase itself

play09:00

then those gaps will be rectified in the

play09:03

requirement phase

play09:04

and they will not flow to the design to

play09:07

other design and to the code

play09:09

right so that is why when we say find

play09:12

defects early in the cycle

play09:14

this verification helps a lot in finding

play09:17

defects early

play09:18

rather than if you do not do the

play09:20

verification techniques in these phases

play09:23

what will happen is if there is

play09:24

something wrong with the requirement

play09:26

that will go into the design

play09:28

same design will get implemented into

play09:30

the code and

play09:31

the actual defect will be found very

play09:34

late when the very

play09:35

when the validation will start somewhere

play09:37

here with the testing team

play09:40

so in that particular case if a defect

play09:42

is found here

play09:43

then it has to go back and basically

play09:47

all the way through it has to come back

play09:49

from the requirement so basically

play09:51

the requirement has to be updated

play09:52

because of this defect then design needs

play09:54

to be changed

play09:55

right and then accordingly depending on

play09:58

how severe the defect is

play10:01

all the phases or the actual fix

play10:04

that is required to implement that

play10:06

particular defect

play10:08

will be a long and it will require a lot

play10:11

of resources

play10:11

and money to basically implement that

play10:14

right but if that same gap is found here

play10:16

it can be rectified directly

play10:19

here okay so that is why finding bugs

play10:22

and defects early in cycle when we say

play10:25

we do verification because you found the

play10:27

defects here

play10:28

or if say for example there is a defined

play10:30

design defect it can be found

play10:32

here or low level design defect can be

play10:34

found here if you are doing

play10:35

verification right now finding bugs and

play10:38

defect during dynamic testing phase so

play10:40

in

play10:41

the validation you can only find defects

play10:44

when you are actually executing the

play10:45

software

play10:46

right so that is why you find bugs

play10:49

during the dynamic testing phase

play10:52

uh then the fourth point is again i have

play10:54

explained cost of defect is less because

play10:57

you found the defect early in the cycle

play10:59

and

play11:00

if you found the defect early in the

play11:02

cycle to fix those defect

play11:04

is really very easy and very

play11:08

less cost if the same defect flows

play11:12

through to the later phases of the

play11:14

software

play11:15

development life cycle then that takes

play11:17

quite a bit of

play11:18

cost and effort to fix it right so

play11:21

that's what we have understood as part

play11:22

of

play11:23

point number three right so let me

play11:26

rub this okay so this diagram is very

play11:31

important in the interview if you are

play11:33

trying to explain to the interviewer go

play11:35

through

play11:36

and explain this with confidence with

play11:39

the examples

play11:40

okay so understand this what is static

play11:43

testing dynamic testing validation

play11:45

verification and then explain with

play11:47

example and you will be you know like

play11:49

very

play11:49

um you know confident in explaining the

play11:52

concept okay

play11:53

so now coming back to the fifth point so

play11:56

few types of you know testing in the

play11:58

verification

play11:59

are so basically reviews if you know

play12:01

about right so code review would have

play12:03

definitely heard

play12:04

code review is very widely used right so

play12:07

if you have worked

play12:08

even in any software development

play12:10

approach

play12:11

uh code review is always done so when

play12:14

the developer writes the code he sends

play12:16

the code to the peer

play12:17

or the other team members to basically

play12:19

review

play12:20

for the standards for you know other

play12:23

aspects of the code

play12:24

so any sort of reviews technical review

play12:27

walk through inspection or code review

play12:29

these are some of the techniques testing

play12:31

techniques

play12:32

for verification or static testing okay

play12:36

now if we talk about the validation um

play12:39

it is unit testing integration system

play12:42

acceptance regression and there are many

play12:43

more

play12:44

testing types that you perform

play12:47

as part of software validation because

play12:50

all of these

play12:51

testing here they will require the

play12:53

actual software built to be available to

play12:55

be deployed and

play12:56

you actually execute the code or you run

play12:59

the software

play13:00

or launch the software in order to do

play13:03

any

play13:03

sort of any of these testing right so

play13:06

these are some of the

play13:07

testing types that you do into the

play13:10

validation right and these are the

play13:13

testing type for the verification or the

play13:15

static testing

play13:16

okay so these are some of the key points

play13:19

basically there are many more points and

play13:20

you can come up with many more

play13:22

points from the same setup point or

play13:25

there will be you know if you

play13:26

give a little bit of thought around

play13:28

verification validation there will be

play13:29

many more points that you can

play13:31

google out over the internet and you

play13:33

will find

play13:34

but these are some of the key points

play13:36

which will be good enough for you to

play13:38

understand

play13:39

and explain it with example to the

play13:42

interviewer and this should be

play13:44

you know more than enough to explain

play13:47

what is verification validation or

play13:49

static testing

play13:50

and dynamic testing and what are the

play13:52

differences between static testing and

play13:54

dynamic testing because these are the

play13:56

key points

play13:57

that you should know and rest all points

play14:00

will be you know just an

play14:01

addition to these points all right so

play14:03

that's all for this tutorial on

play14:06

verification and validation or

play14:08

static testing versus dynamic testing

play14:11

hope it was helpful and clear please do

play14:14

share and subscribe and thank you very

play14:15

much for watching

Rate This

5.0 / 5 (0 votes)

Связанные теги
VerificationValidationStatic TestingDynamic TestingSoftware TestingCode ReviewV-ModelTesting PhasesInterview PrepBug Detection
Вам нужно краткое изложение на английском?