2

I have often faced difficulty in designing test script, because unlike coding, there is no clear cut plain and simple logic in designing test scripts, nor there is a universal standard way of doing the same. Even if there is, I assume there would be a context in which it will clearly just not work!

One specific problem I wanted to discuss was this one:-

Suppose I have to design a test script for a module, which itself is a long process consisting of multiple screens, in each screen in which you can provide input (or configure them, in other words) as to what will be the end result of that process. So, there are a lot of permutations and combinations in play here. You get output to test anything, only at the end of that process.

Now, in such a situation, how do I design the test script? It definitely makes sense to test all/maximum number of test cases in a single execution of this process. Since each input or configured screen, has its way of affecting the output, it is relatively easy to isolate the failing test cases, just by seeing the output, obviously only if there is some output to test - if it's a total failure, we may require to run the whole process many times to isolate the test case which is the cause of failure.

In the above case, how do I manage the test case numbering? I am giving inputs in different screens for different test cases, but I am getting the output - to be checked against the expected results, for all of them in a single final step. So here, it's not that I can isolate the pair of action (steps to be taken) and expected results, for each test case! Maybe the actions are different but expected results merge at one final step.

And then, how do I design it for the possibility that it might be giving no output for the above-mentioned test execution for many test cases simultaneously. I how do I isolate the failing test case in such a situation? If I simply refine it, the script and the execution time will become unnecessarily lengthy - since it will mean executing the entire process for each test case or each set of 3-5 test cases. How should I choose between simplicity of test script and the execution time/script length?

closed as too broad by Peter M., IAmMilinPatel, Kate Paulk, Bharat Mane, Paul Muir May 18 '16 at 14:32

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Your question consists of multiple problems, that's why your question was put on hold. I would attack each problem one by one. Some often I guess may even have answers here. – dzieciou May 19 '16 at 6:02
  • Oh ComeOnnn!!!! This is important for me, for God's sake! And there is no sense in isolating and attacking each problem one by one, as all of them are related. I – amsquareb May 22 '16 at 2:58
  • It is more convenient, easy and simple to discuss such related problems at one place, in one thread, in one discussion. – amsquareb May 22 '16 at 2:59
0

One (ptobably not the best and suitable not for every case) possibility is to use varibales during the test execution.

Simplified example

A test scenario consists of two input screens where I have to test the presence of certain elements (title, logo, some text etc. I run the test scenario until the end (output screen) and during execution I set suite variables (e.g. LogoVisible, TitleVisible) to True or False depending on presence of the corresponding elements.

This was in a way the main test. After that there are subtests which consist only of evaluating of those variables: if LogoVisible isTrue then set test "Check Logo Visibility" to Passed, etc.

In this you have only one test execution but can test several isolated things.

Not the answer you're looking for? Browse other questions tagged or ask your own question.