Test Case Design Techniques | Easily Explained | SoftwaretestingbyMKT

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hi guys welcome you all to my youtube channel, softwaretestingbyMKT as a part of this video   I am going to talk about test case design  techniques we have in software testing test   case design techniques is also called as  blackbox design techniques many people on   my channel requested me to make a video on test  case design techniques so this is finally I am   making for you guys. make sure that you utilize  this video to watch it till end and have any doubt? List out all your doubts in the comment section I will  be clearing all your doubt before I go into test   case design techniques I want to promise to you  guys that once you watch this video you gonna   remember this lifetime I am going to explain  this video in such a way that it will be easy   for every one of you who is watching this video to  be understandable. let's get started to talk about   what do you mean by test case design techniques  first before going to the types of techniques   first let's understand what exactly you mean by  test case design techniques. so test case design   techniques is used while writing test cases in  order to have a better test case coverage so your   test case design technique is a technique which  is used while writing test cases in order to have   a better test is coverage. whenever any tester  writes test cases the main motive of writing   test cases is to catch the defect we testers write  test cases in order to find the defect if I am a   tester if I am writing a test cases in which  there is no better coverage it is of no use a   test case is good when your coverage is good your  test case someone will see it's a good because   once your coverage is good which I have already  explained in one of my video to have a better   test case coverage you need to learn the different  techniques in order to write your test cases once   your test cases coverage is good your test case is  good you once your test cases is good you will be   able to catch the defect what is the main rule of  QA? in order to find more number of defects so   as a QA whenever you are writing test cases you  need to know what are the different techniques   in order to have a better test case coverage now  let's talk about what are the different types of   test design techniques we have so the different  types of test case design techniques we have are Error guessing, boundary value analysis, decision  table techniques, state transition technique   and equivalence partitioning I am going to talk  about each one of them in brief let's get started   to talk about what do you mean by error guessing  first so talking about error guessing it is one   of the test case design technique, we have as the  name suggests error guessing here test engineer will   try to guess the error by entering the negative  values here we don't follow any rules this type   of techniques that is error guessing it depends  on the analytical thinking of individual test   engineers suppose three test engineers are there  some may come up with a creative scenarios some   may come up with the little creative scenarios and  some may not be able to come up with the creative   scenarios. when I say creative scenarios I mean  analytical thinking of individual test engineers   every person in this world think from different  point of view error guessing has the same meaning   you need to guess the error in order to find the  defect your application says that it can accept   only numeric digit so you will try to enter all  negative data rather than entering positive data   you will try to enter negative data in order to  find the defect your requirement says that your   text field can accept only numeric digit so what  test engine it will find out that they will try   to enter decimal digits they will try to enter  alphanumeric digits they will try to enter alphabetically    digits they will try to enter numeric  plus special characters result they will try to   enter spaces between them they will try to enter  blank digits or blank characters they will try to enter   combination of uppercase and lowercase. They will think all those negative scenarios and they will try to   find the defect here test engineers will drive  most scenarios and you will try to guess the error   this is all about error guessing ,very small topic.  now let's move ahead to talk about what exactly   mean by equivalence partitioning which is also  called as the equivalence class partitioning   equivalence partitioning as a test-case design  techniques says that if your text field if any   text will you have and the requirement says that  it can accept any digits between 1 to 500 now to   develop test cases generally want QA will do he  will test this text field by entering one digit he   will test it by entering two digit three digit four  digit five digit six digit it keep on testing   until 500 he will enter all this vision to test  this text field which is a waste of time so what   equivalence partitioning says that equivalence  partitioning says that if your requirement says   that your input can accept one to five hundred  digits you can divide this into classes you can   divide this into - 100 to 0, 1 to 100, 101 to 200  then 201 to 300 then 301 to 400 and then   401 to 500 and that finally 501 to 600 you  are dividing 1 to 500 into different classes   and then out of each class you will enter only   one digit and check whether it is accepting or   not if you're entering and if it is accepting  that means whole class will accept those value   into the text field. example if you take this  class equivalence partitioning says that if   you take this class out of this 201 and 300 you  enter any digit let's say I am entering 206 when   you enter it it is accepting it means that whole  class is passed means if you're entering 296 and   it is accepting that it means all 201  to 300 it will accept that means it is parsed   and if you have taken this class let say 301 to 400 you have to test that class by entering   only one digit out of this 301 to 400 let's say  you are taking 305 if it is accepting   305 it means it will accept all the  class values that is from 301 to 400 it means   this classes of the pass so instead of testing  with 301 to 400 that is to test with different   100 test cases what we are doing is your testing  with only one test cases and you are saving your   time now I will test any digit from 401 to 500  you will test this class so you will test let's   say you will test for 451 when you test it for 451  it accepted that means all value in this class is   passed finally in between 501 and 600 you are  taking back you will test it for 566 when you   are entering this value it is not accepting the  requirements is that it can accept only 1 to 500   and you are entering 566 when you are entering 566  it is not accepting when your 566 is not accepting   it means that whole class got fail none of the  value from this class that is from 501 to 600 it   will allow all the values present in this range in  this class that is 501 to 600 got-failed   and it will never accept it so instead of testing  with different data that is to test with 501 502   503 and then till 600 what you did this you test  it with only one data you save your time and you   said that whole class will not accept data and it  is a failed similarly you accept any data between   101 to 200 let's say you accepted 111 that  the particular date is accepting that means all the   data between this range it will accept and finally  this test case is pass and now finally what we will   do this from this class that is one two hundred  you will take any single when you let us say you   have taken sixty-six value if it is accepting you  will see that my full class is passed so that is   passed now one more class you have created that  is minus hundred to zero now you are taking up   values in between this way you have taken minus  seventy three when you enter this value in this   text field it is not accepting you will say that  this particular class got fail so if you see your   test cases instead of testing with five hundred  different data you finally tested only with one   value two hundred three four five six seven you  only tested with seven data and you had a good   test coverage also and you avoided wasting your  time so this is all about equivalence partitioning   here you will divide your range into various  classes and from each class you will test for   a single value if it is passed whole classes pass  if it is failed whole class is failed so that is   how you will write your test cases so you reduce  your test cases from 500 to only 7 and you got to   know which and all value it is accepting or not  you finally come to know that it is accepting   between 1 to 500 and you go to all that it is it  will not accept above 500 and you also got to know   that it will not allow any value less than 1 so  think about this guys when you listing you you   are a QA Let say and you are testing in the real  scenario you are testing for your company that   time instead of testing with 500 test cases  you only tested with first seven digits you   only tested with 7 scenarios and you got to know  that your test coverage is excellent so this is   all about equivalence partitioning which is also  called as equivalence class partitioning I hope it   is understandable now let's move on to talk about  what do you mean by boundary value analysis as the   name suggests boundary value analysis technique  is based on testing at the boundaries between   partition so boundary value analysis says that if  you have a range of value between A to B you have   to design your test cases for A, A+ 1, A-1, B B+1 and B-1 let us say you have a   text field which accepts value between 1 and 10  which is nothing but my a and B let's say for   your simplicity I am just telling you this so  boundary value analysis thing is that you have   to design your test cases for A, A- 1, A+1, you need to design your   test cases for B, B-1 and B+1 which  is nothing but your one is your a your a minus 1   is nothing but your 0 and A plus 1 is nothing  but 2 if you talk about B which is nothing but 2   10 that is 10, B minus 1 is 9 B plus 1 is 11 so  you had a range of values between 1 and 10 and   you designed that test cases for 6 values so you  have design test cases for 0 1 & 2 & 9 10 and 11   let's say 1 example if you want text field which says  that it can accept between value between 50 and   55 in that case your boundary value analysis test  cases will be 49 50 51 and 54 55 and 56 your 50 is   nothing but a so you design your test if it's for  A, A- 1 which is the 49 A + 1 which is 51 your   55 is nothing but will be B minus 1 that is 54  B plus 1 that is 56 so you will test with those   six in are yours this is all about boundary value  analysis now let's move ahead to talk about what   exactly do you mean by decision table technique so  in this technique we check for multiple conditions   combinations and rule criteria here we check with  multiple inputs here the conditions are taken as   an input and actions are taken as an output this  decision table techniques will be fully based on   conditions combinations and rule criteria let's  say you have a company you have opened a new   company for food delivery you new company says  that if you are a new customer for me I will give   you as 50% of discount if you are my new customer  if you are my new customer I will give you a 15%   discount if you are my repeating customer if you  are my old customer I will give you discount as   10% and in case you have a coupon code I will give  you discount as 30% now this is a condition and   I have said that your decision table techniques  is fully based on condition combination and rule   criteria so since these three are your conditions  so in case of decision table technique your number   of test cases number of test cases will be equal  to number of rules number of rules which will be   equal to 2 to the power number of condition 2 ^  3 why? because you have conditions as three conditions   you have so I relative number of conditions as  three which will be equal to eight so my total   number of test cases here will be eight how you  have to write this in the form of table where you   will say that this will be your rule number one  this will be the rule number three this will be   your rule number two similarly three four five six  seven and eight so this is nothing but your rules   and now here you will write conditions so human  right conditions as new customer new customer   fifteen percent discount you have one condition  now you can write repeat customer you have ten   percent discount now you have one more discount as  coupon code for 30 percent discount this is what   hold condition and finally you this life will be a  result now you have to write this tabular is such   a way that you obtain a different combination of  input you can remember when I spoke about decision   table technique at starting I said you guys that  decision table techniques is fully combination   of conditions combinations that is conditions  and your rule criteria it is a combination of   everything so since we have here a test cases the  four first column the first four will be my true combined man Wilson conditions so how do you  combine it so if you guys know this if you guys   don't know learn it now but you guys have studied  this in your highest classes that if you want to   combine this thing you have to write it as true  true true true and now you will be writing as   false false false false guys don't get confused I  am combining my rules and conditions to do that I   have to follow this method I have written first  for as true and other for as false in case my   number of conditions would have been for that  time my number of test cases would have been   16 in that case I would have written first eight  column as true next eight column as sloths hope   it is understanding if my number of condition  would have been - my number of test cases would   have been forward in that case first two column  I would have written true next two column I would   have written false to make it come by rules  and conditions so my first column I have ten   for two and four false in next I will write only  true for first two then false for next two then   true for first two and then Falls for next two  for the last column I am gonna write true false   true false true false true and false now this  is who you combine your rules and conditions   now your each rule is forming a test case how do  you write that as is here you will take a test is   that now let's start with reading this test is  three if you see this test is three here it is   telling that if my customer is me and if my coupon  code he has blind then he should get discount if   he is my new customer and he's also having a  coupon code he should get 45% discount which   is a possible trustees right so this is a positive  test is false means if you have a new customer he   can't be a old customer right and if he is a new  customer he can have a coupon coordinated with   him so if he is a new customer and he will get  15% off he's he's having a coupon code he will   get combination of 30% and 50% discount which  is nothing but my 45 percent discount now let's   talk about this particular test cases if you  see this test case he is telling that if a new   customer is there and he is not a old customer  and he is not not avail of coupon code so if you   read this test case you will see that if he is  a new customer if he's the new person he can't   with old customer right and he is not having a  coupon code also these two are false his hipoly   is true is he's a new customer if it is a new  person you'll get 50% discount so this is the   positive test case now let's talk about this test  is fast he's telling true for everything guys you   know that when a customer is new you can't be  an old customer so this test is you won't write   it at all this is some invalid test case when a  customer is new he can't be older so both can't   be true so you will neglect this all you will  add it as your negative test hiss and you will   test it whether it is or what is the output we'll  check it now checking this one my new customer is   true my old customer is also true my coupon code  that customer is not having so I can't have a   test case in which I can say my customer can be  new and older so this is in winter space so you   have to include this invalid test case also now if  you check this particular test case in that he is   trying to tell that if you new customer is false  means he is he is not a new customer but he is a   old customer and he is having a coupon code in  that he should get a discount of 40% this is a   positive test is you need to perform and check  it now let us talk about his sixth test case in   that he is telling that he is not a new customer  false he's not is not having a coupon code either   he is the old customer so he should get a 10% of  discount this is one of the positive test is you   need to perform a check it now let's talk about  this 7 test is in that he is telling he is not   a new customer he is not a old customer and he  will apply the coupon code of 20% this test case   is invalid your customer should either be an old  one or a new one he can't be none of them so it's   an invalid you will test it but it's a invalid  test is it is a negative scenario which you need   to perform and check it what is the output and you  eat this is telling that your customer is neither   new your customer is neither old your customer  is neither than having a coupon code which is a   invalid test case which you need not perform it  even though you performed you you are not going   to get anything so this is how you you write  your test cases see when you don't write this   table you won't be able to test each one of them  this is so systematic and standard this is fully   fully combination of your rules and conditions  it is covering hundred-percent test cases this is   your decision table test case design technique in  which you are combining your rules and conditions   and you have come up with the number of test  cases your each rule is one test piece you will   test it with this eight test cases and you will  cover all 100% test case coverage this is very   important when you join any company to have the  100% test is coverage in that you need to follow   decision people techniques this is one of the most  important type of test case design technique which   is our favorite question if you are applying for  the position of software qubit in any company   specially if you are a fresher I hope this topic  is understandable to you guys if you have any   doubt let's double down in the comment section now  let us move ahead to talk about what exactly do   you mean by state transition technique in this  technique we test four different states of a   machine different screen of a machine or different  transition state of any machine let's talk about   you have open a company which is a food delivery  app and you have already set the requirement that   if any one is entering the password wrong for  the third time you will block him you will block   him this is a requirement straight traditional  technique you have to test all the different   stages you have all different stages of machine  you need to test it all different phases of your   system you need to test it let's say you have  designed any application your requirements is   that if users entering a wrong password for the  third time let's block him so if user is opening   the app opening the application the next thing  they will do is they will enable login to the   application they will be longing once they are  logging in first attempt for second if they are   entering the correct password they can order the  food they can order the food in case the password   is not matching we will give them a second attempt  in case while doing second attempt if the password   is correct they will be ordering the food in case  while in second attempt is that password is wrong   we will give them another chance to enter the  password tolerant in case the into the password   correctly they can order the food but in case they  are now they are not entering the correct password   we are going to reroute them if you see this  diagram it has lot of transition state the first   state opening the app into the password first  attempt inter password correctly order the food   first attempt what is the second step opening  the app login currently first attempt password   is wrong given the second attack this is your  second step what is it hurts state opening the   NAP you login to the application in turn round  you password for the first atom in the correct   password for the second attempt order the food  your fourth state will be opening the app login   the application in Tehran password for the first  time in Tehran password for the third time and   then try to enter the password correctly for her  return and order the food your next stage will be   opening the app login do the wrong attempt in the  first attempt do the wrong attempt in the second   step do the wrong attempt in the third step and  finally blocking him there are different stages   there are different states of the machine which  you need to test it using this state transition   technique or state transition diagram this is  is making you understand what and all test cases can come right so you need to draw this diagram  and you do you need to analyze how you can write   test cases in order to have a better test phase  coverage if you don't alright this diagram you me   miss some test cases you may miss some test cases  to have a good test case coverage if you draw this   diagram it will be very easy for any one of you  to write good test cases to write test cases to   have a hundred percent test case coverage so this  is all about your test case design technique also   called as black box design technique hope  this video was useful if yes please share   this video with your needy subscribe to my  channel softwaretestingbyMKT. Have any   doubt? list out your doubt in the comment section  want to reach to your personally I have added my   quora account, twitter account, gmail account in the  link description please check it out thank you
Info
Channel: SoftwaretestingbyMKT
Views: 263,486
Rating: 4.9400439 out of 5
Keywords: learn java, how to start learning java, test case design techniques, boundary value analysis, State Transition Techniques, Decision Table Techniques, error guessing, test case, test coverage, test scenerios, Equivalence partitioning, test design techniques, software testing, Test condition design techniques, Software Test Design Techniques, Black box testing techniques, black box testing techniques, Test Design Techniques, boundary value analysis technique, how to learn java
Id: BSjRmiYP7vg
Channel Id: undefined
Length: 28min 33sec (1713 seconds)
Published: Thu Jan 23 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.