FRM
v1.4.2

frm
Script emos_frm_driver_retry_lib

CompiledModule
  |
  +--emos_frm_driver_retry_lib

The library containing routines that enable EMOS_FRM_driver to retry failed tests. This is implemented by writing an execution log in a temporary file. If the retry mode had been chosen (offered only in interactive mode), this file is analysed by the succeeding run. If a failed or uncompleeted test is detected, this test is reinvoked. All other tests are ignored.

Tsl
emos_frm_driver_retry_lib.tsl

Function Summary
 String FRM_DRV_ask_retry()
          Invokes a dialog which asks the user whether to retry the last run.
 String FRM_DRV_can_retry()
          Indicates wheter a retry is possible which is true if retry is generally enabled, test is running in interactive mode and there is an old log file that could govern the retry.
 String FRM_DRV_disable_retry()
          Use this function to disable retry capability.
 String FRM_DRV_enable_retry()
          Use this function to enable the retry capability.
 String FRM_DRV_is_retry()
          Indicates whether retry mode is active or not.
 String FRM_DRV_retry_get_log_file_name()
          Retrieves the name of the active log file.
 String FRM_DRV_retry_get_log_sep()
          Returns the log separator.
 String FRM_DRV_retry_load_log_table()
          Loads the log file into an internal array tho provide for a quick lookup.
 String FRM_DRV_retry_log_test1(in table, in test)
          Appends the first part of the log entry.
 String FRM_DRV_retry_log_test2(in test_rc)
          Appends the second part of the log entry for the particular test.
 String FRM_DRV_retry_lookup_log(in table, in test)
          Retrieves an log entry.
 String FRM_DRV_retry_set_log_file_name(in file)
          Defines the name of the log file [default= <WrTmpDir>\\<testName>_<resName>.log].
 String FRM_DRV_retry_set_log_sep(in sep)
          You can define your own separator for entries in the log file [default=TAB].
 

Function Detail

FRM_DRV_enable_retry

public String FRM_DRV_enable_retry()
Use this function to enable the retry capability. You should either enable retry generally for all test suites (i.e. the best place to call it is the startup test). Otherwise you can enable/disable retry for each individual test suite (make sure to call enable/disable in ALL your kickoff tests).


FRM_DRV_disable_retry

public String FRM_DRV_disable_retry()
Use this function to disable retry capability.


FRM_DRV_can_retry

public String FRM_DRV_can_retry()
Indicates wheter a retry is possible which is true if retry is generally enabled, test is running in interactive mode and there is an old log file that could govern the retry.

Returns:
TRUE: can attempt to retry, FALSE: a "normal" run will be attempted

FRM_DRV_ask_retry

public String FRM_DRV_ask_retry()
Invokes a dialog which asks the user whether to retry the last run. An internal flag is set to indicate whether to retry or not.


FRM_DRV_is_retry

public String FRM_DRV_is_retry()
Indicates whether retry mode is active or not.


FRM_DRV_retry_set_log_sep

public String FRM_DRV_retry_set_log_sep(in sep)
You can define your own separator for entries in the log file [default=TAB].


FRM_DRV_retry_get_log_sep

public String FRM_DRV_retry_get_log_sep()
Returns the log separator.

Returns:
the log separator

FRM_DRV_retry_set_log_file_name

public String FRM_DRV_retry_set_log_file_name(in file)
Defines the name of the log file [default= <WrTmpDir>\\<testName>_<resName>.log].

Parameters:
file - (in) full path name of the log file (optional)

FRM_DRV_retry_get_log_file_name

public String FRM_DRV_retry_get_log_file_name()
Retrieves the name of the active log file.

Returns:
log file name

FRM_DRV_retry_load_log_table

public String FRM_DRV_retry_load_log_table()
Loads the log file into an internal array tho provide for a quick lookup.

Returns:
E_OK: load successful else failure

FRM_DRV_retry_lookup_log

public String FRM_DRV_retry_lookup_log(in table,
                                       in test)
Retrieves an log entry. Empty stringis returned if entry is not found.

Returns:
the entry or empty string if no entry found

FRM_DRV_retry_log_test1

public String FRM_DRV_retry_log_test1(in table,
                                      in test)
Appends the first part of the log entry. This part contains all information about a single test that is attempted with the exception of the return code returned by this test.

Parameters:
table - (in) name of the test table
test - (in) name of the test
Returns:
E_OK: success else failure

FRM_DRV_retry_log_test2

public String FRM_DRV_retry_log_test2(in test_rc)
Appends the second part of the log entry for the particular test. The second part contains the return code received from the test.

Parameters:
test_rc - (in) the rc returned by the test
Returns:
E_OK: success, else failure

FRM
v1.4.2