I'm trying to set up a load of test cases for a program, I've managed to create cases for all of the if statements, but the while loops and for loops confuse me a bit as I'm not sure what the test cases should be. I have pseudo code such as:

DO for each word (firstword) in textlist


DO while error flag clear and rows left to read

Consider conditions that cause zero iterations, one iteration, a few iterations, and a very large number of iterations.


For the 'For' and 'While' loop statements, try the Boundary Value Analysis (BVA) and Equivalence partitioning testing approaches. By using these approaches you will be able to create cases for the pending part.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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