Suppose we have 25 radio buttons and if we click 1 to 3 radio buttons it should move to some other page and if we click 4 to 8 radio buttons it needs to move some other page and if we click 9 to 13 radio buttons it needs to move some other page and if we click 14 to 18 radio buttons it needs to move some other page and above 18 some other page.. What are the maximum test cases can we write for this scenario...
During an interview, it is important to ask questions. From what you have described, I have come up with an abstract diagram:
For your question, you could have asked:
- From management perspective, how much time do we have to write test cases?
- From business perspective, does each of the page have equal business value?
- From technical perspective, what does "click 1~3 buttons it should move to some other page" mean? Do we need to click button 1 OR button 2 OR button 3 in order to navigate to a page or do we need to click button 1, 2 and 3 in order to navigate to a page?
- From technical perspective, can you navigate back and forth? If you can, how? E.g. what is the layout of this webpage / application?
In case the interviewer does not answer any questions, then you will need to make assumptions.
- It is not the answer that you come up with matters, it is HOW you come up with your answer. So state your assumptions and then describe your test cases to them.
Below is a sample scenario:
- We start from the page in the middle
- We can navigate to five different pages by providing different button combinations
- We can always see button 1~25 all the time, e.g. we can navigate to other pages from any page by providing button combinations
- Page navigation tests, from page 0 to page 1, from page 0 to page 2......; from page 1 to page 2, page 1 to page 3......; from page 2 to page 1, from page 2 to page 3 ...... In total, there will be 5 + 4*5 = 25 test scenarios.
- Assuming we need to click all radio buttons in order to navigate (I really do not see why can navigate by checking only 1 radio button).