i faced this questions in one my interview
there is 3 requirements...minimum how many testcases needed to test 3 requirements..?
i answered 3(only positive case) is this correct?
can any one clear me....
I would strongly recommend you watch the following YouTube video by James Bach: Open Lecture by James Bach on Software Testing - YouTube
Originally Posted by babujay
All computers wait at the same speed...
I think the whole testing art is very subjective. I think any answer you give is going to be in the form of "XXXX, but ....."...
What I mean about that is.. for any answer you give, you'll probably have to end up explaining why you think that way and what your thought process is behind it. What are the exceptions you can think of, etc...
Since there isn't a Major or formal accredited courses and degrees on SQA. There is no consistency of what people know or how they went about knowing it. It's very likely you may know more than your interviewer, or just come from different backgrounds and have different experiences that justify the answers the two of you have in your heads. If there are any differences, it's best to explain the reasoning and thought process to how you arrived at the answer.
It's not just a test problem, there are simply too many variables to be able to answer any question along the lines of "how many test cases do I need" without getting into the specifics of the requirements themselves.
And as you say, there's no consistency or standards among testers in how test cases are created.
To take a simple example of a login password. If there is a single requirement (must be more than 8 characters), then how many tests can the original poster think of? And would the OP create a new test case for each, or bundle them all up into one test case for "login password tests"?
Without knowing anything about the requirements then any answer apart from "3" is just as misleading as the question.
Well, the OP did stipulate that it was the "minimum" number of test cases.
Answer: 1, but it probably wouldn't be a very well-written test case. Usually, a single test case should have a single pass/fail evaluation. In this example, one test case to test three requirements would necessitate having three pass/fail evaluations in the one test case, which is bad design. But I suppose it could be done, as a "minimum" answer.
Technically, 0 is the minimum, but that answer is inapplicable in light of the rest of the question "to test the three requirements". Zero test cases won't test three requirements, unless you plan on only ad-hoc testing which is a very flawed plan indeed.
The best answer is, of course, 3. That way you have a "minimum" of three test cases, one for each requirement, and each with just a single point of pass/fail. Of course, as has been mentioned, if any of those requirements is written such that it stipulates more than a single point of pass/fail, then ideally you should write more test cases - but there is nothing in the wording of the question to suggest that this is the case, and so we fall back on the word "minimum".
Had I been faced with this interview question, I would have answered it exactly like I just wrote it, giving multiple answers (0, 1, 3, and more than 3) with explanations of why each of those answers is valid.
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"
There's too many intricacies. A single requirement could be oddly specific or very vague.
For example, say you have 1 requirement that says, "The form should accept a valid email." Sounds simple right?
If you look at the RFC specs for valid email, you get a 50 page document describing what makes a valid email address.
Then you have the question of test cases. You can have very oddly specific test cases and very high level ones.
Verify you get a red error message.
Test entering different email addresses with special characters,
Verify you get an error message, and the entry is not modified.
When I read your response about it being subjective, I thought that I wrote the response. It was worded exactly like what I was thinking about.
Maybe say to the interviewer for the next question we will do this in the Jeopardy style. The answer is 27. What is the question? When the interviewer doesn't know the answer say "Well then I don't want to work here." Pretend to walk out. Maybe the interviewer will start laughing.
minimum number of test cases should cover all scenarios, positive and negative. the answer can be different for different requirements