25:
249:
703:
different paths to perform slightly different actions. Regarding the input and output interfaces to the component this difference will not be noticed, however in your grey-box testing you would like to make sure that both paths are examined. To achieve this it is necessary to introduce additional equivalence partitions which would not be needed for black-box testing. For this example this would be:
524:
726:
using the equivalence partitioning method, if the software includes sub-partitions which are unknown to the tester. Also, in simplistic cases, the benefit of reducing the number of test values by using equivalence partitioning is diminished, in comparison to cases involving larger ranges (Example: 0-1000, 1001-2000, 2001-3000).
709:
To check for the expected results you would need to evaluate some internal intermediate values rather than the output interface. It is not necessary that we should use multiple values from each partition. In the above scenario we can take -2 from invalid partition 1, 6 from valid partition P1, 7 from
136:
technique that divides the input data of a software unit into partitions of equivalent data from which test cases can be derived. In principle, test cases are designed to cover each partition at least once. This technique tries to define test cases that uncover classes of errors, thereby reducing the
685:
The testing theory related to equivalence partitioning says that only one test case of each partition is needed to evaluate the behaviour of the program for the related partition. In other words, it is sufficient to select one test case out of each partition to check the behaviour of the program. To
702:
as well. Imagine an interface to a component which has a valid range between 1 and 12 like the example above. However internally the function may have a differentiation of values between 1 and 6 and the values between 7 and 12. Depending upon the input value the software internally will run through
678:
In general an input has certain ranges which are valid and other ranges which are invalid. Invalid data here does not mean that the data is incorrect, it means that this data lies outside of specific partition. This may be best explained by the example of a function which takes a parameter "month".
725:
In cases where the data ranges or sets involved approach simplicity (Example: 0-10, 11-20, 21-30), and testing all values would be practical, blanket test coverage using all values within and bordering the ranges should be considered. Blanket test coverage can reveal bugs that would not be caught
689:
An additional effect of applying this technique is that you also find the so-called "dirty" test cases. An inexperienced tester may be tempted to use as test cases the input data 1 to 12 for the month and forget to select some out of the invalid partitions. This would lead to a huge number of
140:
Equivalence partitioning is typically applied to the inputs of a tested component, but may be applied to the outputs in rare cases. The equivalence partitions are usually derived from the requirements specification for input attributes that influence the processing of the test object.
679:
The valid range for the month is 1 to 12, representing
January to December. This valid range is called a partition. In this example there are two further partitions of invalid ranges. The first invalid partition would be ≤ 0 and the second invalid partition would be ≥ 13.
519:
On the basis of the code, the input vectors of are partitioned. The blocks we need to cover are the overflow in the positive direction, negative direction, and neither of these 2. That gives rise to 3 equivalent classes, from the code review itself.
706:... -2 -1 0 1 ..... 6 7 ..... 12 13 14 15 ..... --------------|---------|----------|--------------------- invalid partition 1 P1 P2 invalid partition 2 valid partitions
686:
use more or even all test cases of a partition will not find new faults in the program. The values within one partition are considered to be "equivalent". Thus the number of test cases can be reduced considerably.
697:
which is strictly checking a software component at its interface, without consideration of internal structures of the software. But having a closer look at the subject there are cases where it applies to
599:
682:... -2 -1 0 1 .............. 12 13 14 15 ..... --------------|-------------------|--------------------- invalid partition 1 valid partition invalid partition 2
717:. Having determined the partitions of possible inputs the method of boundary value analysis has to be applied to select the most effective test cases out of these partitions.
137:
total number of test cases that must be developed. An advantage of this approach is reduction in the time required for testing software due to lesser number of test cases.
206:
743:, a free test generation tool that is combining test path generation from UML state machines with equivalence class generation of input values.
266:
89:
61:
42:
675:
has detailed information about it. Note that the graph only covers the overflow case, first quadrant for X and Y positive values.
220:
are exactly the same, that is, they cover the same instructions, at same step. This would evidently mean that the relation cover
68:
799:
75:
775:
288:
108:
57:
540:
46:
713:
Equivalence partitioning is not a stand-alone method to determine test cases. It has to be supplemented by
690:
unnecessary test cases on the one hand, and a lack of test cases for the dirty ranges on the other hand.
746:
605:
270:
259:
82:
820:
302:
172:
for details ) others do not. This gives the interesting relationship between input test vectors:-
714:
672:
35:
175:
232:. This partitioning is called equivalence class partitioning of test input. If there are
209:
161:
149:
8:
153:
795:
771:
694:
229:
145:
699:
133:
814:
169:
646:
225:
165:
532:
792:
Foundations of
Software Testing: Fundamental Algorithms and Techniques
747:
https://books.google.com/books/about/Software_Testing_Techniques.html
157:
735:
24:
740:
693:
The tendency is to relate equivalence partitioning to so called
301:
The demonstration can be done using a function written in
168:
some instructions of that algorithm get covered, ( see
523:
216:
if and only if the coverage foot print of the vectors
543:
269:. Please help to ensure that disputed statements are
178:
710:
valid partition P2 and 15 from invalid partition 2.
49:. Unsourced material may be challenged and removed.
593:
531:To solve the input problem, we take refuge in the
240:vectors are sufficient to fully cover the system.
200:
649:at the strict condition of the equality that is
812:
527:Demonstrating Equivalence Class Partitioning
736:The Testing Standards Working Party website
594:{\displaystyle z_{min}\leq x+y\leq z_{max}}
144:The fundamental concept of ECP comes from
765:
289:Learn how and when to remove this message
109:Learn how and when to remove this message
522:
265:Relevant discussion may be found on the
604:we note that there is a fixed size of
813:
789:
608:hence, the z can be replaced with:-
242:
47:adding citations to reliable sources
18:
641:∈ { INT_MIN , ... , INT_MAX }
634:∈ { INT_MIN , ... , INT_MAX }
152:. A software system is in effect a
13:
729:
224:would partition the domain of the
14:
832:
770:, Springer-Verlag, p. 623,
671:are called the boundary values,
247:
23:
34:needs additional citations for
783:
759:
720:
126:equivalence class partitioning
1:
794:, Pearson India, p. 96,
752:
7:
10:
837:
768:Practical Software Testing
606:Integer (computer science)
490:"Overflow (negative)!
418:"Overflow (positive)!
236:equivalent classes, only
58:"Equivalence partitioning"
16:Software testing technique
766:Burnstein, Ilene (2003),
201:{\displaystyle _{a}C_{b}}
148:which in turn comes from
307:
122:Equivalence partitioning
790:Mathur, Aditya (2007),
715:boundary value analysis
673:Boundary-value analysis
160:in some implementation
595:
528:
202:
596:
526:
212:between test vectors
203:
541:
258:factual accuracy is
210:equivalence relation
176:
162:programming language
150:equivalence relation
43:improve this article
154:computable function
645:The values of the
591:
529:
198:
156:implemented as an
801:978-81-317-0795-1
695:black box testing
299:
298:
291:
230:equivalence class
164:. Given an input
146:equivalence class
119:
118:
111:
93:
828:
821:Software testing
805:
804:
787:
781:
780:
763:
700:grey box testing
670:
659:
642:
635:
622:
613:INT_MIN ≤
600:
598:
597:
592:
590:
589:
559:
558:
515:
512:
509:
506:
503:
500:
497:
494:
491:
488:
485:
482:
479:
476:
473:
470:
467:
464:
461:
458:
455:
452:
449:
446:
443:
440:
437:
434:
431:
428:
425:
422:
419:
416:
413:
410:
407:
404:
401:
398:
395:
392:
389:
386:
383:
380:
377:
374:
371:
368:
365:
362:
359:
356:
353:
350:
347:
344:
341:
338:
335:
332:
329:
326:
323:
320:
317:
314:
311:
294:
287:
283:
280:
274:
271:reliably sourced
251:
250:
243:
239:
235:
223:
219:
215:
207:
205:
204:
199:
197:
196:
187:
186:
134:software testing
114:
107:
103:
100:
94:
92:
51:
27:
19:
836:
835:
831:
830:
829:
827:
826:
825:
811:
810:
809:
808:
802:
788:
784:
778:
764:
760:
755:
732:
730:Further reading
723:
707:
683:
661:
650:
637:
630:
621:≤ INT_MAX
612:
579:
575:
548:
544:
542:
539:
538:
517:
516:
513:
510:
507:
504:
501:
498:
495:
492:
489:
486:
483:
480:
477:
474:
471:
468:
465:
462:
459:
456:
453:
450:
447:
444:
441:
438:
435:
432:
429:
426:
423:
420:
417:
414:
411:
408:
405:
402:
399:
396:
393:
390:
387:
384:
381:
378:
375:
372:
369:
366:
363:
360:
357:
354:
351:
348:
345:
342:
339:
336:
333:
330:
327:
324:
321:
318:
315:
312:
309:
295:
284:
278:
275:
264:
256:This section's
252:
248:
237:
233:
228:into multiple
221:
217:
213:
192:
188:
182:
179:
177:
174:
173:
115:
104:
98:
95:
52:
50:
40:
28:
17:
12:
11:
5:
834:
824:
823:
807:
806:
800:
782:
776:
757:
756:
754:
751:
750:
749:
744:
738:
731:
728:
722:
719:
705:
681:
624:
623:
602:
601:
588:
585:
582:
578:
574:
571:
568:
565:
562:
557:
554:
551:
547:
308:
297:
296:
255:
253:
246:
195:
191:
185:
181:
117:
116:
31:
29:
22:
15:
9:
6:
4:
3:
2:
833:
822:
819:
818:
816:
803:
797:
793:
786:
779:
777:0-387-95131-8
773:
769:
762:
758:
748:
745:
742:
739:
737:
734:
733:
727:
718:
716:
711:
704:
701:
696:
691:
687:
680:
676:
674:
669:
665:
658:
654:
648:
643:
640:
633:
627:
620:
616:
611:
610:
609:
607:
586:
583:
580:
576:
572:
569:
566:
563:
560:
555:
552:
549:
545:
537:
536:
535:
534:
525:
521:
306:
304:
293:
290:
282:
272:
268:
262:
261:
254:
245:
244:
241:
231:
227:
211:
193:
189:
183:
180:
171:
170:code coverage
167:
163:
159:
155:
151:
147:
142:
138:
135:
131:
127:
123:
113:
110:
102:
91:
88:
84:
81:
77:
74:
70:
67:
63:
60: –
59:
55:
54:Find sources:
48:
44:
38:
37:
32:This article
30:
26:
21:
20:
791:
785:
767:
761:
724:
712:
708:
692:
688:
684:
677:
667:
663:
656:
652:
644:
638:
631:
628:
625:
618:
614:
603:
530:
518:
300:
285:
276:
257:
143:
139:
129:
125:
121:
120:
105:
96:
86:
79:
72:
65:
53:
41:Please help
36:verification
33:
721:Limitations
647:test vector
226:test vector
166:test vector
99:August 2008
753:References
662:INT_MAX =
651:INT_MIN =
533:inequation
460:&&
448:&&
388:&&
376:&&
279:April 2021
69:newspapers
573:≤
561:≤
267:talk page
158:algorithm
815:Category
313:safe_add
260:disputed
478:fprintf
406:fprintf
132:) is a
83:scholar
798:
774:
741:Parteg
505:return
496:"
484:stderr
424:"
412:stderr
208:is an
85:
78:
71:
64:
56:
629:with
466:>=
394:<=
90:JSTOR
76:books
796:ISBN
772:ISBN
660:and
636:and
626:and
454:<
442:<
382:>
370:>
218:a, b
214:a, b
62:news
340:int
328:int
319:int
310:int
130:ECP
124:or
45:by
817::
666:+
655:+
617:+
499:);
493:\n
433:if
427:);
421:\n
361:if
305::
668:y
664:x
657:y
653:x
639:y
632:x
619:y
615:x
587:x
584:a
581:m
577:z
570:y
567:+
564:x
556:n
553:i
550:m
546:z
514:}
511:;
508:c
502:}
487:,
481:(
475:{
472:)
469:0
463:c
457:0
451:b
445:0
439:a
436:(
430:}
415:,
409:(
403:{
400:)
397:0
391:c
385:0
379:b
373:0
367:a
364:(
358:;
355:b
352:+
349:a
346:=
343:c
337:{
334:)
331:b
325:,
322:a
316:(
303:C
292:)
286:(
281:)
277:(
273:.
263:.
238:N
234:N
222:C
194:b
190:C
184:a
128:(
112:)
106:(
101:)
97:(
87:·
80:·
73:·
66:·
39:.
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.