Calling a QNI function from AgileLoad script

To call a QNI function from a AgileLoad Script, declare it in the declaration section of the script (before the BEGIN keyword):

// Version: AgileLoad 5.3

    function extern dll_name integer function_name([param_option] param_type param1, [param_option] param_type param2, ...);





The name of the DLL that contains the QNI function.


The name of the QNI function, it must be the same as the C++ function name.


The available option are:

inout  Indicate that the parameter can be modified by the function.
 In this case, the parameter can only be replaced by a AgileLoad variable whan the function is called.


The possible types are:

integer  Indicate that the parameter is an integer.
float  Indicate that the parameter is a float.
string  Indicate that the parameter is a string.


You can then use your QNI function as AgileLoad built-in functions:

// Version: AgileLoad 5.3

    integer iResult;
    function extern "Calculator" integer Multiply(integer i, integer j);


    iResult = Multiply(5, 10);

    Log "5 * 10 = " + ToString(iResult);


Go back to the Learning center:

Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap