Thanks:  0
Likes:  0
Dislikes:  0

# Thread: How to reduce number of testcases while doing system testing?

1. ## How to reduce number of testcases while doing system testing?

Hi,
I would like to know how we can reduce number of testcases in the below scenario.

I have 3 inputs a,b,c and one output O. Requirement says when a&b&c = 1 then O =1. In this scenario what all the testcases to be created and executed?. If we can reduce the number of testcases then what is the method and approach?.

Do i need to create the combinations as below :

a b c a&b&c (ouput)
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1

2. Originally Posted by khnagaraju123
Hi,
I would like to know how we can reduce number of testcases in the below scenario.

I have 3 inputs a,b,c and one output O. Requirement says when a&b&c = 1 then O =1. In this scenario what all the testcases to be created and executed?. If we can reduce the number of testcases then what is the method and approach?.

Do i need to create the combinations as below :

a b c a&b&c (ouput)
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1

There's a simple technique called a K-map that most computer science majors and electrical engineering majors learn in their 1st year. It's good an simplifying And/Or logic gate problems.
https://en.wikipedia.org/wiki/Karnaugh_map

Besides visualizing how this can be implemented using transistors, you get a good sense of the critical boundary conditions and don't care conditions. (may be a bit overkill for this problem, but you can apply it to more complex problems)

3. Originally Posted by dlai
There's a simple technique called a K-map that most computer science majors and electrical engineering majors learn in their 1st year. It's good an simplifying And/Or logic gate problems.
https://en.wikipedia.org/wiki/Karnaugh_map

Besides visualizing how this can be implemented using transistors, you get a good sense of the critical boundary conditions and don't care conditions. (may be a bit overkill for this problem, but you can apply it to more complex problems)

Thank you for the update.

If i have situation where in a variable can take 3 values. For example variable can take 0,1,2 as input values. In these scenario, please suggest how to reduce the number of system level testcases.

4. Originally Posted by khnagaraju123
Thank you for the update.

If i have situation where in a variable can take 3 values. For example variable can take 0,1,2 as input values. In these scenario, please suggest how to reduce the number of system level testcases.
You can use a 3d map to represent multiple values. What you do on paper is divide each box into a small subgrid to represent the possible values.

I'm thinking, if you're looking for something less scientific, and easier to implement. You can try orthogonal arrays.
https://en.wikipedia.org/wiki/Orthogonal_array_testing

It's not as accurate as a k-map, but will give you a smaller set of inputs that lets you covers about 95% of errors that deal with 2-variable combinations. 3-variable or more errors will not be covered as well under this technique, but most bugs in an iterative software development environment (such as agile), will be 2-variable combinations in general when changes are isolated to 1 module per release.

5. K-Map is the best solution,it is easy to understand and we have been thought during btech graduation.We can give number of inputs to get a single output using k-maps.

6. Thank you very much for the details.

I am still not able to understand how can we sure that we have taken care all combinations. As I work in automotive domain, the system is always risky. So i need to do testing as exhaustive as possible. When the system is black box, even missing combination would fire a defect. Result would be disastrous.

I would like to understand how many system level cases to be written to validate the below requirement.

Requirement :
1. Car is having 4 power modes. (OFF , ACC, ON and Start).
2. Wiper having 3 positions (OFF, Intermediate and ON)

Wiper works only when power mode is ON.

Please somebody suggest how many possible testcases to be written to test the above requirement. If we can reduce the testcases then what method to use? or if i have to make any assumptions then what is it be?.

Please suggest with details. When we do safety critical system validation we can assume or leave some part of the combination , it is because of the safety issues connected to it.

7. Originally Posted by khnagaraju123
Thank you very much for the details.

I am still not able to understand how can we sure that we have taken care all combinations. As I work in automotive domain, the system is always risky. So i need to do testing as exhaustive as possible. When the system is black box, even missing combination would fire a defect. Result would be disastrous.

I would like to understand how many system level cases to be written to validate the below requirement.

Requirement :
1. Car is having 4 power modes. (OFF , ACC, ON and Start).
2. Wiper having 3 positions (OFF, Intermediate and ON)

Wiper works only when power mode is ON.

Please somebody suggest how many possible testcases to be written to test the above requirement. If we can reduce the testcases then what method to use? or if i have to make any assumptions then what is it be?.

Please suggest with details. When we do safety critical system validation we can assume or leave some part of the combination , it is because of the safety issues connected to it.
You won't get much reduction on 2 variable cases (like the one above), unless there are some don't care cases. In your particular example, you'll have to rely on intuition and knowing what's under the hood to optimize the number of test cases. For example, you can say ACC, and On all belong to the set of conditions where the car is turned on, and the wiper only cares of the car is on.

Where orthogonal arrays or k-maps help you is when you have 3 or more variables, with either don't care care cases, or identical outcomes for multiple cases. In a k-map they show up as rows, columns where see large blocks of identical outcomes. In that case you might want to test the corners of those blocks to test the edge cases. In a orthogonal array, it will blindly generate a minimum set of test cases where each unique combination pair of 2 variables will be exercised at least once.

8. K-map works better for the case and also easy to understand.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 9.68%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:02 AM.