 వాతా వట్లె ల్ ధాల్లె ల్ల్లె గావాలిల్వాల్లాల్ల్ 알아 గాల్లె లావాల్ల్లె కరంర్గనాకె కూర్చా నిరిన్సంవ్ రెళాలనా. in the last session we had gone through different types of testing just to recap of what are testing methods that we have done in the last session we went through a recap of the rate one session all the 11 positions we had gone through and also we defined about IV and V validation verification and we studied about dynamic testing we had defined several definitions of dynamic testing it is very important to understand it is a process of evaluating the system when the system is executing that means we do the testing when we execute the program the other method compared to dynamic testing is the static testing this will be done without the need of execution of the software so we studied about dynamic testing with couple of definitions also we know the other method of testing using the static testing which does not need the program to execute so this also could be software analysis, walkthrough, inspections etc also we had gone through two types of dynamic testing at a broader level explicit dynamic testing where most of the system functions are tested by specifically designed for that purpose implicit dynamic testing we do the testing based on what we have done using explicit dynamic testing that is the process that we had done for dynamic testing will help us in understanding or analyzing some more test cases that is all directly or implicitly tested and structure based testing for dynamic testing we had already gone through in the unit walk that is the M method which has little principles so similar approaches are going to be in the test process which we have defined in the beginning of the session later on then we also studied that both are required because dynamic testing alone is not sufficient to completely test the embedded system static means of testing also is important so both of these techniques complement each other static analysis will be used in all the days because those days we did not have much tools or the tools were very expensive that is why we used to do static analysis more compared to dynamic testing nowadays dynamic testing is more basically being used and automated a lot whether it is not possible or where we need to complement with sufficient coverage and all that so there we will do the static testing also we know that the different techniques are all based on two basic groups black box testing and white box testing and black box testing testing techniques, white box testing techniques so we are going to currently so three broader things that we need to understand in different techniques strategy, test case selection methods, coverage criteria so we detailed about test case selection methods we know that black box testing is basically driven from the data or the functionality of the white box we study in detail the implementation of the logic underneath the embedded software here is the depiction of black box and white box we can see the top of the black box covering the functionality white box for the component testing see in between certain embedded systems for the Apollo A box it is a mix of both white box as well as black box and coming to the coverage we had seen the formula how they do the code coverage total code and executed code both of them are used in coming up how much of the percentage we have covered so it is simple executed code divided by total code in terms of percentage use the code coverage this for the white box similarly for black box we measure the coverage of the requirements total number of requirements that we tested against total number of requirements that will give you the coverage in terms of percentage and also we had outlined the difference between between black box testing and white box testing also we underlined black box over testing advantages black box over testing advantages white box testing advantages and white box testing disadvantages so this was some of the testing aspects black box testing now going to the today's session elaborating different black box testing methods so we will detail on the selection technique called equivalence partitioning what is equivalence partitioning to understand what is equivalence partitioning we need to have some background we all know that we do embedded systems testing with the help of the test cases we have studied the strategy test planning defining the test cases given a requirement of the specification so typically the universe of all possible test cases is so large difference suppose we had gone through an example requirement say 1 to 10 so we know that the system can take from 1 to 10 we know that we can define the inputs in terms of 1 to 10 but in larger systems this may have from 1 to 10,000 or maybe even 100,000 whatever it is so it is going to happen such that it may become very large so it is possible to test all differences so we need to select only relatively small number of test cases because we know that it is going to work for 1 it is going to work for 2, 3, 10 and some cases it may not work so we need to understand what are inputs that basically it takes so we need to let that in the small number of test cases all test cases will not be required so that is what the partitioning the number of test cases whatever we have is called equivalence equivalence classes so the next comes the question which test cases we should choose or which test cases we should select so for all of these we come across in the concept called equivalence function this will help in doing the test case selection okay so some more details 2 test cases are considered to be equivalent if we expect the program to process them the same way that means we know for a system if we feed 1 or if we feed 2, 3 whatever it is and we get the same result and we don't need to repeat them we call that as equivalent similarly we group different equivalence test cases equivalent test cases they all can be grouped how they can be grouped we will study in the that means identifying the sets of inputs under the assumption that all values are treated exactly the same by the system of course you feed all these values the behavior is same the output is same that means we are able to test with these values so equivalence part is the most fundamental test case so the aspect of whatever software testing you want this is a mandatory testing technique that they adopt okay we identify the sets of inputs under the assumption that all values are treated under the behavior is same the next one is make one test case for each identification that means we have identified the sets of inputs which behaves the same then out of that you identify what test case the partition of the input domain of a program so that a test of the relative value of the class is equivalent to test of other values of the class telling in detail saying that the testing of one class is equal to the other one this technique involves designing of test cases for testing classes of errors instead of individual errors that means this technique basically identifies the design of most appropriate test case for identifying the test classes which will result in failures of errors in a group of the system of the test than of individual errors that means if I feed one the system is behaving in a faulty way and they are feeding three, four different different way we identify appropriate failures or errors as a group one to ten suppose I am going to I know that it is going to fail then the most appropriate one so in detail further if one test case in an equivalence class detects an error all other test cases in the equivalence class that means the type of error that it finds is the same conversely if one test case did not detect an error that means in that group if it is not finding one test case other test case is also expected to not find any error so other definitions are equivalence partitioning helps to reduce the number of test cases and ensure that software perform the way it is supposed to do for different kinds of so as I said different number of inputs we can have to test it but it is not realistic to have all those especially the larger systems where we have thousands of values so this equivalence partitioning will help to reduce the number so equivalence partitioning is one of the most black box testing techniques basically the underlying idea is the input domain can be divided into number of equivalence classes the characteristics of an equivalence class is the assumption that the values belonging to that class are handled in exactly same manner by the program if the assumption is true then it would suffice to select only one single test case for each equivalence class because multiple test cases from the same equivalence class would repeat so testing is unnecessarily repeated so it will be all over so coverage is by dividing the number of equivalence class we know how much is done so it is basically the number of equivalence classes by the total number of equivalence classes so the workflow when using equivalence partitioning is to analyze these possibilities and try to identify all likely equivalence classes the thing we do is we analyze specification we analyze the specification and try to identify all likely equivalence classes so when doing this it is important to remember that there may be dependences between different input variables we feed variables A B C etc so very possible input value belongs to exactly one equivalence class that variation is there then we can divide into different classes so the final next step is to check choose a good representative out of all is equivalence classes to form the test case for that equivalence of the equivalence partitioning identification in elaboration of that we probably go through different examples we may understand better so different views are there based on the reference that we have the reference I have put it in the bottom so to have a clear understanding equivalence partition theory so equivalence by the total number of test cases by partitioning the input conditions into a finite number of equivalence classes so we know we analyze the specification and come up with the equivalence class so this will reduce the number of test cases total number of test cases every two to guide the tester using sample strategy that means that means as part of the strategy the next thing is we do a sampling that means there are 100 possible way to compare a good test case or final error so what we do is we do a sampling like 10% 20% of that which is enough to bring the errors or the failures of the particular system so that we will be done with the help of equivalence partitioning that is what it means okay continuation of the equivalence partition of the description it is the principle of deriving the test cases the input domain all possible interval is partitioned in the equivalence class for all input values in a particular equivalence the system shows the same kind of that means the process is the same the output that is expected of that the functionality that is getting it is quicker out of most set of equivalence class inputs are same the idea behind this principle is that all inputs from the same equivalence class have an equal chance of finding a defect and that testing with more inputs from the same class hardly increases that means we have already found a defect it won't increase any both effects finding a defect instead of testing every possible input value it is sufficient to choose one input from each equivalence class this greatly reduces the number of test cases while still achieving a good coverage so what we understand from the equivalence partition is that we divide the entire bunch of test cases based on the behavior that the inputs that we provide will result in the failure of the process so we divide all of them as a equivalence class okay so the equivalence partitioning is basically on it is called a two level of two partitioning one is called valid other one is called invalid test cases that means the one that are going to be tested with the help of the you can say normal range or the expected way of usual behavior that is called valid test cases or valid equivalence class visual behavior from the systematic test all this comes under valid class the one that is not so usual or what is not expected when the system is running normally each one of other behavior than what is normally done so this can be invalid test cases so two groups of valid and invalid test cases are all coming under equivalence partitioning and the result of equivalence partitioning we are going to have two types of partitioning valid and invalid so probably okay so let us see equivalence partitioning also there are three types that we have for equivalence partitioning so there are two basic methods two basic partitioning that we have for equivalence partitioning that is why it is called as partitioning one is valid partitioning other one is invalid partitioning so what is valid partitioning when we have the system running normally that means executing normally working as expected so the test that will result in normal behavior or usual behavior those are all coming under valid test cases the inputs that with the help of those test cases will result in usual behavior or the normal 1 to 10 is what the system expected to give or 1 to 10 is what the system expected to take input proper result will come under all valid equivalence the other way of testing is the help of negative values or outside the boundary so it will result in some sort of a what is it called other behavior of the normal system so those are all coming under invalid test cases basically what we had to try time to say we may have the left side we use key and key number of valid test cases these dots blanked out for all maybe we can group something like one group is group could be one more group can comprising this I will repeat so we have this rectangle box I will define all the test cases that is what we do in that we are going to have two partitions in valid what we do all the valid inputs which will behave in the same output we are going to define one equivalent class the first one next could be this one next could be this one so we have four equivalence valid equivalence class similarly for invalid also we are going to have something similar to this we are having four invalid we are having more actually but what we do that is why the equivalence coming to picture then equivalence has two things one is valid so these are the primary first level of partitioning we do okay detail the same diagram what we have seen in the previous slide here what we have is we define each of them with one number equivalence one equivalence two equivalence three etc so further maybe you can change it as something like equivalence valid one equivalence valid two equivalence valid three similarly equivalence invalid five equivalence invalid invalid so we have three valid classes and three invalid classes and in the previous slide we again we can group each of this we do not have to repeat all the test cases which are resulting in the same behavior so we have three right so we have to cover this what could be so we have valid three test cases similarly we have invalid three cases all the rest of them can be so three valid and three invalid it again depends on what sort of test cases identify all the test cases then divide the sphere into two two level of partition one is valid other one is invalid so then we group valid such way that the behavior is usual and all of these are grouped so there are four here in this case three one equal to nine two equal to three similarly we can name it invalid cases also with a unique identifier so that is what we highlighted here partition value between three class create a test case for atleast one value from each equivalence class that means we have two three problem select an appropriate one which is good enough to have a representation form so partition valid and invalid equivalence class first then create a test case for atleast one value from each equivalence class that is what it is okay let us take an example with the help of with the help of that probably we are more clear okay this is the rectangular box three columns the first one is being input suppose you take the input that means requirement two are there integer n such that the n takes from minus ninety nine to plus ninety nine so that is what the input it goes for requirement so what are the that we can arrive at and what are the invalid equivalence class that we can arrive at for this particular input set similarly one more let me identify being a phone number phone number will have area code 200 999 and there is a prefix of 200 999 this is another set of test input and what are the valid equivalence class of this and what are the invalid equivalence class of this any guess okay the first one we will take we know that the n takes from minus 99 that means the system is expected to take the input from minus 99 plus 99 so we can have number of test cases minus 98 minus 97 minus 99 minus 98 minus 97 but all are within the range then we can have 0, 1, 2 10, 20 30 50 60 90 99 right so these are all it can take that is what the input that we have but do we need to have all this we know that these are all valid because the first thing is these are all valid okay so valid equivalence class because still it is not equivalence class input value that n can take minus 98 it can take minus 97 plus 98 so these are all test cases but we do not need to have all this probably we can group this again based on the system what is going to be tested it is objective it could be a unlock all could be some system having a sensor input taking value so that we need to understand the system and from the system perspective then probably that is the best way but in general we can choose a group of test cases such a way that it makes sense here we have 1, 2, 3, 4, 5 so that all need not have to be tested so it will become an equivalence class it will also become a valid equivalence class because we have all the value so here about 5 are there minus 98 minus 10 so 2 negative side we want to have with a 2 digit number and some more we want to fit because the implementation could have some issues in terms of single digit so that way we can divide it second equivalent class having minus 9 minus 1 where a single digit negative number it is taking then there is a value of 0 so 0 also should accept input range then similarly we have 1 to 9 1 and 9 on the single digit side and we have 10 and 9 to 9 so this is a good example of a valid equivalence class okay the next one invalid equivalence class so what could be the invalid equivalence class we know that valid equivalence class we have defined from minus 1 which is invalid for n but invalid test cases but the invalid test cases can be it can be minus 98 sorry it could be minus 100 minus 102 etc so it can grow but better to identify few of them similarly the plus side we have a 9 to 9 it can take 100 200 some randomly we need to do it we all will become a equivalence class test cases but under the category of invalid why because in a normal case we are not expected to take that so this will become an invalid test case that means the system is supposed to behave not usual manner that is why it is called as invalid test case so what are the few example invalid equivalence class for this range minus 99 we can specify the value such as minus 100 everyone use greater than 99 such as null form or break that the system will accept as a negative or unusual value like 12 we are doing the input as 1-2 minus 3 this you can consider something like a value instead of number basically and the input that are we going to provide is 12 minus, similarly one minus, two minus, three, likewise we can had anything that we want.Red D గ్నన్ ప్త్నిచించ క్స్యకార్లులుయాని. ఇడార్స్వ్సారోల్లునియులుకిక్కించించిక్రంచితి. ప్బ్మన్మాని. so password is supposed to expect defined input only, it cannot change, so that is a good example of providing input, the input is supposed to be in the same manner what is being specified to requirement, the empty value that means the blank, sometimes the blank is specified it is up to the specific program, so these are two valid and invalid equivalence class example similarly for the phone number, valid equivalence class we know that area code 200 to 99, so we can have 555 to 555, then 555, 555, 555, 555 and then we have 555, 555, 555, so this is another valid number then we have 200, let us say we are equal to area code, let us say we are equal to area code, so this 455, 555, 555, 555, it is up to the standard to requirement, this is నిందానింది నింది పిందింది నిందింది నిందిందిందిందిందింది అదిందింది. So, if you are familiar to what is been there for the N here we have a phone number which is changed to the specified. So, what are the invalid IPLN which are invalid formative 55555 together. So, similarly the next one two prefixes are there supposed to be one prefixes we have two prefixes. క్రమ్ల్ ఈథాసారిని నేచాస్టా గలగారిక్మి క్లకెలేల్మానేయం క్రిటిటేటేటురాచాదాంటుమటుయం sleptగినాదాసడూటాత్. నోంరోతోరోపిోక్చదళకరంలివరి. నోంరోరోవిదవరికోకరంప నింనిలారీటిటారీ నోం. we will study more examples in next slide. Now having seen the example definition we will again revisit our equivalence class understanding two types of equivalence class are valid equivalence class, two types of valid inputs to the program all other inputs which are not included and are in valid class called invalid equivalence class okay two guidelines for identifying the equivalence class first one if an input condition specifies a range of value suppose 1 to 100 the equivalence class are one two valid equivalence class counted from 1 to 100 two invalid equivalence class one is less than the first count and the other one greater than the last count okay the next the second one is about if an input specifies a range of value which are handled differently like type of color that means red, blue, green is an input set of input then the equivalence class what are the equivalence class so we have one valid equivalence class for each value that we have red then we have blue then we have green here one valid equivalence class one more invalid equivalence class out of this maybe it could be white or yellow it could be the under set of example third one third one you can input condition specifies a value the character must be a letter suppose the equivalence class are here basically depending on depends on the type of the impending requirement the requirement talks about the count here so count will have in terms of number less than the account here is the character so we need to feed with a invalid character or the invalid group on correct the red, blue, green the valid group and the one is the invalid equivalence class similarly we have a must be a value sort of input condition is available then what are what is a valid equivalence class talks about is any letter we should consider the any letter it has is nothing but a valid equivalence class other than any letter or it is called a non-letter it could be number that is nothing but invalid equivalence class so all these are the standard here we can see where we have taken on the number and input and what are the non-number what are the interpreted number all these are what are the invalid equivalence class and valid number and all in the range are called valid equivalence class the fourth guideline everything finished long before the task is done is an equivalence class everything done within some short time interval before the program is finished is another class everything done just before program talks our operation is another class that is we have a time based requirement suppose in those cases how we can define the equivalence class what it talks about everything finished long before the task is done is a valid equivalence class everything done within some short time interval before the program is finished is another way valid class we can say everything done just before program another way operation is another class that means three equivalence classes have been defined for the time or the requirement that is one guideline that is the fourth guideline fifth one this talks about a memory if the program is specified to work with memory size suppose the memory can take from 64 fp to 250 fp so what is it going to take for equivalence then the size range is an equivalence class because we know the size what is the lower size what is the higher size any other memory size which is greater than 2 or any other size which is less than 64 it can be accepted it should accept and those are called invalid equivalence class likewise we can define the equivalence partition for this set of a requirement the last sort of guideline is the partition of output event lies in the inputs of the program is very important it is not just the input based equivalence partitioning there are output based partitioning also that is possible due to the certain set of inputs the outputs can be derived so based on the outputs also we need to define that is what it means even though different input equivalence class could be could have same type of output event you should still treat the input equivalence class what it means is we have two equivalence class but still it will result in same output but based on type of equivalence class we need to categorize it for example it may throw an error for all this as a one error that means we have one output but still we want to test it because we know what input it can take that what it means the output event based on that so one example we will take here if an unlock variable where need to operate within the range 1.0 to 6.0 so there is an unlock input which can take or which will operate with the range of 1.0 to 6.0 so what are the equivalence class that can be performed the first type of equivalence class input value for variable equal to 0.9 another input value for variable equal to 4.0 this is normal range because 4.0 is greater than 1 and less than 6 wrongly put here it is this way so 4.0 is greater than 1.0 and less than 6.0 so that way we can have the second set of equivalence the third one is the input value for variable equal to 6.0 which is just outside the range which are also embedded class so with the help of these guidelines we have to define different types of valid and embedded class okay one more example system behavior is subjected to the following concept regarding the input temperature so close temperature lies within 15 to 40 it is very important to be there so it is including 15 and it is including the 40 at the outer boundary so sometimes we have to be careful in the test case selection because the requirement is less than those are all trivial but it is not a good practice to have a requirement that is specifying less than what will happen with equal to so test class should not get confused so it is better to mention as less than or equal to similarly as the outer boundary as greater than or equal to or less than equal to whatever the way equal to greater than less than operator are used the number of possible values for the temperature we can have 15.01 15.02 15.1 15.2 15.3 15.2 is still 39.999 subject to the acceptability of the embedded system so it is infinite the value could be different we know that we are going to have a equal as partition for the sake of reducing all this so that is what you mentioned here three equal as class can be defined for this temperature is lower than 15 lower than or equal to 15 temperature has a value sorry temperature is lower than 15 because equal to is also a valid class temperature value is the range of 15 to 40 temperature is higher than 40 so three equal as class can be defined so three test cases are sufficient to cover the equal as class we do not have the hog or division because it is enough to test the condition so invalid two are there 10 and 15 so 10 and 15 valid we have one it could be anything between between 14 that is 35 for example the choice of that particular value depending on the what exactly we are trying to test it if the temperature of these are very common if you think that the system could fail at 35.5 or 39.5 you can have it we will study about that boundary value analysis in the next slide because that will complement further equal as partitioning that is also an important technique we will study about boundary value analysis maybe in class equivalence and partitioning can be done one more good example I will give it here let us consider that real level we shall set an indicator as per the below conditions so real level identify the levels of the real based on the level it will indicate so that is what the requirements there are three requirements if the level goes below 10 liters it shall set the indicator to yellow if the level goes above 100 liters or below 1 liters it shall set the indicator to red otherwise it shall set the indicator to green so what it means e is that from 10 to 100 liters we have the indicator set as green and the above 100 or above sorry below 1 liter it shall set as red the one below 10 and above 1 it will set as yellow so just to have an understanding of different values I will distribute so there are three requirements for real level the one requirement for green is talks about 10 to 100 liters the one talks about red which is less than 1 liter or above 100 liters the indicator will show red the one that is showing between 1 and 10 will indicate as yellow so what are valid and what are invalid with the help of this below 1 we can identify invalid 0 and 1 the value which is in between or invalid which is in between the value between 9 and 10 are valid but it is yellow indicator because the requirement talks about yellow so what are valid the next one the value between 100 or the one less than that is green because the requirement tells that between 10 and 100 should be green and between 1 and 10 should be yellow and before 1 it is invalid similarly the last one is to set the indicator as red if an invalid input is there invalid input could be greater than 100 to 10 etc so that is what is depicted with the help of this example so this is a table it is good to have this on the root table it is called root table why because it identifies all the combinations of inputs which is good enough to identify and differentiate between invalid and valid so what we see here a root table identifying on the left hand side you can see a red yellow green as indicator and right hand side you see a different sort of so what are those classes we have we have class A, class B, class C class B identifying for different indicator less than 1 we have indicator which is set to the root table as ticked similarly we have yellow indicated less than 10 maybe we can add 1 and 1 similarly we have indicator greater than 10 coming under as green similarly we have greater than 100 coming under red we can also add less than 100 greater than 10 some more we can take it as so out of all this what are the equivalence so we have more about groups here invalid is 0 and minus 1 because requirement does not talk about 0 and 1 minus 1 so that is why we did invalid similarly the other extreme of requirement is 101 equal to invalid equivalence partitioning we have two valid one valid two equivalence partitioning 1, 2, 3, 4 up to 9 10, 11, 12, 13 up to 100 so in this valid equivalence class we can choose something like 1, 5 and 9 or it could be just one even similarly for the valid second group of equivalence class we can have 10, 20, 100 likewise so we have added this also can be done this equivalence partitioning can be done with the help of output domain that means where outputs can vary for different inputs and single inputs also which we need to consider for equivalence partitioning test cases are then there are all equivalence output classes that means we derive all the test cases which will take care of the output class also similarly we will define the two table we have for input for the output also so with that we come to that of equivalence partitioning so we have gone through some of the equivalence class examples we defined the valid and valid equivalence classes and guidelines such as count characters must be value and time because majority of all the requirements will come under these guidelines also we went through if you could also under the way of the teacher then we have defined two partitions valid and invalid they would identify and differentiate all these under the partition and we identified a couple of good examples for equivalence partitioning we also move that out of there the partitioning we can do it equivalence class as we do we have added more words software testing words if we have missed anything we can okay I think we have everything so in addition to what we have we have equivalence classes we have today valid and valid equivalence classes of course what we are going to do in the next class and we have a couple of exercise questions what are the main things how we have use the boundary so we are going to నిసి ని మిరాడిలూ లోంది మిసి నింది నిసి మిసి పిస్టి.