Tuesday, February 23, 2016

Equivalence Cast Partitioning & Boundary Value Analysis

| Tuesday, February 23, 2016
Equivalence partitioning in addition to Boundary value analysis both the techniques assistance us to notice essay out information effectively which volition almost comprehend all the essay out scenarios in addition to its all assistance us inwards alternative of essay out cases.

As nosotros all know testing for all possible status is non possible, if person stimulate to essay out software for all the possible status thus it mightiness convey to a greater extent than than 2-3 twelvemonth or fifty-fifty to a greater extent than than that.

Take a example, suppose in that place is an e-commerce site nether essay out in addition to you lot are the Tester in addition to 1 of the requirement of e-commerce site is ”user should larn 5% discount on purchasing goods worth rupee 5,000 to 10,000 in addition to if user buy to a greater extent than than 10,001 thus it should larn 7% discount”.

After agreement the requirements testers involve to write essay out cases. It is possible to banking enterprise lucifer the discount for each total ?? retrieve on it. Would you lot write the essay out cases every bit follow ??

Under next status user should non larn whatsoever discount
--> banking enterprise lucifer the discount when user buy a goods of 1 rupee.
--> banking enterprise lucifer the discount when user buy a goods of two rupee.
.
.
.up to 
--> banking enterprise lucifer the discount when user buy a goods of 4999 rupee.


Under next status user should larn 5% discount
--> banking enterprise lucifer the discount when user buy a goods of 5001 rupee.
--> banking enterprise lucifer the discount when user buy a goods of 5002 rupee.
.
.up to 9999
--> banking enterprise lucifer the discount when user buy a goods of 10,000 rupee.

Under next status user should larn 7% discount
--> banking enterprise lucifer the discount when user buy a goods of 10,001 rupee.
--> banking enterprise lucifer the discount when user buy a goods of 10,002 rupee.
.
.up to infinity
--> banking enterprise lucifer the discount when user buy a goods of infinity rupee.

Now retrieve on it, to simply banking enterprise lucifer the no discount status way when user buy a goods less than 5000 rupee thus organization should non order discount to her. To evaluate this for each in addition to every status tester involve to write 5000 essay out cases. For the minute status way when user buy a goods inwards betwixt 5001 to 10,000 rupees, this requires 4999 essay out cases. And instantly concluding status when user buy a goods worth rupee to a greater extent than than 10,000 thus in that place are interplanetary space essay out cases involve to live on written.So this is possible to write such a huge release of essay out cases in addition to execute them ??? Definitely a Big NO.

To overcome this problem. These techniques are developed. boundary value analysis in addition to equivalence degree partitioning are assistance us a lot. Using those techniques release of essay out cases tin live on reduced to few essay out cases without compromising the character of testing. It tin live on useful inwards whatsoever testing phase, similar it is useful inwards unit, integration , organization etc. Means non restriction to exercise at item phase.Both the testing techniques are Black Box Testing Techniques in addition to Without knowing the code construction nosotros tin exercise these testing techniques. Let hash out first, Equivalence degree partitioning. How does it assistance us for alternative essay out cases.

Equivalence Class Partitioning :
Equivalence degree partitioning, hither nosotros practice a equivalence exercise way inwards elementary give-and-take nosotros practice a equivalence partitions(groups). To empathise this lets convey a inwards a higher house given illustration in addition to how practice nosotros brand a exercise or grouping of it. 
 Equivalence partitioning in addition to Boundary value analysis both the techniques assistance us to notice  Equivalence Class partitioning & Boundary value analysis
First empathise the image. We receive got created 3 equivalence partitions,

First exercise is 0 to 4,999, minute exercise is 4,999 to 10,000 in addition to the 3rd exercise in addition to concluding 1 is from 10,000 to infinity.

Here nosotros made an equivalence sectionalization every bit per the status given. Means logically if nosotros buy a skilful betwixt 0 to 4,999 organization should non order us whatsoever discount in addition to inwards betwixt 5,000 to 10,000 organization should order us v % discount in addition to inwards a higher house that nosotros would larn vii % discount. Based on this scenario nosotros made a equivalence part/group As you lot tin run into inwards in a higher house image.

So using this techniques nosotros volition pick out 1 value from each sectionalization / part. So from kickoff grouping nosotros receive got selected value 2,999, from minute grouping nosotros receive got selected value 6,500 in addition to from concluding grouping nosotros receive got selected an values 11,200 in addition to 22,888.

So later using Equivalence degree partitioning, nosotros receive got derived next essay out cases.

--> banking enterprise lucifer the discount when user buy a goods of 2,999.
Expected Result : user should non larn whatsoever discount.

--> banking enterprise lucifer the discount when user buy a goods of 6,500.
Expected Result : user should larn 5% discount.

--> banking enterprise lucifer the discount when user buy a goods of 11,200.
Expected Result : user should larn 7% discount.

--> banking enterprise lucifer the discount when user buy a goods of 22,888.
Expected Result : user should larn 7% discount.

See simply a iv essay out cases past times using equivalence degree partitioning. Test instance numbers are dramatically decreased to simply iv in addition to nosotros volition derive few to a greater extent than essay out cases from boundary value analysis which nosotros volition live on discussed below.

Boundary Value Analysis :
Boundary Value analysis, if you lot carefully read it, you lot volition larn about stance nearly how boundary value analysis work. Here nosotros too involve to practice a sectionalization every bit nosotros created inwards equivalence degree partitioning but dissimilar selecting whatsoever value from each partition, hither inwards boundary value analysis nosotros pick out a value which is 1 less than sectionalization in addition to 1 to a greater extent than than sectionalization in addition to equal to partition.

 Equivalence partitioning in addition to Boundary value analysis both the techniques assistance us to notice  Equivalence Class partitioning & Boundary value analysis

See the image, sectionalization values are 0, 4999 in addition to 10000 these are the partitions. So inwards boundary value analysis nosotros involve to pick out the value -1,0 in addition to +1 for 0 sectionalization in addition to 4998, 4999, 5000 for sectionalization 4,999 in addition to for the concluding sectionalization nosotros volition larn 9999,10000 in addition to 10001.

Means nosotros volition receive got ix essay out cases amongst essay out information from boundary value analysis every bit shown below.

--> banking enterprise lucifer the discount when user buy a goods of -1 rupee.
Expected Result : System should non allow buy of -1 rupee goods. (this looks similar unrealistic essay out instance but it is possible, suppose if you lot added a goods nation lookout in addition to inwards cost you lot entered -1 if organization does non receive got validation thus it volition receive got -1 also.)

--> banking enterprise lucifer the discount when user buy a goods of 0 rupee.
Expected Result : System should forestall 0 rupees goods.

--> banking enterprise lucifer the discount when user buy a goods of +1 rupee.
Expected Result : user should non larn whatsoever discount.

--> banking enterprise lucifer the discount when user buy a goods of 4,998 rupee.
Expected Result : user should non larn whatsoever discount.

--> banking enterprise lucifer the discount when user buy a goods of 4,999 rupee.
Expected Result : user should non larn whatsoever discount.

--> banking enterprise lucifer the discount when user buy a goods of 5,000 rupee.
Expected Result : user should larn 5% discount.

--> banking enterprise lucifer the discount when user buy a goods of 9,999 rupee.
Expected Result : user should larn 5% discount.

--> banking enterprise lucifer the discount when user buy a goods of 10,000 rupee.
Expected Result : user should larn 7% discount.

--> banking enterprise lucifer the discount when user buy a goods of 10,001 rupee.
Expected Result : user should larn 7% discount.

See whole requirement volition larn tested inside simply xiii essay out cases. By using boundary value analysis in addition to equivalence degree partitioning nosotros tin derive information in addition to too cut back the essay out cases require to evaluate whole system.

In curt give-and-take nosotros tin nation :
Equivalence Class Partitioning : way selecting whatsoever value from each partition.
Boundary Value Analysis : pick out the value which is 1 less than partition, 1 to a greater extent than than sectionalization in addition to 1 equal to partition.

Related Posts