Lecture 49: Equivalance Class Testing-II

[Music] welcome to this lecture within the final lecture we were discussing in regards to the equivalence type scan cases we had recognized when a function or a unit takes a single parameter we will evaluate the enter value and then identify the set of equivalence courses one is the legitimate set of value an extra is invalid set of price after which for each of the legitimate and invalid we can identify exceptional sets of equivalence lessons but then we’re discussing about multi parameter functions for the reason that it is really common that a operate takes a couple of parameter and in that case how can we identify the equivalence classification one way is that we will determine equivalence classes akin to every of the parameters right here and then for outlining the experiment case one way is that we define the test instances such that each factor here in this set of equivalence classes and a point representative from this set of equivalence courses and a representative from this set of equivalent courses is considered the wrong way is that now we have a exhaustive blend of the points from these three equivalence lessons so these are two distinct strategies to define the equivalence category test circumstances we can simply appear at it further will advance this concept further in our discussion in these days but earlier than that we must be conscious that no longer handiest is that a operate like submit grade can take the roll number course number and grade so the teacher assigns a grade for a distinct path to a scholar identified with the aid of some roll number there are three parameters for this function put up grade but also there can also be some world variables for illustration normalization aspect let us say we have now a policy of normalizing the grades and we multiply the grade with a normalization aspect now we are able to suppose of this as yet another factor which influences the effect right here and as a result we will kind equivalence class no longer best akin to the three enter parameters but additionally akin to the worldwide variable simply extension of our dialogue of multi-parameter operate is that a world variable accessed by a operate it is just like a parameter to the perform and as a consequence we need to identify the equivalence lessons corresponding to that parameter after which we are going to mix the features from these specific equivalence classification allow us to do some more follow let us say we have a operate which takes two parameters one is a integer between minus 99 to plus ninety nine let me simply write the function named part let us say some if title of the function is f takes two parameters one is an integer parameter and it defines a range between minus 99 and 99 the first parameter takes any price the legitimate set of values at the – ninety nine – plus ninety nine and the second parameter is a telephone quantity the phone number is defined with the aid of an field code which is between 1 1 2 9 9 9 9 9 9 9 and then there is a genuine telephone number the subject code and the mobilephone number and the telephone quantity is allow us to say six digit so the 2nd parameter is a mobilephone quantity which is again an integer but then the primary two or three digits they correspond to the subject code and the suffix six digits correspond to the mobile quantity now how do we determine the equivalence courses for this of course the very first thing is that we determine the valid set of equivalence lessons and invalid set of equivalence lessons for the first parameter the legitimate set of equivalences are between any quantity between minus 99 to plus ninety nine and then there are two invalid equivalence courses one is not up to minus ninety nine and one more is larger than 99 however what about the 2d parameter the 2nd parameter again we have a legitimate equivalence classification the place we have a 6 digit integer suffix and the primary two first the prefix that is the subject code is between 11 and 9 9 9 and the invalid set of equivalents may just come up in view that the field code is fallacious or maybe the suffix is unsuitable if we write down our notion we’ll have this one is that we for the primary parameter is a variety after which we have now one equivalence category which is one is the valid equivalence category which is any value within the range a further is invalid equivalence category which is less than minus ninety nine a different invalid class is bigger than ninety nine after which we can have other equivalence lessons as well for example malformed numbers some are characters and so forth non numeric strings empty value etcetera these are the specific invalid equivalence lessons in a similar fashion for the 2d parameter we now have a legitimate equivalence class where the area code is between a hundred to 999 and the cellphone quantity is between 0 zero zero 0 to 999 now the equivalence invalid equivalence lessons or one is the invalid format we would not have the area code and the mobile quantity or we would have the subject code which is less than eleven or larger than ninety nine 999 these are two one-of-a-kind equivalence classes invalid equivalence courses subject code with non numeric characters mobile quantity which is seven digits cell number which is character and so on so we will be able to have many invalid equivalence lessons and one valid equivalence class for each of this and once we determine the equivalence courses for the 2 parameters then we combine consultant values from these two equivalence courses similar to the 2 parameters to define our test cases on the simplest we will talk about about the susceptible equivalence category trying out the place allow us to say we’ve two parameters age and schooling let us say for the age we establish two equivalence lessons one is AIDS higher than 30 and the 2nd is the is larger between 20 to 30 these are the 2 by way of violence lessons in a similar fashion for the 2d parameter education shall we embrace we establish three equivalence courses institution ug and PG this is the schooling relying on the years of schooling we identify whether it’s a college education ugh occasion or a PG education now how will we combine these two values from these two parameters to type the experiment circumstances a method which is called as the vulnerable equivalence classification trying out is that we see each consultant from each equivalence category is represented within the scan case so we see that every equivalence type from the first parameter is covered and in a similar fashion every consultant or the equivalence courses of the 2nd parameter are also protected so if now we have shall we say in equivalence lessons for the primary parameter and allow us to say M equivalence courses of the second parameter then how many scan circumstances we ought to be equipped to do a susceptible equivalence category trying out for this perform can believe over it however then let me simply let you know that we will be able to just take maximum of N and M and that tool for the number of experiment cases required to hold out with colons type testing on the way to have every consultant from every equivalence category to be part of a experiment case the other way we will combine the representative values from one-of-a-kind equivalence classes is known as as the strong equivalence class checking out here every worth of one equivalence category of one parameter is combined with each equivalence category representative ever equivalence type of the other parameter so for the first parameter right here of age we have now one consultant from tuition ug and PG similarly for the 2d equivalence class of the AIDS we once more mix with the three equivalence lessons of the 2d parameter which is the yr of education or in other phrases for every value of the 2nd parameter we combine with each different value of the primary parameter and this is known as a powerful equivalence type testing so the query right here is that how many experiment instances shall be needed if we have two parameters and let’s assume now we have M equivalence classes for the first parameter and n equivalence lessons for the 2d parameter given that for each equivalence type here must mix with all equivalence category at the second parameter we need M into n test instances centered on the equivalence lessons we are able to additionally combine them in one more approach which is known as a robust effective equivalence category checking out when you look at the two types of trying out we viewed prior we did not take into account the invalid set of equivalence classes we simply viewed the legitimate equivalence lessons but if we consider the invalid set of equivalence lessons also then we name it as a potent checking out the proposal is modest only a small extension of the strong equivalence classification testing here we keep in mind the invalid values as good and this types our set of experiment cases if we if the valid plus invalid we have M equivalence lessons for first parameter n for the 2d parameter so these are the one of the vital valid equivalence lessons and invalid equivalence lessons then the number of checks stress is required for equivalence category trying out might be M into n let us see allow us to try to remedy some examples let us say for a bank utility now we have a perform the title of the perform is compute curiosity and the parameter is days which is a integer and the operate description is that it will have to compute three percent interest for deposits less than fifteen days four percentage for deposit between fifteen days to at least one with it it’s six percent for a hundred and eighty days up to one yr and 7 percentage for between one two three and eight percent for three years and above so what will be the equivalence lessons here this can be a rather easy illustration we have now only one parameter and we examine the output and each and every of these correspond to a scenario after which we keep in mind one equivalence category corresponding deposit between zero to fifteen days 15 to one hundred eighty days and so on and the invalid set of inputs which is an invalid day bad day and many others now let’s are attempting fairly extra complex drawback the place we have the compute interest however then it takes two parameters fundamental amount deposited and the times for which the deposit is made and the function description says that if the deposit amount that’s the predominant is a couple of good fortune then the rate of interest is 7% 8% 9% but when the deposit is lower than 1 lakh then it’s 6% 7% eight% so we see right here that for the two parameters we now have two equivalence classes one is more than one Lac not up to one lakh and the times is one 12 months three 12 months and more than three years which will have either we click over lens classification checking out or a robust equivalence category checking out as required this is a different hindrance allow us to say we have now a function called a substring takes two parameters s 1 and s 2 s 1 is a string whose size is between 20 is as much as 20 characters and s 2 is a string whose length is less than 5 and the perform takes whether or not the 2d string is a substring of the primary again we can kind two equivalence type hierarchy one is established on this string which is lower than invalid set is more than 20 or it can be manage persona and so on and then the legitimate set of strings for ashwin valid and invalid set of s 2 and then we would have an additional equivalence category hierarchy which is whether it is a substring of this or not a substring of this if we symbolize right here the info input data for drawback one we will have invalid and a valid set of equivalence classification in a similar fashion for s2 we will have valid and invalid and also by looking on the s-1 and s2 for legitimate s1 and s2 we are able to have another hierarchy whether or not it is a substring or not a substring now let’s begin discussing about one more form of black field testing referred to as a particular price testing within the equivalence class trying out we divided the enter information area into equivalence courses such that each factor belonging to at least one equivalence category resulted in an identical conduct however here there are some values which are suspect the tester has factors to consider that execution of the program with unique particular values could expose bugs there are two forms of dicy values that tester can establish one is known as as the general hazard the general risk that is recognized with the aid of examining the equivalence courses and the boundary values of the equivalence courses more commonly are suspect however then there are precise values which are of danger which is probably not boundary for example the tester would believe that okay for this function which takes a 12 months and produces the number of days within the year is the leap yr considered by using the programmer or not so this the tester via looking at the functionality he guesses some values which maybe inclined to error and people are known as as the unique danger values additionally to equivalence category testing we ought to do exact price testing and one sort of distinctive price trying out is the final risk an instance is the boundary price testing and likewise the particular chance data values will have to be used to outline experiment instances now allow us to look at the boundary price evaluation this can be a general value normal threat each time we identify equivalence lessons the programmers are very prone to commit error on the boundary of the equivalence lessons here there’s one legitimate set of equivalence classification valid set of values which constitute an equivalence class one invalid set of values constituting an in invalid equivalence type and one other invalid equivalence classification the programmers are prone to commit blunders on the boundary here for instance your whether one is included as in the legitimate or invalid they might now not have looked after that sufficiently good and therefore errors may just arise right here at the boundaries and for that reason we need to comprise the information values on the boundary as experiment instances and those are referred to as because the boundary price test instances the foremost motive right here is that programmer repeatedly harassed and rather of less they might use a less than equal to symbol etc and that’s the motive we have got to decide on experiment circumstances on the boundaries of extraordinary equivalence courses if boundaries exist we had visible that if it’s a set input domain is a suite of values then there is not any boundary but if it’s a range of values then there are boundaries between one of a kind equivalence courses now let’s examine if we have input is a variety it’s a variety and the boundaries are a and B then we need to decide upon no longer best a but we ought to prefer one that is past a just to assess whether the programmer has made a mistake and even the one which is will have to be invalid or yet another equivalence type can be regarded as a part of this equivalence category similarly we might take a price that is simply inside and in a similar fashion for B 1 on B an extra moderately within and a different just external so if the range is defined as any price between minus 3 to 10 we will take minus three we will take 10 these are the 2 boundaries one moderately away outside the boundary which is minus 2 eleven and 1 which is solely inside the boundary this in reality can be the equivalence classification test so we need to define 5 values for a variety in a similar way the input is the range it’s a three two one zero two will define one at the boundary three 1 is 1 zero 2 included the boundary in the test case one past the boundary within the diminish aspect which is minus 1 a different past the boundary on the better aspect which is 201 in-between which is 5 let’s see for some designated examples how do we outline the boundary worth scan circumstances let’s assume for some obstacle where the function is based on the age it recommends whether or not may also be hired or no longer employed checks if the age is between 0 to 16 it shows doomfire it’s between 16 to 18 displays can hire phase-time groundwork if it is between 18 to fifty five shows may just hire full-time and between fifty five to 99 do not rent so there are four equivalence lessons here corresponding to this 4 exceptional situations and the boundaries are at sixteen 18 and 55 however then we ought to realise that this description of the function itself is a bit of challenging when you consider that it is sixteen regarded as don’t rent or is it is going to rent and part-time basis in a similar fashion whether it is precisely 18 what should be the output in a similar way fifty five so even when describing the situation we are able to commit mistake at the boundary as exemplified here that the boundary values we’ve no longer taken care sufficiently it can be the specification of the problem itself is faulty and no longer certainly recognized the boundaries must belong to which equivalence classification and of path the equal thing will get reflected in the application and therefore boundary value testing may be very essential we can discontinue right here and we will proceed in the subsequent category thanks

As found on YouTube zxczxcz

Add Comment