-Something that we saw when we were looking at the split - -2
-program before is that if we just combine the interesting values that - -3
-we identify, we might end up with a lot of cases. - -4
-And I mentioned that we, we're going to look at some way of - -5
-addressing that problem. And this is exactly what happens in the - -6
-next step of the category partition method, in which we identify constraints - -7
-among choices. And why do we identify these constraints? We do - -8
-that to eliminate meaningless combinations of - -9
-inputs. If you remember, for example, - -10
-we had the case in which we were trying to - -11
-create a string with a size less than 0, which - -12
-doesn't make any sense. And very importantly, we also do - -13
-that to reduce the number of test cases. Because every time - -14
-we constrain one of the possible choices, we eliminate possible - -15
-test cases, so we can use it to keep under - -16
-control the number of tests that we generate. There are - -17
-three types of properties. The - -18
-pair property...if, error properties, and properties - -19
-of type single. So we're going to look at what these - -20
-properties mean, using, once more, our example of the split program. - -21
-In particular, we're going to use some of the choices that we - -22
-identified earlier. So let's look, for example, at choice 0, for - -23
-category length of the string. All we can say is that, - -24
-if the length is 0, this define a special property of - -25
-the string. And that was specified in this way by saying - -26
-that this identifies property zerovalue. So every time that we use - -27
-this choice, zerovalue is defined. At this point, we can use - -28
-this to exclude some meaningless - -29
-combinations. For instance, consider special characters. - -30
-If we have a string of length 0, which means a - -31
-string with no characters. Obviously, there - -32
-cannot be special characters. So, considering - -33
-this combination will just be a waste of time. So what - -34
-we do is that we specify next to this choice, that we - -35
-will only consider this if length is not 0. And we - -36
-do this by saying that we consider this only if not zerovalue. - -37
-So, if zerovalue is not defined. So this pair is an - -38
-example of a property...if case. Define a property and use that - -39
-property. Now let's look at a case in which we might - -40
-want to use an error property. For instance, when we look at - -41
-the category value for the input size, the choice value less - -42
-than 0 is an erroneous choice. So it's a choice that - -43
-we selected to test a possibly erroneous situation, so we can - -44
-mark this as an error property. And what that means is that - -45
-when generating a combination of choices, we will consider this only - -46
-once because we assume that we just want to test this error condition - -47
-once. Finally, the single property is a property that we use - -48
-when we want to limit the number of test cases. And it's - -49
-similar as an effect to error. It just has a different - -50
-meaning. So what we do when we use the single property is - -51
-that we're saying that this choice, we want to use in only - -52
-one combination. So don't combine it multiple times. And that, of course, - -53
-given the combinatorial nature of the problem, cuts down dramatically - -54
-the number of test cases. And we might use, for - -55
-instance, the single property for maxint, which means that we - -56
-will only have one test case in which the size is - -57
-equal to maxint. We're actually going to see a demo - -58
-on this topic so we'll have more chances of seeing how - -59
-properties work in practice and how good they are at - -60
-eliminating meaningless combinations and at reducing the number of test cases. -- cgit 1.4.1