|Re: Multi-path logic needed in test case [message #1062099 is a reply to message #1061919]
||Wed, 05 June 2013 23:42
| David Hickernell
Registered: October 2012
I believe that I have finally figured out a way to implement this. It is not exactly straightforward, but as far as I can tell, it works, and should theoretically be extensible to any number of paths and values to be validated.|
First, each value to be compared or validated must be stored in its own variable. Then, a test case should be defined for each valid value of the conditional variable, and each case should make all of its checks (starting with the conditional) using the values stored in the variables.
Then, each case after the first should be added to its preceding case as an event handler, with Event Type=Check Failed, reentry type=RETRY, and number of retries=1. This ensures that when one of the cases passes all of its checks, no more cases will be tried.
The trick is, at the end of each case after the first, you need to set EACH variable to a value that will satisfy the preceding case, in order for each previously-failed case to succeed upon retry. This way, the test will only end up failed if there is NO case that passes all of its checks.
I have attached a relatively simple but hopefully illustrative example, added to the project mentioned in the OP, and I will be happy to explain how to use it if it is not clear. It makes use of the two text fields in the SimpleAdder (the path to the jarfile must be corrected in the configuration).
I hope this proves helpful to someone!
Powered by FUDForum
. Page generated in 0.11280 seconds