Lifecyle Access
- group Lifecyle_access
functions to synchronize mtf lifecycle with the execution of group(s) of test case(s)
Functions
-
BOOL ApiSetup(API_HANDLE, const char *app_log_path, LogLevel global_log_level, const char *config_file, const char *db_path)
entry point to start mtf application
- Parameters:
app_log_path – : path to the directory where to put all the generated logs and traces
global_log_level – : define minimum log level of the application TRACE,DEBUG,INFO,WARN,ERR,CRITICAL,OFF
config_file – : path to the configuration file (*.yaml) to define the connected devices, define channel properties …
db_path – : if needed we can pass a path to the database to be parsed and used for starting simulations and accessing messages enteties by names (PDUs, Messages, Signals…)
- Returns:
BOOL
-
BOOL StartTestSerie(API_HANDLE, uint8_t cycle_time_factor, uint16_t min_debounce_time)
this method could be called before starting test cases, this is a global setup for the test group.
- Parameters:
cycle_time_factor – : the cycle time factor
min_debounce_time – : the minimal debounce time in ms
- Returns:
BOOL
-
BOOL StartTestcase(API_HANDLE, const char *test_name, const char *test_folder, BOOL tracing_active, BOOL signal_playback_active)
with this method mtf will prepare all the controllers and tracers before the start of the test case
- Parameters:
test_name – test case name to be used for logging and tracing
test_folder – folder path where to save all logs and traces related to the test case to be started
tracing_active – folder if tracing is active
signal_playback_active – if signal playback is active
- Returns:
BOOL
-
BOOL StartTestcaseWithStruct(API_HANDLE, TestConfig test_config)
with this method mtf will prepare all the controllers and tracers before the start of the test case
- Parameters:
test_config – test configuration structure. Note: it’s important to memset the entire struct to 0
- Returns:
BOOL
-
BOOL StartTestSerieWithStruct(API_HANDLE, TestSerieConfig test_serie_config)
with this method mtf will prepare all the controllers and tracers before the start of the test serie
- Parameters:
test_serie_config – test configuration structure. Note: it’s important to memset the entire struct to 0
- Returns:
BOOL
-
BOOL StopTestcase(API_HANDLE)
with this mtf will clean up all the controllers, do the logging and tracing rotation and save the logs in the test folder path passed in StartTestcase
- Returns:
BOOL
-
void TestFeature_CleanupTestCase(API_HANDLE)
this method is called at the end of test cases group
- Returns:
BOOL
-
BOOL StopTestSerie(API_HANDLE)
this method cleans up all started observers and listeners
-
BOOL CheckLicenseForMethod(API_HANDLE, const char *method_name)
this method is called to check the license status for a method
- Parameters:
method_name – the name of the method
- Returns:
BOOL
-
BOOL ApiCleanup(API_HANDLE)
stop mtf application and do all the necessary cleanup
- Returns:
BOOL
-
BOOL ApiSetup(API_HANDLE, const char *app_log_path, LogLevel global_log_level, const char *config_file, const char *db_path)