FRM
v1.4.2

frm
Script emos_frm_stp_lib

CompiledModule
  |
  +--emos_frm_stp_lib

Defines an interface for efficient creation of test cases unsing the FRM data tables.

A typical FRM test case defines its test data across columns. This is the plain oposite of the approach taken by Mercury and many other testers. The benefit of defining test data column-wise is the ability to define many, very many (up to 64k) test entries which makes very complex tests possible (accross rows the limit is 256) which are comparatively easy to maintain (no ugly right-left scrolling, you can see much more test data at once). Additionally, you can (hypothetically) "pack" up to 254 of such complex tests in a single Excel-file wich can greatly reduce the mess on your hard drive.

A single test case contains three important parts:

To keep things simple imagine a part of some application with two windows. First window contains the list of user names and three buttons: New, Edit, Delete. Imagine a table "User1.xls" with the following content:
IDX Name123
x Testsequence
select_user
user_data
select_user
user_data
select_user
x select_user      
  user list dean dean
  New/Edit/Delete New Edit Delete
  delete? (OK/Cancel)     OK
x user_data   CHK  
  first name dean dean  
  last name rajovic rajovic  
  OK/Cancel OK Cancel  
This table contains three independent test cases named 1, 2 and 3. Test 1 creates a new user....

Tsl
emos_frm_stp_lib.tsl

Function Summary
 String FRM_STP_clear_steps(in tid, in test)
          Frees all references to the specified test.
protected  String FRM_STP_eval_call(in line)
          Parses the call to an arbitrary test, i.e. call test ( [param]* ) SYNTAX: CALL<SEP>test[<SEP>arg]*
protected  String FRM_STP_eval_link(in typ, in curr_tid, in drv, in tbl, in tst)
          Executes the link call.
protected  String FRM_STP_eval_old(in cmd)
           
protected  String FRM_STP_eval(in cmd)
          Evaluates an arbitrary command.
protected  String FRM_STP_exec(in tid, in test, in idx, in mode)
          Executes a block of TSL-statements defined in the given block.
 String FRM_STP_get_next_step(in tid, in test, out step, out mode)
          Returns the next step.
 String FRM_STP_has_more_steps(in tid, in test)
          Indicates whether there are steps to execute.
 String FRM_STP_init_steps(in tid, in test, in idx)
          Initialises the step iterator.
 String FRM_STP_is_dummy_step_mode()
          Indicates the dummy test mode.
protected  String FRM_STP_is_internal_step(in step, in tid)
          Deprecated.  
protected  String FRM_STP_link(in tid, in test, in idx, in mode, in load_all)
          Deprecated.  
protected  String FRM_STP_load_steps(in tid, in test, in idx, in val)
          Loads the content of a single table cell (steps separated by newline char) into the internal step table.
protected  String FRM_STP_parse_link(in line, in curr_tid, out drv, out tbl, out tst)
          Parses the call to another FRM test, i.e. call driver( table, test ).
 String FRM_STP_set_dummy_step_mode(in mode)
          Turns dummy test mode on/off.
 

Function Detail

FRM_STP_init_steps

public String FRM_STP_init_steps(in tid,
                                 in test,
                                 in idx)
Initialises the step iterator.

Parameters:
tid - (in) table ID
test - (in) column name
idx - (in) (optional) index (i.e. table row) containing test steps [default: "Testvorgang"]
Returns:
E_OK: success E_NOT_FOUND: no steps found (idx missing) else: other error

FRM_STP_load_steps

protected String FRM_STP_load_steps(in tid,
                                    in test,
                                    in idx,
                                    in val)
Loads the content of a single table cell (steps separated by newline char) into the internal step table.


FRM_STP_clear_steps

public String FRM_STP_clear_steps(in tid,
                                  in test)
Frees all references to the specified test.

Parameters:
tid - (in) table ID
test - (in) column name

FRM_STP_has_more_steps

public String FRM_STP_has_more_steps(in tid,
                                     in test)
Indicates whether there are steps to execute.

Parameters:
tid - (in) table ID
test - (in) column name
Returns:
TRUE: there are more steps; use FRM_STP_get_next_step() to get the next one FALSE: all steps have been retrieved

FRM_STP_get_next_step

public String FRM_STP_get_next_step(in tid,
                                    in test,
                                    out step,
                                    out mode)
Returns the next step. Note that the implicit steps are never returned with this command. They are simply executed by this function. The implicit steps are:

Parameters:
tid - (in) table ID
test - (in) column name
step - (out) name (idx) of the test step
mode - (out) mode to be applied ( FRM_SET_MODE/FRM_CHK_MODE/FRM_GEN_MODE )
Returns:
E_OK: success; test step defined E_FILE_EOF: no steps to be retreived else: failure

FRM_STP_parse_link

protected String FRM_STP_parse_link(in line,
                                    in curr_tid,
                                    out drv,
                                    out tbl,
                                    out tst)
Parses the call to another FRM test, i.e. call driver( table, test ). SYNTAX: LINK<SEP>[driver]<SEP>[table]<SEP>test or LINA<SEP>[driver]<SEP>[table]<SEP>test


FRM_STP_eval_link

protected String FRM_STP_eval_link(in typ,
                                   in curr_tid,
                                   in drv,
                                   in tbl,
                                   in tst)
Executes the link call. SYNTAX: LINK<SEP>[driver]<SEP>[table]<SEP>test or LINA<SEP>[driver]<SEP>[table]<SEP>test


FRM_STP_eval_call

protected String FRM_STP_eval_call(in line)
Parses the call to an arbitrary test, i.e. call test ( [param]* ) SYNTAX: CALL<SEP>test[<SEP>arg]*


FRM_STP_exec

protected String FRM_STP_exec(in tid,
                              in test,
                              in idx,
                              in mode)
Executes a block of TSL-statements defined in the given block.


FRM_STP_eval

protected String FRM_STP_eval(in cmd)
Evaluates an arbitrary command. You can specify multiple commands by separating them with semicolins. The outcome of the eval statement is expected to be passed by the global variable __evalRC (the assignment has to be done by the evalueated code. For example use code like this "__evalRc = some_function();" in order to let framework evaluate your return code. If you don't assign any value to __evalRC, then eval will erturn E_OK.

Parameters:
cmd - (in) command(s) to be executed (it is not necessary to place the semicolon at the end of the last command but you must separate multiple commands with the semicolon, though).

FRM_STP_eval_old

protected String FRM_STP_eval_old(in cmd)

FRM_STP_is_internal_step

protected String FRM_STP_is_internal_step(in step,
                                          in tid)
Deprecated.  

OBSOLETE: KEPT ONLY FOR THE SAKE OF COMPATIBILITY WITH THE OLD DATA TABLES. Indicates an internal step (step containg special command).

Parameters:
step - (in) the step to be evaluated
tid - (in) id of the active test table
Returns:
TRUE: internal FALSE: "ordinary" step

FRM_STP_link

protected String FRM_STP_link(in tid,
                              in test,
                              in idx,
                              in mode,
                              in load_all)
Deprecated.  

OBSOLETE: KEPT ONLY FOR THE SAKE OF COMPATIBILITY WITH THE OLD DATA TABLES. Executes another test(s) in the same or some other table(s) running the same or some other tsl script.


FRM_STP_set_dummy_step_mode

public String FRM_STP_set_dummy_step_mode(in mode)
Turns dummy test mode on/off.

Parameters:
mode - (in) true/false
Returns:
the sam as the input parameter mode

FRM_STP_is_dummy_step_mode

public String FRM_STP_is_dummy_step_mode()
Indicates the dummy test mode.

Returns:
TRUE: dummy mode on, FALSE: dummy mode off

FRM
v1.4.2