Friday, March 10, 2023

Generate a dynamic Transaction Name that starts with the script name, transaction number, and transaction description

Problem Statement:

Every start and end transaction in the script should have a name in the format "ScriptNo_AppName_ModuleName_TransactionNumber_ShortDescriptionOfAction".

Example: S01_OrangeHRM_User_Registration_T1_Launch_User_Register_Screen.

Note: Script name should be in following format "S01_OrangeHRM_User_Registration".

Solution:

The following function is to capture the Script Name, Script Name will be captured by tokenizing the script location path.


/*========================================================================
The following function is to generate Transaction Name. Please keep the "TName("<transactiondescription>")" funtion inside thee lr_start_transaction() and lr_end_transaction().

Example:

lr_start_transaction(TName("Search"));

web_custom_request{

};

lr_end_transaction(TName("Search"));
========================================================================*/


Git Repo:
 S001_Generate_Transaction_Name_Dynamically

No comments:

Post a Comment

Generate a dynamic Transaction Name that starts with the script name, transaction number, and transaction description

Problem Statement: Every start and end transaction in the script should have a name in the format "ScriptNo_AppName_ModuleName_Transact...