Skip to content
Get App

Test Case Design Techniques Fully Explained | Software Testing | SoftwaretestingbyMKT

Comprehensive explanation of test case design techniques in software testing, including error guessing, equivalence partitioning, and decision tables.

Key Takeaways

  • Test case design techniques improve test coverage and defect detection.
  • Error guessing relies on tester creativity and negative input testing.
  • Equivalence partitioning helps optimize testing by grouping inputs into classes.
  • Decision tables provide a structured way to handle complex condition combinations.
  • Boundary value analysis targets edge cases to uncover boundary-related defects.

What the video covers

  • Introduction to test case design techniques, also known as black-box design techniques, for better test coverage.
  • Importance of writing test cases with good coverage to effectively catch defects in software.
  • Explanation of error guessing technique where testers use analytical thinking to input negative or invalid data.
  • Detailed overview of equivalence partitioning to reduce redundant test cases by dividing input data into classes.
  • Description of boundary value analysis focusing on testing values at the edges of input ranges.
  • Introduction to decision table techniques that use combinations of conditions and rules to design test cases.
  • Use of state transition techniques to model system behavior based on different states and transitions.
  • Emphasis on the role of QA in finding defects and the need to apply various test design techniques for thorough testing.

Answers

Questions about this video

What are test case design techniques in software testing?

Test case design techniques are methods used to write effective test cases that ensure better test coverage and help catch defects. They are often referred to as black-box testing techniques.

How does error guessing work in test case design?

Error guessing relies on the tester's experience and analytical thinking to input negative or invalid data, aiming to uncover defects by guessing where errors might occur.

What is equivalence partitioning and why is it useful?

Equivalence partitioning divides input data into classes where test cases from one class represent the entire group, reducing redundant testing and saving time while maintaining coverage.

Full Transcript — Download SRT & Markdown

00:00
Speaker A
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 are also called black-box design techniques. Many people on my channel requested me to make a video on test case design techniques, so this is finally what I am making for you guys. Make sure that you utilize this video, watch it till the end, and if you have any doubt, list out all your doubts in the comment section. I will be clearing all your doubts.
00:15
Speaker A
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?
00:26
Speaker A
Before I go into test case design techniques, I want to promise you guys that once you watch this video, you are going to remember this for a 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 understand. Let's get started to talk about what 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.
00:41
Speaker A
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
00:59
Speaker A
So, test case design techniques are used while writing test cases in order to have better test case coverage. Your test case design technique is a technique which is used while writing test cases in order to have better test 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 and I am writing test cases in which there is no better coverage, it is of no use.
01:22
Speaker A
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
01:34
Speaker A
A test case is good when your coverage is good. Your test case someone will see it's good because once your coverage is good, which I have already explained in one of my videos, to have better test case coverage you need to learn the different techniques in order to write your test cases. Once your test case coverage is good, your test case is good. Once your test case is good, you will be able to catch the defect. What is the main role of QA? It is to find more number of defects.
01:54
Speaker A
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
02:06
Speaker A
So, as a QA, whenever you are writing test cases, you need to know what are the different techniques in order to have 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.
02:25
Speaker A
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
02:43
Speaker A
Let's get started to talk about what you mean by error guessing first. So, talking about error guessing, it is one of the test case design techniques we have. As the name suggests, error guessing here the test engineer will try to guess the error by entering negative values. Here, we don't follow any rules. This type of technique, that is error guessing, depends on the analytical thinking of individual test engineers.
03:01
Speaker A
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
03:18
Speaker A
Suppose three test engineers are there. Some may come up with creative scenarios, some may come up with little creative scenarios, and some may not be able to come up with creative scenarios. When I say creative scenarios, I mean analytical thinking of individual test engineers. Every person in this world thinks from a different point of view. Error guessing has the same meaning: you need to guess the error in order to find the defect.
03:35
Speaker A
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
03:52
Speaker A
Your application says that it can accept only numeric digits, 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 digits. So, what the test engineer will find out is that they will try to enter decimal digits, they will try to enter alphanumeric digits, they will try to enter alphabetical digits, they will try to enter numeric plus special characters.
04:10
Speaker A
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
04:28
Speaker A
As a result, they will try to enter spaces between them, they will try to enter blank digits or blank characters, they will try to enter a combination of uppercase and lowercase. They will think of all those negative scenarios and they will try to find the defect. Here, test engineers will drive most scenarios and try to guess the error. This is all about error guessing, a very small topic.
04:50
Speaker A
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
05:02
Speaker A
Now let's move ahead to talk about what exactly is meant by equivalence partitioning, which is also called equivalence class partitioning. Equivalence partitioning as a test case design technique says that if your text field, if any text field you have and the requirement says that it can accept any digits between 1 to 500, now to develop test cases generally what a QA will do is he will test this text field by entering one digit, he will test it by entering two digits, three digits, four digits, five digits, six digits. He keeps on testing until 500. He will enter all these versions to test this text field, which is a waste of time.
05:34
Speaker A
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
06:00
Speaker A
So, what equivalence partitioning says is 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 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.
06:25
Speaker A
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
06:46
Speaker A
If you are entering and if it is accepting, that means the whole class will accept those values into the text field. For 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 the whole class is passed. It means if you are entering 296 and it is accepting, that means all 201 to 300 will accept that. It means it is passed.
07:06
Speaker A
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
07:23
Speaker A
And if you have taken this class, let's 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 class has passed. So instead of testing with 301 to 400, that is to test with different 100 test cases, what we are doing is you are testing with only one test case and you are saving your time.
07:53
Speaker A
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
08:17
Speaker A
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 is accepted. That means all values in this class have 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 requirement is that it can accept only 1 to 500, and you are entering 566. When you are entering 566, it is not accepting.
08:30
Speaker A
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
08:50
Speaker A
When 566 is not accepting, it means that the whole class got failed. None of the values from this class, that is from 501 to 600, will allow all the values present in this range. 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 is you tested it with only one data. You saved your time and you said that the whole class will not accept data and it is a fail.
09:10
Speaker A
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
09:32
Speaker A
Similarly, you accept any data between 101 to 200. Let's say you accepted 111. That particular data is accepting. That means all the data between this range will be accepted and finally this test case is passed. And now finally what we will do is from this class, that is 1 to 200, you will take any single value. Let's say you have taken 66. If it is accepting, you will see that my full class has passed. So that is passed.
09:53
Speaker A
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
10:03
Speaker A
Now one more class you have created, that is -100 to 0. Now you are taking up values in between. This way you have taken -73. When you enter this value in this text field, it is not accepting. You will say that this particular class got failed. So if you see your test cases, instead of testing with five hundred different data, you finally te...
10:17
Speaker A
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
10:33
Speaker A
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
10:55
Speaker A
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
11:14
Speaker 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
11:38
Speaker A
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
11:58
Speaker A
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
12:18
Speaker A
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
12:46
Speaker A
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
13:05
Speaker A
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
13:27
Speaker A
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
13:48
Speaker A
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
14:06
Speaker A
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
14:35
Speaker A
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
15:00
Speaker A
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
15:15
Speaker A
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
15:51
Speaker A
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
16:23
Speaker A
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
16:43
Speaker A
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
17:09
Speaker A
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
17:34
Speaker A
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
17:55
Speaker A
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
18:20
Speaker A
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
18:50
Speaker A
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
19:09
Speaker A
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
19:31
Speaker A
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
19:51
Speaker A
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
20:06
Speaker A
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
20:17
Speaker A
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
20:36
Speaker A
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
20:49
Speaker A
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
21:03
Speaker A
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
21:18
Speaker 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
21:34
Speaker A
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
21:47
Speaker A
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
22:04
Speaker A
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
22:18
Speaker A
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
22:39
Speaker A
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
22:58
Speaker A
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
23:20
Speaker A
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
23:39
Speaker A
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
23:55
Speaker 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
24:16
Speaker A
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
24:33
Speaker A
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
25:04
Speaker A
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
25:37
Speaker A
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
26:06
Speaker A
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
26:27
Speaker A
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
26:46
Speaker A
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
27:12
Speaker A
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
27:34
Speaker A
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
27:47
Speaker A
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
28:05
Speaker A
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
Topics:test case designsoftware testingblack-box testingerror guessingequivalence partitioningboundary value analysisdecision tablestate transitiontest coverageQA techniques

Get More with the SozAI App

Transcribe recordings, audio files, and YouTube videos — with AI summaries and speaker detection. 30 minutes free.

Or transcribe another YouTube video here →