# Thread: possible number of test cases? Interview Question

1. ## possible number of test cases? Interview Question

If there are 3 mendatory fields,2 optional fields and 1 conditional field and "OK","Cancel" button is there then..

1.how can we calculate possible number of test cases?

2.Suppose, there are 3 fields for address out of which 1 is mendatory and 2 are optional then how can we calculate possible combination of test cases?

[ 07-25-2006, 06:05 AM: Message edited by: lynneM ]

2. ## Re: possible number of test cases? Interview Question

Search words = number of test cases
Forum to search = Functional Testing (select that from the list of forums to search in)

That should give you plenty of material to work with.
Thanks!

http://www.qaforums.com/ultimatebb.p...;f=46;t=002286
http://www.qaforums.com/ultimatebb.p...;f=46;t=002287

3. ## Re: possible number of test cases? Interview Question

Originally posted by JakeBrake:
Search words = number of test cases
Forum to search = Functional Testing (select that from the list of forums to search in)

That should give you plenty of material to work with.
Thanks!

http://www.qaforums.com/ultimatebb.p...;f=46;t=002286
http://www.qaforums.com/ultimatebb.p...;f=46;t=002287
<font size="2" face="Verdana, Arial, Helvetica">if I tell you, will you send me your wages? [img]images/icons/shocked.gif[/img]

4. ## Re: possible number of test cases? Interview Question

Previous was for siddhesh

not Mr Brake

5. ## Re: possible number of test cases? Interview Question

Jake, I followed the steps you gave in terms of a search - back to 2004, and did not see anything that specifically answered siddhesh's question.

siddhesh, it's not a bad idea to estimate up front how many test cases will probably be needed by examining the screen. What I generally do for non-date/time fields is assume 4 conditions per field (whether mandatory, optional, or conditional) and 2 test conditions per button or link. In the case you specified, this would give me 28 test conditions. I then divide by three, as I combine test conditions into my test cases. Again, in your example, this would equate to 9.33 test cases, which I always round up - so my "educated guess" would be 10 test cases.

Most people combine more than just 3 test conditions - say you write four test cases for actual field tests. I've found the extra 6 will be spent on cause/effect test cases (functionality using multiple fields - like input of a name and address, hitting the send button, and ensuring the record was actually added).

I don't know if this will help you, but it's been helpful for me when trying to come up with estimates as to how long it will take to write test cases or perform the testing.

- Linda

6. ## Re: possible number of test cases? Interview Question

http://www.qaforums.com/Forum15/HTML/003483.html

Here is an interesting evaluation aimed at automated testing, but would also apply to manual, as per
:http://www.obix.lu/docs/pragmatics/p...cs-testing.htm

Ideally, automated testing should be able to prove that a program is correct. Unfortunately, this is only possible in some very rare cases. The reason is that, to prove the correctness by testing, a test case would have to be defined for every set of possible input values. But in most cases, the total number of possible test cases reaches astronomical values, easily surpassing the number of atoms in our universe. Let's take, for example, a command with one integer input and one string input with a fixed length of 20 characters, each character representing an uppercase letter. This would yield into 2^32 x 26^20 = 8.55907E+37 different test cases. If each test case took only 1 microsecond to execute then 8.55907E+37 / 1000000 / 60 / 60 / 24 / 365 = 2.71406E+24
= about 3000000000000000000000000 years would be needed to prove the correctness of our command.

A much better way to be sure of the correctness would be a mathematical proof. But, unless we are a genius in math and programming (like Donald Knuth: 'I proved that the program is correct, but I didn't test it.') and ready to invent new methods for proving 0 errors in source code, we simply have to forget this option.

The only choice we have is to define our test cases in such a way that the chances of finding every error are maximized. That's the art of testing: finding a maximum of errors with a minimum of test cases. However, even if we forget some cases: It is much better to provide some tests than to provide none.

<font size="2" face="Verdana, Arial, Helvetica">

7. ## Re: possible number of test cases? Interview Question

I also would call these Test Conditions and I would normally have multiple Test Conditions in a test case. Also normally I would not be thinking about calculating the number of Test cases based on a generic calculation.

My thoughts for this answer were if a simple calculation was needed with having to "estimate" anything this would work without getting into complex mathematical calculations.

Just giving an option - food for thought.

8. ## Re: possible number of test cases? Interview Question

thx 2 all for u r replies.
This was the question, company asked me in my intereview to give the number of test cases and i was unable 2 give it as i said them without requirement and specification how can it will be calulated. they wanted the possible number of test cases by looking 2 the application not by writing test cases and then counting them.

9. ## Re: possible number of test cases? Interview Question

Originally posted by siddheshswt:
If there are 3 mendatory fields,2 optional fields and 1 conditional field and "OK","Cancel" button is there then..

1.how can we calculate possible number of test cases?

2.Suppose, there are 3 fields for address out of which 1 is mendatory and 2 are optional then how can we calculate possible combination of test cases?
<font size="2" face="Verdana, Arial, Helvetica">Calculate no of test cases.

Write down the Tests which are required to test each requirement that you have. Remember to include all negative and positive tests. Each test that you write should be on a new line.

Count the number of lines that you have written tests on - no of test cases

10. ## Re: possible number of test cases? Interview Question

Lynne, those are what we would call test requirements or conditions. Normally we logically combine them into test cases...

Just curious - do you write a separate test case for each test requirement? For example, if one of your tests is to input alpha values in a numeric field, do you write a separate test case for that? Or do you combine it with other similar test requirements that should yield the same error message? Or combine that with other similar tests (like a test case that tests all invalid field inputs)?

- Linda

Page 1 of 2 12 Last

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - 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 08:38 AM.