What is Boundary value analysis and Equivalence partitioning?


Boundary value analysis and Equivalence partitioning, explained with simple example:

Boundary value analysis and equivalence partitioning both are test case design strategies in black box testing.

Equivalence Partitioning:

In this method the input domain data is divided into different equivalence data classes. This method is typically used to reduce the total number of test cases to a finite set of testable test cases, still covering maximum requirements.

In short it is the process of taking all possible test cases and placing them into classes. One test value is picked from each class while testing.

E.g.: If you are testing for an input box accepting numbers from 1 to 1000 then there is no use in writing thousand test cases for all 1000 valid input numbers plus other test cases for invalid data.

Using equivalence partitioning method above test cases can be divided into three sets of input data called as classes. Each test case is a representative of respective class.

So in above example we can divide our test cases into three equivalence classes of some valid and invalid inputs.

Test cases for input box accepting numbers between 1 and 1000 using Equivalence Partitioning:
1) One input data class with all valid inputs. Pick a single value from range 1 to 1000 as a valid test case. If you select other values between 1 and 1000 then result is going to be same. So one test case for valid input data should be sufficient.

2) Input data class with all values below lower limit. I.e. any value below 1, as a invalid input data test case.

3) Input data with any value greater than 1000 to represent third invalid input class.

So using equivalence partitioning you have categorized all possible test cases into three classes. Test cases with other values from any class should give you the same result.

We have selected one representative from every input class to design our test cases. Test case values are selected in such a way that largest number of attributes of equivalence class can be exercised.

Equivalence partitioning uses fewest test cases to cover maximum requirements.

Boundary value analysis:

It’s widely recognized that input values at the extreme ends of input domain cause more errors in system. More application errors occur at the boundaries of input domain. ‘Boundary value analysis’ testing technique is used to identify errors at boundaries rather than finding those exist in center of input domain.

Boundary value analysis is a next part of Equivalence partitioning for designing test cases where test cases are selected at the edges of the equivalence classes.

Test cases for input box accepting numbers between 1 and 1000 using Boundary value analysis:
1) Test cases with test data exactly as the input boundaries of input domain i.e. values 1 and 1000 in our case.

------------

2) Test data with values just below the extreme edges of input domains i.e. values 0 and 999.

3) Test data with values just above the extreme edges of input domain i.e. values 2 and 1001.

Boundary value analysis is often called as a part of stress and negative testing.

Note: There is no hard-and-fast rule to test only one value from each equivalence class you created for input domains. You can select multiple valid and invalid values from each equivalence class according to your needs and previous judgments.

E.g. if you divided 1 to 1000 input values in valid data equivalence class, then you can select test case values like: 1, 11, 100, 950 etc. Same case for other test cases having invalid data classes.

This should be a very basic and simple example to understand the Boundary value analysis and Equivalence partitioning concept.

Share your examples below.


The Best Software Testing Training You'll Ever Get!

software testing QA training

217 comments ↓

#1 Beena on 10.23.08 at 3:31 am

Nice…
Thanx….

#2 lAKSHMI on 10.23.08 at 4:10 am

Hi ,
Thanks for updating me.

Can u please hepl me about the certification in Testing as i planning to write.

First i need what is the Use of this certifications

#3 sathish on 10.23.08 at 4:10 am

Greate article……

Thank u….

#4 Deepa on 10.23.08 at 4:18 am

hi vijay,

It’s a very good article. Thanks for sharing knowledge.

Regards,
Deepa

#5 kishore on 10.23.08 at 4:24 am

I would like to add one formulae here for boundary value.
n, n+1, n-1 one can use this formulae to calculate BV. It can be used for min and max value. As in the above example. 1-1000
BV= 1,2,0 and 1000,1001,999

Regards
kishore

#6 dhinesh on 10.23.08 at 4:46 am

Very good explanations

dhinesh
grdhinesh@gmail.com

#7 Naushad Pasha on 10.23.08 at 4:59 am

This kind of Articles helps every one. Good Work.

#8 rakesh on 10.23.08 at 6:38 am

hi friends can anybody explain about traceability in detail with detail,,matrix

#9 rakesh on 10.23.08 at 6:39 am

hi friends can anybody explain about traceability matrix in detail with example

#10 Manoj Upadhyay on 10.23.08 at 7:07 am

Hi Vijay,

Thanks to Sharing knowledge

Regards
Manoj Upadhyay

#11 Manoj Upadhyay on 10.23.08 at 7:11 am

Hi Friends ,

Can anybody tell me For I.s.t.Q.B Certification and is it indispensible condition to have atleast 2 yr. exp. in mannual My mail is is :-
Er4testing@yahoo.com

Thanks In Advance

Regards

manoj upadhyay

#12 Mohit Verma on 10.23.08 at 7:11 am

Hi!

Nice Way to explain with simple example. Keep the good work coming.

#13 Senthil on 10.23.08 at 8:19 am

Why we have to methods to test the same condition.. Is it intenstional ?

#14 kishore on 10.23.08 at 8:33 am

Senthil

Using Equivalence partition:
you can divide input data into different class as valid and invalid class
eg: 1-1000
valid class-1-1000
Invalid class-less than 1
invalid class-more than 1000

Using BV: now using the above class you write your test cases on boundaries. you can use above formulae posted in my comment to find the boundary values for diffrenet classes.

Both the techniques are used simultaneously to design test case.
First you divide your input data into valid and invalid class using Equivalence partioning and

Second use boundary value to decide on the boundaries of each class.

Regards
kishore

#15 Ganesh.p on 10.23.08 at 8:35 am

Hi to every one,

This kind of articles help in Testing and

we must share the real time experience also

so i preparing that one as soon as i share to everyone

thanks

good luck to everyone

Be prepare for coming time in IT

#16 Sabzar Ahmad on 10.23.08 at 10:13 am

Great!!! Simple, precise & accurate way of making others to understand the concepts… Thanks

#17 Suhas M on 10.23.08 at 11:07 am

Good writing Vijay !!!
But, I have a doubt here. When you apply the equivalence class partitioning for the input in the above example you have had 3 partitions – within the limit, above upper limit and below lower limit. Now my question is – is this equivalence class partitioning limited to this, if thats the case then i dont see there is much difference in EP and BVA. If you apply BVA, EP is autometically applied.
Hope I am not very incorrect in my understanding, your views on this please.

Regards, Suhas M

#18 Suhas M on 10.23.08 at 11:12 am

@Kishore,

Do we apply the BVA for all the classes i.e valid class as well as invalid class? Or is it enough to apply the BVA for valid class only. It would be great if you could explain this with an example.

Regards, Suhas M.

#19 G.Mallikarjun on 10.23.08 at 2:41 pm

Hello,

What a beautiful explanation.

#20 Sreenivasa Rao on 10.23.08 at 2:48 pm

Cld anybody pls help me in answering the following question – how many test cases will be generated for three check boxes and one button

#21 kishore on 10.23.08 at 3:25 pm

Suhas
Nice thought!!
As per my knowledge we can use BVA for both the classes.
For eg: If I consider 5-50 a range then my
valid class: 5-50
invalid class: lets say =49.99 also we use the same technique.

#22 kishore on 10.23.08 at 3:36 pm

Suhas
Nice thought!!
As per my knowledge we can use BVA for both the classes.
For eg: If I consider 5-50 a range then my
valid class: 5-50
invalid class: lets say (less than =4.99) and
other invalid class would be (greater than=49.99 )
Instead of writing test cases on all the values we can use BVA to minimise the no of test cases.

#23 shekhar rai on 10.23.08 at 8:18 pm

thanks
its very nice

#24 life99joy on 10.23.08 at 11:04 pm

Said nicely and simple. I’d like to add one more check (I was asked that in the interview) – would probably be a good idea to check the values somewhere in the middle. Let’s say if we’re testing values 1 to 100,000 we should also look into 1,000; 10,000, ect.

#25 Suhas M on 10.24.08 at 6:28 am

@Kishore
I am not clear yet, :(
For a valid range of input – if you apply BVA, its simililar to EP. So why do we need to apply EP and then BVA, because if you directly apply BVA to the above example it goes well.

I would like to explain what I have understood by BVA and EP by slightly modifying the above example.

Lets say a system accepts the input as number that ranges form 100-100000 or alphabetical/alphanumeric input with 3-6 char.
Now my classes will be
1.Only numbers.
2.Only alphabets.
3.Alphanumeric.
4.Numbers with special characters.
5.Alphabets with special characters.
6.Alphanumeric with special characters.
Out of this if you apply BVA for 1,2 and 3 its good enough.

Let me know if my understanding is correct. If you think I am wrong helpme understanding with explaining your views with my example.

Regards, Suhas M.

#26 kishore on 10.24.08 at 6:41 am

Suhas
Consider below example
Suppose my valid class is 10-100
If I am asked to write test cases, I would apply BVA to this class to minimize my number of test cases. Otherwise it would go from 10 to 100
Using BVA my test cases have reduced to SIX. Three for min value and three for max value.

9,10,11 and 99,100,101

Regards
kishore

#27 Suhas M on 10.24.08 at 6:48 am

@Kishor,
I completly agree with what you say about BVA, now for the input set 10-100 how would you apply EP ?
PS: My question is more to do with EP in the above example given by Vijay.

Hey Vijay, could you throw some light on this as well? Some how am getting a feel that the EP what you have explained is either incomplete or you have not have not explained it with a very good example.

Regards, Suhas M

#28 kishore on 10.24.08 at 7:20 am

Excellent brainstorming session Suhas
Well put it simple
Use ECP to divide input domain into equivalent class as you pointed out in your example and then use BVA to decide test cases on extreme edges.

#29 sharan on 10.24.08 at 9:44 am

very nice article about BVA and EP

regards,
Sharan

#30 Qastation on 10.24.08 at 10:22 am

Hi Vijay

Candid to the comments does it really works. Since if you take a text box of 1 -1000 characters, then will it possible to execute without entering 1000 characters at an instant to verify whether it allow or not. If system allows then what’s the necessity to go for in between values (Equivalence Partitioning) since it allows all the 1000.

Is am byte confused here……? Can you please clear my doubt?

Also does really a Test Engineer use this strategy to prepare test cases for Black Box Testing?

#31 Munna bhai on 10.24.08 at 3:41 pm

Thanx

#32 rao on 10.25.08 at 10:36 am

TQ

#33 Deepak on 10.30.08 at 3:58 pm

Hi, Vijay this is a great site. Good job. Can u mail me the software testing by ron patton ebook to rockys283@yahoo.co.in

Thanks and Regards

#34 anusha on 10.31.08 at 7:45 am

hai

can any body tell me the QTP life cycle all phases to me
more examples on manual test cases
give me some requirements to write test cases

sujani_2008@yahoo.com

#35 Sreenivasa Rao on 10.31.08 at 11:37 am

Could anybody pls help me in answering the following question – how many test cases will be generated for three check boxes and one button which was questioned me in an interview.

#36 Sreedhar on 10.31.08 at 4:13 pm

Srinivasa Rao,
for 3 check boxes and one button – 8 test cases can be written. BTW, button was only to confuse but all 8 test cases are the possible selection of 3 check boxes.

Hope this helps. But I don’t understand why you were asking that question here in the comment section of BVA article.

#37 Vijay on 11.01.08 at 10:34 am

@Suhas, Qastation
You can say that boundary value analysis test cases are the subset of Equivalence partitioning. As always you can select EP test cases similar to boundary value test cases. But BVA help to identify the upper and lower limit which may or may not be the part of EP tests.

As I said, rather than just picking some random values as your EP test cases won’t do. Carerful partitioning and analysis of equivalence classes to pick the best test cases that will exercise maximum test coverage is what expected from equivalence partitiong.

The example given is just to understand both concepts with a single example.

#38 Sreenivasa Rao on 11.04.08 at 7:35 am

Sorry, Sreedhar for posting the question in the comment section of BVA. Thanks for the answer.

#39 Inder P Singh on 11.06.08 at 11:00 am

It is believed that EP is a good technique to reduce the number of test cases to a bare minimum. Though EP is related to efficiency of test case design, I think that we should be aware that using EP could prevent the discovery of defects related to particular data value(s) in a range. Consider a date input text box (with a calendar control) that accepts dates between 1 Jan 1970 and today. We have three classes (also called partitions) here
1) = 7 Nov 2008.
By just selecting one test data value from each class might not be able to exercise the application with other interesting values e.g. 29 Feb 2008 or any particular value not handled correctly by the application.

#40 Inder P Singh on 11.06.08 at 11:04 am

Part of my comment has gone missing when posted. Therefore, I am posting my comment again:

It is believed that EP is a good technique to reduce the number of test cases to a bare minimum. Though EP is related to efficiency of test case design, I think that we should be aware that using EP could prevent the discovery of defects related to particular data value(s) in a range. Consider a date input text box (with a calendar control) that accepts dates between 1 Jan 1970 and today. We have three classes (also called partitions) here:
Less than or equal to 31 Dec 1969, 1 Jan 1970 to 6 Nov 2008, greater than or equal to 7 Nov 2008.

By just selecting one test data value from each class might not be able to exercise the application with other interesting values e.g. 29 Feb 2008 or any particular value not handled correctly by the application.

Inder P Singh

#41 Tanvi on 11.06.08 at 12:24 pm

Hi Vijay

I din’t know where to put this question because there is no category for that.

Can you help me with ways of testing an artificial intelligence software/product

thanks Tanvi

#42 Hariprasad.MS on 11.06.08 at 2:43 pm

Good topic. It is very user full…..why cont you explain about estimation concept in testing

Thanks

HP

#43 mrunalini on 11.06.08 at 3:09 pm

this is a great article.

can anybody mail me the software testing ebook.
my mail id: oasisuser4@gmail.com

#44 Sirisha on 11.06.08 at 10:51 pm

Respected seniors, Vijay plz. answer me.

How to answer – “what METRICS do you use? How many types of metrics are there?” It’s a most imp question in interviews. As far as i know, different metrics are–Defect Density, Defect Leakage, Traceability Matrix, Bug Trend Analysis(means comparing no of bugs in different versions). Types of Metrics are Process, Product, Project. “Do CMM, ISO 9000 come under Metrics?”. I am not concluding the above information. My attempt is to make clear that on what topic seniors have to give their kind and valuable suggestions.

Plz. respond with full details.

Yours faithfully………Sirisha

#45 swapna on 11.06.08 at 11:18 pm

hello sir/madam,

actually, how many types of “Test Reports” are there?

i came through different terminology like—

Test summary reports
Test execution reports
Test status reports
Test log reports
Test daily, weekly reports

These all mean same??? if not please explain me and also explain me if there are any other reports that come under above list. in the least case please provide me exact link. Thanks in advance.

#46 Qastation on 11.10.08 at 11:58 am

@Sirisha

Types of Metrics:
Process & Product/Project (depends upon application)

Under process metrics: Evaluates the efficiency of the process you use for your production (Project)

Effort, Schedule, Quality (DRE)

Product/Project:

Can have DRE also here, Phasewise defect removal, defect density and etc.

….mm Tracability Matrix is used for trace the requirements. It’s an verification techniques, not metric.

#47 Qastation on 11.10.08 at 12:01 pm

@Swapna

All the above mentioned reports are of same.
It depends upon the organisation requirements they will name it as they are.

#48 Asawari on 11.12.08 at 2:01 pm

Hi,

very useful article written in simple way so that any one can understand it easily.

Thanks…..

But I think very less topics are covered….Plz write more topics on testing….It will be very helpfull to us…..

#49 BAO on 11.13.08 at 3:04 am

GUYS and GALS,
from what i see in the article BVA and EP just different method of testing. Use either one.

Now can anyone help me in this scenario

i have 2 textboxes or fields, and
One can be entered with only alphabet
another can be entered with only number

so how can i use BVA on this scenario

won’t there be too many scenario?
such
– leading space i.e. ” hello”
– blank
– symbol

Can someone post all the scenario?

Greatly appreciated..

#50 Venkata Srikanth on 11.13.08 at 4:11 am

@LAKSHMI

Hi Lakshmi,

If u do the certification in Testing that will give good weightage to ur Resume.

Suppose if any organization is following RUP model those organizations will give more importance to Certified Test Engineers.

If u r intrested to do certification in S/w Testing u can mail me at srikanthvelivela@gmail.com for further details.

#51 Daiju on 11.13.08 at 9:22 am

In BVA, we are taking the values from the edges of the classes and write the test cases. But in EP, We are taking the value from each classes and write the test cases.

#52 Ashish Singh on 11.19.08 at 10:13 am

Dear BAO,

U can try out by permutation for both fields.
Am I right all there?

#53 Rashmi on 12.02.08 at 12:56 pm

hi,

In order to test for a text box that excepts amount in the range 1 to 100 we need to test for the following condition:

1. First see if the text box accepts alphabets
2. second whether it accepts special characters
3. Then enter “2e4″ in some cases it allows this and converts to exponent which should not be allowed
4. then go for BVA
i.e enter 0,1,2 and 99,100,101

Dont u think this is the approach that needs to be followed.

#54 GIRISH on 12.02.08 at 1:43 pm

dear lakshmi,

your approach is correct,use some more combinations like alphanumeric+specialcharacters and
alphabets+small letters+numericals+special characters.

#55 GIRISH on 12.02.08 at 1:45 pm

hey sorry,rashmi.

#56 raj on 12.03.08 at 3:58 am

can you tell me Installation Testing….!

#57 GIRISH on 12.03.08 at 11:37 am

hi raj,

Installation testing should be done in the collabartion with the configuration engineer.
installation is the process which first time client/user is going to interacted with our product/appl.
installation testing is done to ensure that the client/user do not feel trouble while installing the software.
thank you

#58 diya on 12.04.08 at 4:16 am

hi,
what is statement coverage and branch coverage? could you explain with examples.
thanks

#59 Sureshkumar on 12.16.08 at 12:22 pm

Guys,
Please answer for it:

In a system designed to work out the tax to be paid: An employee has £4000 of salary tax free. The next £1500 is taxed at 10% The next £28000 is taxed at 22% Any further amount is taxed at 40% To the nearest whole pound, which of these is a valid Boundary Value Analysis test case? a) £1500 b) £32001 c) £33501 d) £28000

#60 Sreedhar on 12.16.08 at 1:28 pm

Option C is correct. Valid values for the above scenario will be -1,0,1,3999,4000, 4001, 5499,5500, 5501, 33499,33500,33501.

#61 Sureshkumar on 12.16.08 at 1:34 pm

Exactly u r correct Sreedhar…Thanks for reply

1500+28000+4000 = 33500 +1 is 33501(last boundry)

#62 Kruti on 01.26.09 at 5:15 pm

hi…very nice article with good explanation with simple examples in simple language, so that every one can understand it easily.

#63 rajesh on 02.03.09 at 7:26 am

it very nice article to get the knowledge of boundary value analysis and equal partitioning….great work

#64 Karuna on 02.25.09 at 3:41 am

its very good n useful…
thanks very much..

#65 Suresh Rathod on 02.27.09 at 8:07 am

It’s a very nice article. Thanks for sharing knowledge.

#66 Bithika on 03.04.09 at 9:05 am

Hi,

I have 4 yrs of experience in manual testing. Which certification will help me to shape up my career graph.

regards
Bithika

#67 shivanand on 03.18.09 at 5:56 am

thanks for ur valuable reply…

#68 G.suresh on 03.24.09 at 8:46 am

Hi

It’s good sharing your knowledge with others about equivalence and boundary value analysis, but I am having one doubt, you have taken the example for only single instance what will happen if there are multiple instances? Its take time and somewhat difficult to do that. Recently I have seen a tool called “TestersDesk.com” Which is useful for both TestDesign and TestData Generation Toolkit in that Boundary value analysis tool is there with the help of tool we can reduce our work and can do for multiple instances at the same time

#69 ch.girishchander raju on 03.24.09 at 9:09 am

hi bithika,

you can go for ISTQB(foundation level) first.After
that you can go for Advanced level.Tthen u can be called as ISTQB certified functional tester/technical tester.
Thank u

cheers,

CH.GIRISH CHANDER RAJU
CERTIFIED TEST ENGINEER

#70 varma on 04.16.09 at 10:47 am

Hi
Can anyone explain me the process of Business Testing

#71 SAchin on 05.05.09 at 6:07 am

Thanks man
its really good.I can suggest to give some more examples so that people can understand in a better way! :)

#72 Yays:D on 05.13.09 at 1:37 am

Nice concise explanations and examples of EP and BV – makes my revision a lot easier! Cheers! :D

#73 Veni on 05.14.09 at 6:33 pm

Its very nice article which is explained in simple words so that every one can understand. Nice work Ajay!! Thanks for sharing this gr8 article..Keep it up!!

#74 Anurag Srivastava on 05.17.09 at 9:34 am

Great work VIJAY!!

I really appreciate ur work and all those who have posted their comments

#75 XXX on 06.02.09 at 6:55 am

Its very nice article

#76 SUHASINI on 06.03.09 at 7:10 am

Hi All,

Could anyone please give me a justifying answer for wat suhas has askd on the efficiency of Equivalence partitioning over BVA? Because as he said, BVA is going to cover all of the scenarios including what we are trying to cover in EP. Please let me know with a clear example.

#77 Srikumaran on 06.07.09 at 4:47 pm

BVA is something it covers the valid and invalid class of EP.

For ex: 60 – 120
for equivalance partitioning we go by the value
59 60 61 119 120 121
59.9 60 60.1 70 119.9 120 120.1
In case of value 59 is a invalid class, similarly 121 is an invalid class.

Could anyone clear me if i am wrong?

#78 david on 07.03.09 at 2:29 pm

I think this misses the heart of equivalence class partitioning. A number range does not offer a good opportunity to describe equivalence classes because 1-1000 everything is equivalent. One can only understand the technique when some are not equivalent.

Let’s say one is testing an eCommerce application and there’s a drop-down for selecting the state. Some states have no tax, others have tax, and some the company cannot ship to. Equicalence class partitioning might lead you to choose at least one state each from:
0 tax + can ship
0 tax + cannot ship
>0tax + can ship
>0tax + cannot ship

0 tax and >0 tax are different because they have different semantics to the app. 5% tax and 6% tax yield different results but you expect the behavior to be similar (tax amt. should be tax % * taxable total) and testing every possible combo 5%, 5.5%, 6%, etc. might not be practical.

As always, go back to the classics. Glenford Myers “the art of software testing” is a good resource.

#79 oracleeye on 07.20.09 at 9:17 am

hi every1,
thnaks to all because of you guys I come to know the new terms which i never heard.. thank you very much

#80 oracleeye on 07.20.09 at 9:34 am

especially to susma

#81 ISTQB Exam Questions on Equivalence partitioning and Boundary Value Analysis on 07.27.09 at 7:35 am

[…] class are known as Boundary values. Analyzing the behavior of a system using such values is called Boundary value analysis […]

#82 andrew hudson on 08.13.09 at 5:19 am

this is a nice explaination with a neat example.

#83 inder on 08.13.09 at 10:11 am

thanks for giving an important info about boundary value analysis.

#84 Sumesh on 09.14.09 at 2:56 pm

Nice example

#85 amol on 10.07.09 at 11:50 am

very good…..
thanks!

#86 kushal on 11.05.09 at 3:41 pm

How can we made equivalence partioning for a field where date is the input like 1 Jan 1976 to 5 Nvoember 2009?
What would be the Equivalence classes…consder the leap years also

#87 Balaji on 12.22.09 at 11:13 pm

Good article and comments with nice examples. Thanx.

#88 Sonali on 01.09.10 at 6:01 pm

Thnx…its a nice example

#89 prashanth on 01.20.10 at 6:55 am

Can anyone explain me the process of Avinoncs software Testing

#90 Mohan on 02.17.10 at 9:32 am

Good stuff!!!!!! Please keep doing :-)

#91 SWTester on 03.08.10 at 10:23 am

Check the link. You can have a detailed idea about how and why this practice has been adopted!

#92 Madhukar.M on 03.10.10 at 7:15 am

BVA Formula :

n-1, n, n+1

Ex: 1 – 1000 find BVA for this

0,1,2, 999,1000,1001 (is valid BVA for)

#93 prashanth on 03.10.10 at 9:07 am

hi friend

#94 Bhaskar on 03.14.10 at 4:14 am

Sombody asked about Tracebility Matrix in this question answer thread.

Anser to Tracebility matrix : Tacebility matrix a document which track the completeness. e.g. Requirement Tracebility Matrics(RTM). In RTM we note down all the requirements id which are there in SRS. As and when we start writing test cases againist requirements, we keep updating those test cases id in RTM against respective requirements.

Hope this short description will help you to understand about Tracebility matrics. gook luck , happy testing.

#95 ankush on 03.30.10 at 6:55 am

for the above example its very simple n easy to get the ecp n bva..
fr ecp we use the grouping its no possible to take every test case so..
Ecp=1-3000-1000 i take min value and then aby midle value and then max value

and Bva is for -negative approach is
min-1=1-1=0
max=1=1000+1=1001
for +ve approach its same min=1 and max=1000

#96 Shaun on 04.27.10 at 7:40 pm

One point to add to this article is the concept that granularity matters in boundary testing. In the example provided their is an assumption that only whole numbers are permitted, but what if decimals were allowed? If we could input 1.0 to 1000.0 then the granularity of the boundary condition changes. It is no longer valid to simply say the boundaries are min-1, min, min+1, max-1, max, max+1. In this example we have to go down to the 1/10ths to adequately test the boundary condition (0 isn’t sufficient for min-1, but .9 is).

Granularity becomes even more important when we consider boundary conditions related to dates and times. If I need to test for a condition where AGE > 65 years is my max+1 boundary condition 66 years, 65 years and 1 day, 65 years and 1 hour, 65 years and 1 minute, etc?

When we test for boundary conditions we must ALWAYS consider and understand the granularity of the boundary condition in order to provide a valid boundary test.

#97 AG on 04.27.10 at 9:21 pm

Here is another nice example on
equivalence partitioning

#98 Madhukar.M on 04.30.10 at 5:58 am

BVA Formula: min, min+1, min-1,
max, max+1, max-1

ECP: Valid and Invalid will be there in ECP

#99 Shiva on 05.24.10 at 3:16 pm

Good one!

#100 Shiva kumar on 06.05.10 at 3:03 am

God bless you, thanks for the information, i got 6 years of exp, still i could learn some thing from you ….

#101 sheetal on 06.18.10 at 8:06 am

great article .thank u.

#102 Jyothsna on 07.10.10 at 11:32 am

Very good article..I have understood the topic after many days!!!Thanks a lot.

#103 Priyanka on 07.10.10 at 7:27 pm

Very well written.

#104 Jaya on 07.14.10 at 6:58 am

All r telling about how to write test cases for numerics,alphabets and for spl char.s or mixed of 3.
I have a doubt, that is, bva on pages can be done by manually?

#105 Murali on 08.25.10 at 6:07 am

Jaya, the concept of BVA is to design the test cases to test extremes of input domain i.e. min, max values so this cannot be used to page testing

#106 Manjunath on 09.01.10 at 12:42 pm

Good concept and keep posting

#107 Bhakti on 09.08.10 at 9:08 am

Hey..

Very nice one.. Thanks..

Bhakti

#108 brahma on 09.17.10 at 3:55 pm

hi,

i want some information about ISTQB, can u tell me some examples.

#109 sharath sistla on 10.22.10 at 4:24 am

hi,

nice article

#110 Pawan J on 10.30.10 at 6:15 am

Nice Article….. Thanks

#111 anitha on 11.10.10 at 9:21 pm

Thanks for explaining in simple way

#112 Hanumant Sharma on 11.11.10 at 4:28 pm

In practical , while we test for a particular requirement, one have to test 1st from the middle , its the last step of completeion of testing when we use BVA.,

#113 ealshabaan on 11.19.10 at 5:23 am

really good

#114 Amol Gangurde Pune on 11.26.10 at 11:39 am

Thanks…..

#115 rajndraprasad on 11.30.10 at 12:32 pm

what is BVA for the 0-10 range

#116 Umar on 12.04.10 at 5:58 pm

Excellent post. Easy to understand the two concepts. Thanks for sharing.

#117 kuttty on 12.07.10 at 4:41 pm

what is boundary analaysis ?

#118 Hafiz Rizwan Iqbal on 12.08.10 at 2:46 pm

Really !!!! nice one..

Impressive writing

#119 JAJA on 12.25.10 at 3:56 pm

Thanks a lot for the explanation and the simple example.

#120 Ramkumar on 12.31.10 at 7:18 am

Thanz its v useful to update ……

#121 Ramkumar on 12.31.10 at 7:21 am

if u have any test case samples…. send me

#122 Girijesh on 01.04.11 at 8:41 am

Hi,

its a nice article helped a lot in my understanding.

#123 mani on 01.20.11 at 10:23 am

i am fresher in testing supposose how can i start the testing?
which domain will be best?
send me my mail

#124 lalu on 01.31.11 at 7:14 pm

Please let me know EP and BVA for below
A-Z, a-z

#125 muralimohanreddy on 02.08.11 at 7:37 am

Hi friends

good stuff

#126 Vetri R on 02.14.11 at 6:16 am

Thanks for making me to understand the concepts…. very cool explanation

#127 Rajaguru on 03.22.11 at 5:17 pm

Good Explanation. Cheers, Guru

#128 Rajaguru on 03.22.11 at 5:19 pm

Hello Friends,

Could you explain, How to apply BVT for Date and Time fields?

Cheers,
Guru

#129 Priya on 03.25.11 at 7:04 am

really useful… thanks

#130 Sandeep on 03.29.11 at 5:20 am

Good subject details on EP(Equivalence Partitioning) & BVA(Boundary Value Analysis)

#131 prabhu on 04.26.11 at 9:01 am

This is really useful… Thanks… thanks a lot

#132 Indrajit on 05.31.11 at 12:17 pm

thnx & very hlpful

#133 Alpha on 06.21.11 at 1:01 pm

thanks alot, its help me to understand the difference between equivalence and boundary value analysis

#134 saravanan on 06.25.11 at 4:16 pm

hi guys this forum is really helpful thanks for sharing u r knowledge in this forum :)

#135 Arokya Samy on 07.12.11 at 7:56 am

Hi friends… I have one plus experience in Testing field…
pls mail me if u know any openings….

#136 Jitendra Bhande on 07.21.11 at 6:50 am

for istqb preparation BVA AND EP must fix Your some marks…nice article….

#137 Rupal on 07.31.11 at 8:19 pm

Order numbers on a stock control system can range between 10000 and 99999 inclusive. Which of the following inputs might be a result of designing tests for only valid equivalence classes and valid boundaries:
1000, 5000, 99999
9999, 50000, 100000
10000, 50000, 9999
10000, 99999
which is correct?

#138 Rupal on 07.31.11 at 8:25 pm

given the following specification.
which of the following value for age are in the same EP
if uor age less than 18 then too young for insurance
if 18 to 30 then 20% discount
more then 30 ,not eligible for discount

17,18,19
29,30,31
18,29,30
17,29,31

#139 vijetha on 08.10.11 at 11:30 am

I wrote the answers for the questions which i got.I dont know the correct answers.As per my knowledge I gave answers.Plz correct me with good explanation for wrong answers.
1) Order numbers on a stock control system can range between 10000 and 99999 inclusive. Which of the following inputs might

be a result of designing tests for only valid equivalence classes and valid boundaries:
a) 1000, 5000, 99999
b) 9999, 50000, 100000
c) 10000, 50000, 99999
d) 10000, 99999
e) 9999, 10000, 50000, 99999, 10000 ANS-C

2) Which of the following is NOT a black box technique:
a) Equivalence partitioning
b) State transition testing
c) Syntax testing
d) Boundary value analysis ANS-C

3) Error guessing is best used
a) As the first approach to deriving test cases
b) After more formal techniques have been applied
c) By inexperienced testers
d) After the system has gone live
e) Only by end users ANS-B

4) Which is not true-The black box tester
a. should be able to understand a functional specification or requirements document
b. should be able to understand the source code.
c. is highly motivated to find faults
d. is creative to find the system’s weaknesses. ans-B

5) A test design technique is
a. a process for selecting test cases
b. a process for determining expected outputs
c. a way to measure the quality of software
d. a way to measure in a test plan what has to be ans-Cdone

6) Which of the following is true?
a. Component testing should be black box, system testing should be white box.
b. if u find a lot of bugs in testing, you should not be very confident about the quality of software
c. the fewer bugs you find, the better your testing was
d. the more tests you run, the more bugs you will find. ANS-D

7) What is the important criterion in deciding what testing technique to use?
a. how well you know a particular technique
b. the objective of the test
c. how appropriate the technique is for testing the application
d. whether there is a tool to support the technique ANS-C

8) Which of the following is a black box design technique?
a. statement testing
b. equivalence partitioning
c. error- guessing
d. usability testing ANS-B

9) A program validates a numeric field as follows:
values less than 10 are rejected, values between 10 and 21 are accepted, values greater than or equal to 22 are rejected
Which of the following input values cover all of the equivalence partitions?
a. 10, 11, 21
b. 3, 20, 21
c. 3, 10, 22
d. 10, 21, 22 ANS-B

10) Using the same specifications as question 9, which of the following covers the MOST boundary values?
a. 9,10,11,22
b. 9,10,21,22
c. 10,11,21,22
d. 10,11,20,21 ANS-B

11) Error guessing:
a) supplements formal test design techniques.
b) can only be used in component, integration and system testing.
c) is only performed in user acceptance testing.
d) is not repeatable and should not be used. ANS-A

12) Which of the following is NOT a white box technique?
a) Statement testing
b) Path testing
c) Data flow testing
d) State transition testing ANS-D

13) Data flow analysis studies:
a) possible communications bottlenecks in a program.
b) the rate of change of data values as a program executes.
c) the use of data on paths through the code.
d) the intrinsic complexity of the code. ANS-C

14) In a system designed to work out the tax to be paid:
An employee has £4000 of salary tax free. The next £1500 is taxed at 10%
The next £28000 is taxed at 22%
Any further amount is taxed at 40%
Which of these groups of numbers would fall into the same equivalence class?
a) £4800; £14000; £28000
b) £5200; £5500; £28000
c) £28001; £32000; £35000
d) £5800; £28000; £32000 ANS-D

15) Test cases are designed during:
a) test recording.
b) test planning.
c) test configuration.
d) test specification. ANS-D

16) An input field takes the year of birth between 1900 and 2004
The boundary values for testing this field are
a. 0,1900,2004,2005
b. 1900, 2004
c. 1899,1900,2004,2005
d. 1899, 1900, 1901,2003,2004,2005 ANS-C

17) Boundary value testing
a. Is the same as equivalence partitioning tests?
b. Test boundary conditions on, below and above the edges of input and output equivalence classes
c. Tests combinations of input circumstances
d. Is used in white box testing strategy ANS-B

18) When testing a grade calculation system, a tester determines that all scores from 90 to 100 will yield a grade of A, but

scores below 90 will not. This analysis is known as:
a) Equivalence partitioning
b) Boundary value analysis
c) Decision table
d) Hybrid analysis ANS-B

19) Which technique can be used to achieve input and output coverage? It can be applied to human input, input via interfaces

to a system, or interface parameters in integration testing.
a) Error Guessing
b) Boundary Value Analysis
c) Decision Table testing
d) Equivalence partitioning ANS-A

20) Features to be tested, approach, item pass/fail criteria and test deliverables should be specified in which document?
a) Test case specification
b) Test procedure specification
c) Test plan
d) Test design specification ANS-A

21) Which specification-based testing techniques are most closely related to each other?
a) Decision tables and state transition testing
b) Equivalence partitioning and state transition testing
c) Decision tables and boundary value analysis
d) Equivalence partitioning and boundary value ANS-D
analysis

22) assume postal rates for ‘light letters’ are:
$0.25 up to 10 grams
$0.35 up to 50 grams
$0.45 up to 75 grams
$0.55 up to 100 grams
Which test inputs (in grams) would be selected using boundary value analysis?
a) 0, 9, 19, 49, 50, 74, 75, 99, 100
b) 10, 50, 75, 100, 250, 1000
c) 0, 1, 10, 11, 50, 51, 75, 76, 100, 101 ANS-C
d) 25, 26, 35, 36, 45, 46, 55, 56

23) If the temperature falls below 18 degrees, the heating system is switched on. When the temperature reaches 21 degrees,

the heating system is switched off. What is the minimum set of test input values to cover all valid equivalence partitions?
a) 15, 19 and 25 degrees
b) 17, 18, 20 and 21 degrees
c) 18, 20 and 22 degrees
d) 16 and 26 degrees ANS-A

24) What is a test condition?
a) An input, expected outcome, precondition and post condition
b) The steps to be taken to get the system to a given point
c) Something that can be tested
d) A specific state of the software, ex: before a test can be run ANS-D

25) What is a key characteristic of specification-based testing techniques?
a) Tests are derived from information about how the software is constructed
b) Tests are derived from models (formal or informal) that specify the problem to be solved by the software or its components
c) Tests are derived based on the skills and experience of the tester
d) Tests are derived from the extent of the coverage of structural elements of the system or components ANS-A

26) Why are both specification-based and structure-based testing techniques useful?
a) They find different types of defect.
b) using more techniques is always better
c) both find the same types of defect.
d) Because specifications tend to be unstructured ANS-D

27) Find the Equivalence class for the following test case
Enter a number to test the validity of being accepting the numbers between 1 and
99
a) All numbers 99
c) Number = 0
d) All numbers between 1 and 99 ANS-D

28) What is the relationship between equivalence partitioning and boundary
value analysis techniques?
a) Structural testing
b) Opaque testing
c) Compatibility testing ANS-B
d) All of the above

29) Suggest an alternative for requirement traceability matrix
a) Test Coverage matrix
b) Average defect aging
c) Test Effectiveness
d) Error discovery rate ANS-A

30) The following defines the statement of what the tester is expected to accomplish or validate during testing activity
a) Test scope
b) Test objective
c) Test environment
d) None of the above ANS-B

31) One technique of Black Box testing is Equivalence Partitioning. In a program
statement that accepts only one choice from among 10 possible choices,
numbered 1 through 10, the middle partition would be from _____ to _____
a) 4 to 6
b) 0 to 10
c) 1 to 10
d) None of the above ANS-A

32) Test design mainly emphasizes all the following except
a) Data planning
b) Test procedures planning
c) Mapping the requirements and test cases
d) Data synchronization ANS-D

33) Deliverables of test design phase include all the following except
a) Test data
b) Test data plan
c) Test summary report
d) Test procedure plan ANS-C

34) Test data planning essentially includes
a) Network
b) Operational Model
c) Boundary value analysis
d) Test Procedure Planning ANS-D

35) Test coverage analysis is the process of
a) Creating additional test cases to increase coverage
b) Finding areas of program exercised by the test cases
c) Determining a quantitative measure of code coverage, which is a
direct measure of quality.
d) All of the above. ANS-D

36) Branch Coverage
a) another name for decision coverage
b) another name for all-edges coverage
c) another name for basic path coverage
d) all the above ANS-A

37) The following example is a
if (condition1 && (condition2 || function1()))
statement1;
else
statement2; (Testing concepts)
a) Decision coverage
b) Condition coverage
c) Statement coverage
d) Path Coverage ANS-D

38) Test cases need to be written for
a) invalid and unexpected conditions
b) valid and expected conditions
c) both a and b
d) none of these ANS-C

39) Path coverage includes
a) statement coverage
b) condition coverage
c) decision coverage
d) none of these ANS-A

40) The benefits of glass box testing are
a) Focused Testing, Testing coverage, control flow
b) Data integrity, Internal boundaries, algorithm specific testing
c) Both a and b
d) Either a or b ANS-C

41) Find the invalid equivalence class for the following test case
Draw a line up to the length of 4 inches
a) Line with 1 dot-width
b) Curve
c) line with 4 inches
d) line with 1 inch. ANS-B

42) Error seeding
a) Evaluates the thoroughness with which a computer program is tested by purposely inserting errors into a supposedly correct

program.
b) Errors inserted by the developers intentionally to make the system
malfunctioning.
c) for identifying existing errors
d) Both a and b ANS-A

43) Which of the following best describes the difference between clear
box and opaque box?
1. Clear box is structural testing, opaque box is Ad-hoc testing
2. Clear box is done by tester, and opaque box is done by developer
3. Opaque box is functional testing, clear box is exploratory testing
a) 1
b) 1 and 3
c) 2
d) 3 ANS-D

44) What is the concept of introducing a small change to the program and having the effects of that change show up in some

test?
a) Desk checking
b) Debugging a program
c) A mutation error
d) Introducing mutation ANS-C

45) How many test cases are necessary to cover all the possible sequences of statements (paths) for the following program

fragment? Assume that the two conditions are independent of each other : – …………
if (Condition 1)
then statement 1
else statement 2
fi
if (Condition 2)
then statement 3
fi
…………
a. 1 test case
b. 3 Test Cases
c. 4 Test Cases
d. Not achievable ANS-B

46) Given the following code, which is true about the minimum number of test cases required for full statement and branch

coverage:
Read P
Read Q
IF P+Q > 100 THEN
Print “Large”
ENDIF
If P > 50 THEN
Print “P Large”
ENDIF
a) 1 test for statement coverage, 3 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 1 test for statement coverage, 1 for branch coverage
d) 2 tests for statement coverage, 3 for branch coverage
e) 2 tests for statement coverage, 2 for branch coverage ANS-E

47) Given the following:
Switch PC on
Start “outlook”
IF outlook appears THEN
Send an email
Close outlook
a) 1 test for statement coverage, 1 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 1 test for statement coverage. 3 for branch coverage
d) 2 tests for statement coverage, 2 for branch coverage
e) 2 tests for statement coverage, 3 for branch coverage ANS-B

48) If a candidate is given an exam of 40 questions, should get 25 marks to pass (61%) and should get 80% for distinction,

what is equivalence class?
A. 23, 24, 25
B. 0, 12, 25
C. 30, 36, 39
D. 32, 37, 40 ANS-C

49) Consider the following statements:
i. 100% statement coverage guarantees 100% branch coverage.
ii. 100% branch coverage guarantees 100% statement coverage.
iii. 100% branch coverage guarantees 100% decision coverage.
iv. 100% decision coverage guarantees 100% branch coverage.
v. 100% statement coverage guarantees 100% decision coverage.
a) ii is True; i, iii, iv & v are False
b) i & v are True; ii, iii & iv are False
c) ii & iii are True; i, iv & v are False
d) ii, iii & iv are True; i & v are False ANS-C

50) Which statement about expected outcomes is FALSE?
a) Expected outcomes are defined by the software’s behavior
b) Expected outcomes are derived from a specification, not from the code
c) Expected outcomes should be predicted before a test is run
d) Expected outcomes may include timing constraints such as response times ANS-A

51) Which of the following is not a white box testing?
a) Random testing
b) Data Flow testing
c) Statement testing
d) Syntax testing ANS-D

52) If the pseudo code below were a programming language, how many tests are required to achieve 100% statement coverage?
1. If x=3 then
2. Display_messageX;
3. If y=2 then
4. Display_messageY;
5. Else
6. Display_messageZ;
a. 1
b. 2
c. 3
d. 4 ANS-B

53) Using the same code example as question 17, how many tests are required to achieve 100% branch/decision coverage?
a. 1
b. 2
c. 3 ANS-B
d. 4

54) Which of the following technique is NOT a black box technique?
a) Equivalence partitioning
b) State transition testing
c) LCSAJ
d) Syntax testing ANS-D

55) Given the following code, which is true?
IF A>B THEN
C = A – B
ELSE
C = A + B
ENDIF
Read D
IF C = D THEN ANS-B
Print “Error”
ENDIF
a) 1 test for statement coverage, 1 for branch coverage
b) 2 tests for statement coverage, 2 for branch coverage
c) 2 tests for statement coverage, 3 for branch coverage
d) 3 tests for statement coverage, 3 for branch coverage
e) 3 tests for statement coverage, 2 for branch coverage

56) Consider the following:
Pick up and read the news paper
Look at what is on television
If there is a program that you are interested in watching then switch the television on and watch the program
Otherwise
Continue reading the news paper
If there a crossword in the news paper then try and complete the crossword
a) SC = 1 and DC = 3
b) SC = 1 and DC = 2
c) SC = 2 and DC = 2
d) SC = 2 and DC = 3 ANS-C

57) The specification: an integer field shall contain values from and including 1 to and including 12 (number of the month)
Which equivalence class partitioning is correct?
a) Less than 1, 1 through 12, larger than 12
b) Less than 1, 1 through 11, larger than 12
c) Less than 0, 1 through 12, larger than 12 ANS-A
d) Less than 1, 1 through 11, and above

58) Analyze the following highly simplified procedure:
Ask: “What type of ticket do you require, single or return?”
IF the customer wants ‘return’
Ask: “What rate, Standard or Cheap-day?”
IF the customer replies ‘Cheap-day’
Say: “That will be £11:20”
ELSE
Say: “That will be £19:50”
ENDIF
ELSE
Say: “That will be £9:75”
ENDIF

Now decide the minimum number of tests that are needed to ensure that all the questions have been asked, all combinations

have occurred and all replies given.
a) 3
b) 4
c) 5
d) 6 ANS-A

Thanks in advance…..

#140 Application Testing – Into the Basics of Software Testing! — Software Testing Help on 08.15.11 at 8:13 pm

[…] BVA (Boundary value Analysis) ii. EP (Equivalence Partitioning) iii. Decision Tables iv. State Transition Tables (and […]

#141 madhuri on 09.05.11 at 5:42 am

verry nicely explained !
thanx a lot sir……

#142 Swetha Sreenivasa on 09.17.11 at 11:16 am

I would like to thank each and every one for the clear explanation. Thank you.

#143 Deepali Shahabadi on 09.27.11 at 8:29 am

Very nice and Simple Explanation with a good example

#144 Shweta on 10.10.11 at 12:02 pm

Very good Explanation & Easy to understand..

#145 Nivi on 12.05.11 at 8:39 am

My question is for the specified range 1-100 we test the values 0,1,2 and 99,100,101 for ECP but what if the range is 0-99999,how am i suppose to use BVA or ECP and is the logic n, n-1,n+1 still applicable?? Plz help me with this!!!

#146 narap on 12.13.11 at 7:17 am

nice

#147 narap on 12.13.11 at 7:17 am

simple clarification

#148 Joydip on 12.13.11 at 9:31 am

Good One

#149 sahim on 12.22.11 at 10:28 am

Thanks 4 providing such a good material…

and also very thankful to kishor, shuhas,vijay and vijetha. they are sharing such a very important knowledge between us..

#150 SAALIM on 01.02.12 at 6:35 pm

THANX TO UR COOPERATION ME

#151 Deepu on 01.16.12 at 11:20 am

kilimanjaro

#152 Bikash Jajodia on 01.23.12 at 7:23 pm

I have often seen the above example being provided for BVA and EQP.
However, I would like to provide another example that would demonstrate the 2 techniques better.
Let us assume that there is a field called “Age” that has inputs from 1-80.
Based on the age, customer is provided discount on tickets.
1-18: 50%
19-50: 10%
51-80: 40%

Applying BVA, the test cases would be 0, 1, 2, 79, 80, 81 and 1 random number from within the range let’s say it is 45.

Applying EQP, the test cases would be 1 number from each of the classes let’s say,
5 from 1-18 class,
29 from 19-50 class,
72 from 51 to 80 class.

Besides these, applying BVA again, the internal boundaries also should be tested, hence, we should also include 18, 19, 50 and 51 in our test cases.

Thus, overall, test cases should be for 0, 1, 2, 5, 18, 19, 29, 45, 50, 51, 72, 79, 80, 81 (total of 14).

Since the number of test cases is high, we can easily optimize the same and reduce it to the following set:
0, 1, 2, 18, 19, 29, 50, 51, 79, 80, 81 (total of 11).

#153 Bikash Jajodia on 01.23.12 at 7:29 pm

Reply to Nivi’s query:

Theoretically, we still apply the same logic. But, practically, we have to see what can be tested and what cannot be tested and adapt our test cases accordingly.
For example, there may be a field that says that application may allow upto 9999 accounts to be created. It is practically impossible to create so many accounts and test the limit. In such cases, these techniques cannot be applied.

#154 Shekhar on 03.21.12 at 2:18 pm

Can BVA be applied to alphabetic values?If yes , could you please explain with an example?

#155 Viswanathan D on 04.17.12 at 10:36 am

Very good article on Boundary Value Analysis.

Thanks,
Viswa
dviswa29@gmail.com

#156 loser on 04.29.12 at 2:00 pm

worst article i have ever read :-(

#157 Sherin on 05.07.12 at 12:00 pm

This aritcle is not clear..it explains only the boundary values….. wat abt Equivalence Partioning?

#158 some on 05.15.12 at 10:38 am

Very descriptive

#159 ravi on 05.31.12 at 7:31 pm

what value we select in equivalance partioning if value is 150 to 1500

#160 Parag on 06.01.12 at 10:59 am

If a input takes integer value from 1 to 100.
applying equivalence partitioning to above problem we
get following classes.
1 to 100(valid)
less than1(Invalid)
greater than 100(invalid)

as in equivalence partitioning there is no hard and fast rule to select input from partitions.

so here from valid class i take input value (1 ,2 99 ,100)
from invalid class lower than1 takes value(0,-1,50)
from invalid class greater than 100 takes value(101,500)

so by taking all this value together(1,2,99,100,0,-1,50,0,-1,50)
i have covered values which lies on boundary.

so why u need to apply BVA(Boundary Value Analysis).if we can get boundary values applying EP(Equivalence Partitioning). Can anyone explain…?

#161 thiru on 06.01.12 at 12:06 pm

How to calculate Cyclomatic complexity for the below code using the formula M=E-N+P. where,
E = the number of edges of the graph
N = the number of nodes of the graph
P = the number of connected components (exit nodes).

Q. 23: The following code snippet reads through a file and determines whether the numbers contained are prime or not.

1 Read (Val);
2 While NOT End of File Do
3 Prime := TRUE;
4 For Holder := 2 TO Val DIV 2 Do
5 if Val – (Val DIV Holder) * Holder= 0 Then
6 Write (Holder, ‘ is a factor of ‘, Val);
7 Prime := FALSE;
8 Endif;
9 Endfor;
10 if Prime = TRUE Then
11 Write (Val, ‘ is prime’);
12 Endif;
13 Read (Val);
14 Endwhile;
15 Write (‘End of run)

#162 arunkamatchi on 06.21.12 at 1:13 pm

anybody say about latant bug,and golden bug definition and the differents between then…. Please and thanks in advance…

#163 Satish on 06.27.12 at 11:45 am

Suppose password field allows length of 3 to 9 characters. Then as per BVA we will test for characters having length as 2,3,4 and 8,9,10. Interviewer question was Why to test for 4 and 8 when we already test for 3 and 9, isn’t it time consuming?

#164 pankaj goyal on 07.11.12 at 12:20 pm

i want to know that what is the main difference between EP and BVA. that mean which strategy should be perform and why? why these both are different from each other?
any one can explain my problem?

#165 Hansa on 07.21.12 at 2:52 pm

Please let me know, how by using a testing technique, we will prepare Test Case for a Field accepting decimal numeric value e.g. “XXXXXXXX.XX”

#166 HDN on 08.02.12 at 1:39 am

Good explaination and really simple to undestand.So in the boundry values how many test cases(minimum) that we have to write according to above eg.????

#167 kur on 08.19.12 at 4:42 pm

Can the Equivalence analysis have the following casses added under invalid inputs:

1) input data with letters (a-z),(A-Z),Special characters too??

#168 Aman Saxena on 08.23.12 at 11:41 am

Great Article……… Really very useful

#169 Manpreet on 09.15.12 at 7:12 am

Is test cases are written in a particular report ? if yes tell me how test cases are managed

#170 lakshmi on 10.09.12 at 9:38 am

very good one ,it helped me a lot

#171 Rajesh on 10.15.12 at 5:07 am

Very good article. Really nice one !!!!

#172 law choudhary on 10.15.12 at 5:39 pm

BVA IS THE ANALYSIS OF MIN-1,MIN,MAX,MAX+1 IF ANYONE WANT THE FULL EXPLANATION WITH EXAMPLE PLZ TELL ME

#173 law choudhary on 10.15.12 at 5:41 pm

EQUIVALENCE PARTIONING IS GIVEN PRESSMAN………IF YOU WANT ANYONE WANTS THE 3 POINTS OF THIS TELL ME I WILL EXPLAIN………..

#174 Karan on 10.30.12 at 6:16 pm

good explanation with good example

#175 usha on 12.03.12 at 11:03 am

max
min
max+1
max-1
min+1
min-1

are possible input values for boundary value analysis.

#176 Ravi on 01.02.13 at 7:01 am

Very Useful.simply gud

#177 saurabh on 01.10.13 at 9:27 am

I need details of Decision Table tree and Tracibilty Matrix… please mail me all details with example… @ shahsaurabh1983@gmail.com

#178 Ball on 01.18.13 at 6:48 pm

good

#179 kkr on 02.01.13 at 11:27 am

Super..

#180 shivani on 02.12.13 at 9:56 am

can u pls explian the function,procedures in black box testing

#181 Be Modipe on 02.12.13 at 11:07 am

always got lazy when coming to all this but thanx to u guys for opening my mind now i no um gonna show ISTQB wat i got…….thanx for the examples u used,it helped alot,was rili stuck..

#182 Anand on 02.14.13 at 5:41 am

Checking for the nor, max+, max-, min+,min- are the boundary values
Partitioning the inputs based on requirements is equivalence partitions.

Thanks for the clear information abt both techniques.

#183 Chaitali on 03.04.13 at 5:39 am

Explained in such a simple way. Very useful. Thanks a lot… :)

#184 Sagar on 03.20.13 at 1:08 pm

We need to check total 6 inputs
n,n-1,n+1,m,m-1,m+1…correct if m wrong

#185 ishu on 03.24.13 at 4:48 am

ya nice vav it s very useful for us
-prince na gethu

#186 ishu on 03.24.13 at 4:49 am

awesomee……………………………………………………..
-prince na gethu

#187 sriram on 03.26.13 at 10:18 am

Hi,

Can anyone tell me how many testcase can we write for the below scenario in Equivalence Partitioning and Boundary Level

Marks – 0-100
Student type — First Time/Repeat
Grade – F, D, C, B, A
First Time
0-40 – F; 41-50-D; 51-60-C; 61-70-B; 71-100-A
Repeat
0-50 – F; 51-60-D; 61-70-C; 71-80-B; 81-100-A

#188 Vikrant on 04.05.13 at 5:37 am

Value Range: 1-100

What is Valid Equivalence Partition and Boundary Value of 1-100 range?

What is invalid Equivalence Partition and Boundary Value of 1-100 range?

Please Explain me..

#189 anil on 04.15.13 at 6:56 am

When it comes API testing, I do not think this theories really helps always. You will be working with Objects rather than numbers like 1-100. And as an API tester you have the full freedom to go and see the dev code that consumes these input parameters and design your test cases accordingly.

#190 Aparna on 04.26.13 at 10:50 am

Can you please any one explain the answer for my question?
Postal rates for ‘light letters’ are 25p up to l0g, 35p up to 50g plus an extra l0p for each additional 25g up to l00g.
Which test inputs (in grams) would be selected using equivalence partitioning?
a. 8,42,82,102
b. 4,15, 65, 92,159
c. 10,50,75,100
d. 5, 20, 40, 60, 80

#191 Thulasiram on 05.12.13 at 4:16 pm

Great Going Guys :)

Just a suggestion , nothing Personal on this ..
Testing Techniques are introduced to find the minimal number of test cases that can make full coverage (say optimal coverage) , but i see few Pals going out of the Testing Techniques like (EP , BVA)

Like.,,
to check for no of testcases for a text box accepting values between 1 -100 ,

Note :
the main focus on this is to check how system behaves values between 1 – 100 and the values on the boundaries (this shouldn’t be like what happens if we give charactes , spl chars and symbols , that will be carried in other form of testing like field validation (GUI Testing).

As per EP :
we get 3 clauses ,
100(invalid clause). we take 1 value from each clause to check whether system behaves as supposed and not supposed to work .,

To go for further coverage , we go for Boundary checks
which assures our coverage .

#192 Thulasiram on 05.12.13 at 4:18 pm

Some of my comments missing *

As per EP :
we get 3 clauses ,
100(invalid clause). we take 1 value from each clause to check whether system behaves as supposed and not supposed to work .,

To go for further coverage , we go for Boundary checks
which assures our coverage .

#193 Thulasiram on 05.12.13 at 4:21 pm

Apologies again :(

different clauses are getting missed
lessthan 1 will be invalid clause
1 to 100 will be a valid clause and greatethan 100 will be a invalid caluse

we take 1 value from each clause to check whether system behaves as supposed and not supposed to work .,

#194 Thulasiram on 05.12.13 at 4:32 pm

@Aparna ,

Its a bit confusing question , they didn’t explicitly said about which partition to pick up for the test case design .

Expalnation :
10g 25p
50g 35P
75g 45p
100g 55P

Thing to worry here is if we are going to consider the valid partition of weight (in grams) then u r answer should be “c. 10,50,75,100″ which covers all the four cases .

If they are expecting to cover us with , invalid partions then we are in trouble :p we got no option in answers to cover those ( we may get additional 2 testcases for invalid partitions)

#195 Thulasiram on 05.12.13 at 4:34 pm

@vikrant ,

1-100
valid partition is 1- 100
invalid partitions 0 , 101 (if its a pure interger)

#196 Geetika on 06.12.13 at 7:25 am

can anyone let me know the difference between boundary value and equivalence classes ?????

#197 suji on 06.27.13 at 11:37 am

i could not understand the BVA..but other one example is good

#198 Muhammad Zeeshan Mazhar on 07.04.13 at 8:17 am

In Boundary value analysis there are three basic steps to perform this validation:

1) First enter extreme valid values both from lower and upper limit

2) Then decrement by 1 from both upper limit and lower limit and test validation on that data

Test Data = Lower limit -1
Test Data = Upper Limit -1

3) Then increment by 1 from both upper limit and lower limit and test validation on that data

Test Data = Lower limit +1
Test Data = Upper limit +1

#199 Thulasiram on 07.04.13 at 9:29 am

@Geethika ,
Though they sounds similar there is a difference between BVA and EP testing techniques

1. EP(Equivalence partitioning)
finding the partitions or combinations (valid /invalid )

Eg :
To check for the valid and invalid partitions between 10 – 100
Valid partion : 10 – 100
Invalid Partitions : 100
— While preparing the testdata if we select number between 10- 100 , then we are testing with valid data. here system should behave as documented
— If we are selecting value 100 then we are testing with the invalid partition (negative testing) , in this system should have some exception handling (error messages/popups)

2 . BVA(Boundary value analysis) :
Testing with the boundary values

Eg : considering the same example ,
to check with values 10-100
–Valid data : 10 -100 : system going to behave same for all the values from 10 -100 , so we dont test all the values , we just check with 10 and 100(we got 2 testdata)
— Invalid date 100 , so we take 9 and 101(as additional negative testdata) for this system should throw error messages .

Note :
I Know both sounds similar , but we can say Equivalence partitioning is part of BVA , so its upto tested to select the technique for testing .

Like if you are not worried about negative cases , then you can go for EP cases (valid partition).
if you want to test the negative as well then you can go for BVA.

There are multiple external parameters on which we should choose the best technique.like
1. Time
2.Expected Coverage
3.logic complexity etcc..

#200 rehana on 07.29.13 at 12:23 pm

Some one please help me how to write test case for boundary value analysis for ex:1000

#201 Thulasiram on 07.31.13 at 3:10 pm

Hi Rehana ,

+1 and -1 is the boundary value for a pure integer .
In your case if 1000 ,
you need to test with
1. 1000 is the positive or valid data , data should be accepted
2. 999,1001 are the invalid values , likely negative testing where values shoulnt be accepted.

Eg : if x + y = 1000 and its already given y = 0
then x should be 1000 is the positive testing

for the values 999,1001 it should get failed.

#202 keshav pav on 08.01.13 at 7:28 pm

Defenitly it is best artical wid example ever i seen…..everybody get easily understand

#203 Sechaba on 08.29.13 at 12:33 pm

This side is very helpful,i would like to know wich sort of technical questions should you ask during the interview for Test analyst

#204 khan on 09.14.13 at 3:36 am

Can any plz help out with worst test cases on BVA

#205 Amrath on 10.07.13 at 1:22 pm

Helpful

#206 sunil verma on 11.27.13 at 4:19 pm

great …the way u express simple and meaningful

#207 Cause-Effect Graph – Dynamic Test Case Writing Technique For Maximum Coverage with Fewer Test Cases — Software Testing Help on 12.02.13 at 4:14 pm

[…] Equivalence partitioning […]

#208 roma on 12.14.13 at 8:26 am

hi
>this is roma … i want your help… i want to know the test cases for Microsoft outlook 2007..i hope you will help me..
>i prepared test scenario which i mentioned below:-

>please help me…urgently
>thanks
>
>Ms. Roma
>
>1 Always BCC •Performs a CC or a BCC automatically for every email.
>•Customize the email messages that get CC’ed or BCC’ed.
>2 Attachment Reminder • Check your outgoing email for keywords and prompt you in case you
> forgot to attach a file.
>• Keywords are configurable.
>• Intelligently considers signature files.
>3 Attachment Save •Replaces attachments with links.
>•Reduces Outlook storage spaces.
>•Improve Outlook performance.
>•Delete the attachment when deleting an email.
>4 Duplicate Appointment Remover •Removes duplicate appointments.
>•Customizable
>•Fast
>5 Duplicate Contact Remover •Removes duplicate contacts.
>•Customizable
>•Fast
>6 Duplicate Email Remover •Remove duplicate emails in Microsoft Outlook.
>•Customizable
>•Fast
>7 Duplicate Note Remover •Delete duplicates or move them to a folder.
>•Comparisons of two appointments based on subject, body and color.
>•Works with a single folder or multiple folders at once.
>8 Duplicate Task Remover •Delete duplicates or move them to a folder.
>•Comparisons of two tasks based on subject, due date, categories,
> contacts, company, body and start date.
>•Works with a single folder or multiple folders at once.
>•Works with Microsoft Outlook 2013, Outlook 2010 and Outlook 2007.
>9 Follow Up Reminder •Reminds you if you have not heard back from someone.
>•List all your pending reminders with a click of a button.
>•Add follow up reminders to any email in any Outlook folder.
>•Quick Snooze.
>10 Remove Subject Prefix •Remove redundant ‘Re:’, ‘Fw:’ etc. from message subjects.
>11 Reply To All •Prompts you when you reply to everyone. Avoid sending out information
> you may not want to share with everyone.
>• Prevent Outlook from including your name and email address in a reply to all message thus avoiding extra copies.
>• Prompts with a confirmation message if you were BCC’ed on the
> message.
>12 Save as PDF •Saves all your emails as PDF files.
>•Saves attachments as PDF files.
>•Save the emails on receipt or batch mode.
>•No other PDF printer driver needed.
>13 Send Individually •Sends email marketing to each of your recipients, one at a time.
>•Adds a convenient “Send Individually” Outlook button.
>•Easily handles distribution lists, contact groups, and Excel lists.

#209 Ron on 01.06.14 at 2:24 pm

Good post, I have to say the Equivalence Partitioning technique has saved me from writing and executing a large number of unnecessary tests.

#210 minnie on 01.12.14 at 8:19 am

very clear and simple explanation thnku so much

#211 Failure Mode and Effects Analysis (FMEA) – How to Analyze Risks for Better Software Quality & Satisfied Customers! — Software Testing Help on 01.23.14 at 8:15 am

[…] functionality and affecting modules by the feature. Use all sorts of test case writing techniques (Equivalence Partitioning and BVA, Cause and effect graph, State transition diagram) to derive the test […]

#212 kavita on 01.29.14 at 11:23 am

Hi,
I want to know whether I have written correct ECP and BVA values for the condition if(a>b) and both are of type INT32 .
a>b Valid class
a==b Invalid class
a<b Valid class

and values are like b,b+1,b-1,minium and maximum and in the ECP can we change the both variable value or we should keep one as a constant to have good ECP
Please help me .

Thanks

#213 kavita on 01.29.14 at 11:24 am

Hi,
I want to know whether I have written correct ECP and BVA values for the condition if(a>b) and both are of type INT32 .
a>b Valid class
a==b Invalid class
a<b Invalid class

and values are like b,b+1,b-1,minium and maximum and in the ECP can we change the both variable value or we should keep one as a constant to have good ECP
Please help me .

Thanks

#214 Writing Test Cases from SRS Document (Download Live Project Sample Test Cases) – Software Testing QA Training Day 4 — Software Testing Help on 02.19.14 at 7:31 pm

[…] Boundary value analysis […]

#215 priya on 11.12.14 at 5:45 am

Awesome explanation for Boundary value Analysis and Equivalence Class partitioning. Easy to understand.
Thanks a ton for the clear explanation.

#216 Sudham on 11.26.14 at 1:15 am

Very Useful.. thanks for posting

#217 Manish on 12.01.14 at 7:19 am

Simple & Useful..

Leave a Comment