Sunday, August 22, 2010

Script Iterations based on DataTable Rows

Test contains Actions and each Action has its own DataTable, even the whole script has a common DataTable called GlobalDataSheet.

We have to run one test which contains few Actions, each Action DataSheet has its own Data, even GlobalDataSheet has its own Data... on some rows.

(Settings - Run - 1. Run one iteration only, 2. Run on all rows, 3. Run from row _ to row _ ) for GlobalSheet
(ActionCall Properties - 1. Run one iteration only, 2. Run on all rows, 3. Run from row _ to row _) fro Action sheets

****  ---  Test will run based on the used range of rows in all DataSheet settings  ----

By Default -

Global Sheet settings will be - Run on all rows
Action Sheet settings will be - Run one iteration only

If we have
G no. of rows in GlobalSheet
A1 - no. of rows in Action1
A2 - no. of rows in Action2

If we run this test it will run G no. of times for each Action

i.e., G - Global Number, A1and A2 - has only one iteration by default

it will run G x (A1 + A2) times  --- here A1 and A2 has only 1 iteration. So, it will run 2 x G times.


If we change the Action Call Properties - to Run on all rows

it will run G x (A1 + A2) times  --- let us assume A1 has 3 rows and A2 has 2 rows.

it will run G x (3 + 2) times.

---- here interesting concept is Action1 itself run on all rows contain in Action1 Sheet.

Action1 3 times of all rows in GlobalSheet, then it will go to run Action2 2 times of all rows in GlobalSheet.


If we change the GlobalSheet settings to - Run one iteration only, A1 and A2 settins will be - Run on all rows

it will run G x (A1 + A2) times  --- G is one iteration, A1 - 3 and A2 - 2 rows.

So, 1 x (3 + 2) times --- First 3 times Action1 runs continuosly, then Action2 will be run 2 times continuosly

Equal to their datasheet rows count.

No comments:

There was an error in this gadget