Create the external library that contains the function. This library must then be added to the bin directory of VuGen. And then, the user-defined function can be assigned as a parameter.
-Source-Internet:
We need to create an external DLL libraray to use the user defiend function. It can be substitued as paramter values.
The syntax is:
__declspec(dllexport) char *(char *, char *)
Both the arguments passed are NULL for this function.
An User-defined function could be :
__declspec(dllexport) char *GetSysDate(char *, char *)
This would return the system date. You could substitute this returned value for a parameter instead.
Once the .dll is declared In LoadRunner script you can directly use this function:
lr_load_dll("mydll.dll")
Then you can call the functions in the .dll directly:
date = GetSysDate(char1, char2)
char1 and char2 and the names of variables
Note: Within a header file you can also define other user defined functions to be called within the script. This process is followed in most of the situations as working with DLL is costlier for simple functions which can be created within a header file.
-Source-Internet:
We need to create an external DLL libraray to use the user defiend function. It can be substitued as paramter values.
The syntax is:
__declspec(dllexport) char *(char *, char *)
Both the arguments passed are NULL for this function.
An User-defined function could be :
__declspec(dllexport) char *GetSysDate(char *, char *)
This would return the system date. You could substitute this returned value for a parameter instead.
Once the .dll is declared In LoadRunner script you can directly use this function:
lr_load_dll("mydll.dll")
Then you can call the functions in the .dll directly:
date = GetSysDate(char1, char2)
char1 and char2 and the names of variables
Note: Within a header file you can also define other user defined functions to be called within the script. This process is followed in most of the situations as working with DLL is costlier for simple functions which can be created within a header file.
ReplyDeleteIt was great experience after reading this. thanks for sharing such good stuff with us.
Load runner Course in Delhi
app v training
ReplyDeletesccm training
windows admin training
mysql training
azure training
web methods training