Skip to main content

ATM API Loadtesting with Sybase ASE using LOADRUNNER 12.60


Introduction


          SAP ASE (Adaptive Server Enterprise), originally known as Sybase SQL Server, and also commonly known s Sybase DB or Sybase ASE, is a relational model database server product for businesses developed by Sybase Corporation which became part of SAP AG.
Metrics Considered for load testing of ATM APIs
  • ·         Transaction per Minute (TPM) e.g : 600 TPM
  • ·         Transaction per second (TPS) e.g: 10 TPS


Setting up Database connection ODBC Data Source Administrator

For 32 bit: C:\Windows\system32\ odbcad32
For 34 bit: C:\Windows\SysWOW64\ odbcad32


Add a new Data Source for Sybase ASE



                                

LR Scripting: Web-HTTP/HTML Protocol

Action ()
{
        lr_start_transaction("P_API_XXXXXX_XXXXXX _ExecuteQuery");
     
 //Establishing ODBC driver Connection
//Connection String for Sybase ASE :
//ConnectionString=Dsn={ODBC Reference Name};Uid={username};Pwd={password};

    lr_db_connect("StepName=Connect To DB",
        "ConnectionName=SybaseConnect",
        "ConnectionString=Dsn=DB;Uid=xxxxxx_xxx;Pwd=xxxxx_xxxxx;",
        "ConnectionType=ODBC",
        LAST);
     
    //Execute Query
    lr_db_executeSQLStatement("StepName=ExecuteQuery",
        "ConnectionName=SybaseConnect",
        "SQLStatement=declare @al_channel_id NUMERIC(2)declare @as_xxxxx_id VARCHAR(8)declare @as_machine_name VARCHAR…………………………………………………………

select @as_reference = '{cardNo}#{RefRandom}-XXXXXXXXXXXX-XXXX     @XX-XX BRANCH ATM X' select @adt_transmission_date = getdate() select @as_xxxxxx_amt = '000000000000000010' select @as_xxxxx_amt = '000000000000000000' select @as_xxxxxxxxxx_amt = NULL select  @xx_card = '{cardNo}'select @as_xxxxxx_ref_no = '{RefRandom}' select …………………………………............................... select @os_xxxxxxxx_code = NULL
execute P_API_XXXXXX_XXXXXX @XX_XXXXXXX_id, @ol_XXXX_XXXX out, @os_XXXX_XXXX out",   "DatasetName=Result",
        LAST);
 
    lr_think_time(1);
 
    //Disconnect ODBC driver Connection
    lr_db_disconnect("StepName=Disconnect From DB",
        "ConnectionName=SybaseConnect",
        LAST);
 
     lr_end_transaction("P_API_XXXXXX_XXXXXX _ExecuteQuery", LR_AUTO);
 
    return 0;
}
Output:
Starting iteration 1.
Maximum number of concurrent connections per server: 6         [MsgId: MMSG-26989]
Starting action Action.
Action.c(3): Notify: Transaction " P_API_XXXXXX_XXXXXX _ExecuteQuery " started.
Action.c(6): DB Connection "Connect To DB" started ... Wait ....
Action.c(16): SQL Statement  execution "ExecuteQuery" started
Action.c(16): Warning :No dataset was created.
Action.c(16): ================================================
Action.c(25): DB disconnect "Disconnect From DB" started
Action.c(25): ================================================
Action.c(30): Notify: Transaction " P_API_XXXXXX_XXXXXX _Execute Query " ended with a "Pass" status (Duration: 1.2794 Wasted Time: 0.5606).
Ending action Action.
Ending iteration 1.

Comments

Post a Comment

Popular posts from this blog

Loadrunner ~ Performance Testing with Citrix Protocol : Recording Tips n Tricks!

1 . INTRODUCTION 1.1 Citrix Protocol in load runner Recording Tips When recording a script, be sure to follow these guidelines in order to create an effective script. Single vs. Multi-Protocol Scripts When creating a new script, you may create a single protocol or multi-protocol script. If you plan to record a simple Citrix ICA session, use a single protocol script. When recording an NFUSE Web Access session, however, you must create a multi-protocol script for Citrix ICA and Web (HTML/HTTP), to enable the recording of both protocols. Record into Appropriate Sections Record the connection process into the vuser_init section, and the closing process into the vuser_end section. This will prevent you from performing iterations on the connecting and disconnecting. Run a Clean Session When recording a session, make sure to perform the complete business process, starting with the connection and ending with the cleanup. End your session at a point from where you could sta

Peformance Testing with Citrix Protocol : Citrix ICA Vuser Functions (CTRX)

Mouse Functions ctrx_mouse_click Emulates a mouse click on a Citrix client ctrx_mouse_double_click Emulates a double mouse click on a Citrix client ctrx_mouse_down Emulates a mouse down click on a Citrix client ctrx_mouse_move Emulates a mouse move on a Citrix client sent to a Citrix server. ctrx_mouse_up Emulates a mouse up click on a Citrix client ctrx_mouse_click Emulates a mouse click on a Citrix client sent to a Citrix server. int ctrx_mouse_click( long x_pos, long y_pos, long mouse_button, long key_modifier, char *window_name, [CONTINUE_ON_ERROR,] CTRX_LAST ); int ctrx_obj_mouse_click( const char *obj_desc, long x_pos, long y_pos, long mouse_button, long key_modifier, char *window_name, [CONTINUE_ON_ERROR,] CTRX_LAST ); obj_desc A description of the object recorded if the agent is installed on the server. x_pos The horizontal distance of t