How do I know what should be a test case and what is the set of tests in Selenium? Is there a general rule for this? I read the seleniumhq website a few others, but they only have some basic examples, while I want to test the whole site.
My questions, for example:
Let's say I'm testing several multi-step web forms. Should I do one set of tests and each step (in a web form) would be the only test case, or should all the steps be one of the test cases?
Let's say I created a web forum, and I want to test several of its functions. Make a test suite and each test case test each function (or several cases for each function) OR I will have many test cases, and each set will test one function with several test cases.
What should I do if I have a form containing 5 checkboxes - each of them can be explicitly clicked or not. This may have some consequences when I submit the form. So, theoretically, there are 2 ^ 5 = 32 possible threads of execution. Should I test all 32? Or maybe I just need to check each checkbox separately to simplify things. When can / should be simplified, when not? (provided that the flags MAY be somehow connected).
Is there a test case in every function that tests both positive and negative results? For example, I should just focus on the right workflows - for example, submit a valid form and see if the site did what I asked (worked) OR also send an empty form and check if an error message appeared.
Can you answer them by giving some practical examples (if necessary)? - perhaps using some (StackOverflow?) sites as an example.
source share