Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## FRM
Class emos_frm_stp_lib

public class 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:

- `name` content of the cell in the first row
- `sequence` a single cell containing the list of test steps which are to be executed in a sequence
- `step(s)` an indexed block of rows containing test data

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 | Name | 1 | 2 | 3
--- | --- | --- | --- | ---
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....

Stereotype compiled module

Method Summary
`int` | `FRM_STP_clear_steps(in tid, in test)` Frees all references to the specified test.
`int` | `FRM_STP_get_next_step(in tid, in test, out step, out mode)` Returns the next step.
`int` | `FRM_STP_has_more_steps(in tid, in test)` Indicates whether there are steps to execute.
`int` | `FRM_STP_init_steps(in tid, in test, in idx)` Initialises the step iterator.
`int` | `FRM_STP_is_dummy_step_mode()` Indicates the dummy test mode.
`int` | `FRM_STP_set_dummy_step_mode(in mode)` Turns dummy test mode on/off.

Method Detail

### FRM_STP_clear_steps

    public int 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_get_next_step

    public int 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:
  - `LINK` executes a test in this or some other data table, the test is atomatically loaded if necessary
  - `LINA` same as LINK while loading ALL tests from the specified table (sometimes impoves the overal performance)
  - `LINX` executes a specified test from an inverted data table (table in which tests are organised/indexed horizontally)
  - `CALL` invokes an arbitrary WinRunner main test
  - `EVAL` invokes an arbitrary WinRunner function
  - `EXEC` evaluates a block of WinRunner functions
  - `#` any step starting with # is treated as a comment
  - obsolete syntax is still valid
  - `LNK:script_name` links this test with another one (loading only the specified tests)
  - `LNA:script_name` links this test with another one (loading all tests in the referenced table)
  - `EXE:test step` exectutes all rows in the specified test block
  - `###:test step` comments out the given test step
  - `<<PAUSE>>` pauses the test execution in interactive mode
  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_has_more_steps

    public int 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_init_steps

    public int 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_is_dummy_step_mode

    public int FRM_STP_is_dummy_step_mode()

  Indicates the dummy test mode.
  Returns: TRUE: dummy mode on, FALSE: dummy mode off

### FRM_STP_set_dummy_step_mode

    public int 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

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD