|Unable to Pass Updated Variable from Event Handler [message #1408444]
||Fri, 15 August 2014 04:08
| Byron Kooima
Registered: July 2013
So over the past six months, I have developed a number of psuedo loops in Jubula and they have worked perfectly in Jubula 1.3. We have recently updated to Jubula 8.0 and all of my loops are now broken. Here is the scenario that creates an If/Then loop to parse a table object.|
Top Level Test Case:
1. ub_grc_storeProperty ($Row_Count) - Stores the "itemCount" of the table to determine total number of rows.
2. ub_app_storeValue ($Row_Index) - Stores an initial value of 0 for the Row Index
3. ub_tbl_selectValueFromRow - Select the first row of the table
4. ub_app_checkNumericValues - Checks to see if $Row_Count = ?trunc(?add($Row_Index,1),0)
On "Check Failed" we call the following Event Handler:
1. ub_app_storeValue ($Row_Index) - Stores the ?trunc(?add($Row_Index,1),0) back to Row_Index (Increments the loop)
2. ub_tbl_checkExistenceOfValueInRow - Checks the table value at Row = $Row_Index
3. ub_tbl_move - Move down one row in the table
This loop structure used to work wonderfully to parse through a table with any number of rows. Now, for some reason the $Row_Index that is incremented in the Event Handler is not passed back up to the main TC when it does a "Retry" on check of the numeric values.
When I interrogate the Test Results, step 4 of the Test case gets repeated as I would expect, but the value of $Row_Index stays "0". So every time it executes step 4 from the TC, $Row_Count never equals $Row_Index (i.e. 16 = 1 is what I see for every ub_app_checkNumericValues). Eventually my loop fails because the Event Handler attempts to step to a Row that doesn't exist in the table.
The interesting thing is that inside the Event Handler, $Row_Index is incrementing correctly. So for some reason the $Row_Index variable in my Event Handler is not being treated the same as the $Row_Index in my top level TC.
This loop logic took some serious time to figure out and I would rather not throw it out. Especially since it worked perfectly fine in previous versions of Jubula.
Any help would be appreciated. Thanks, Byron.
Powered by FUDForum
. Page generated in 0.07529 seconds