Shared data files usage in Performance Center

In the Performance center, the additional include files get pushed to load generators is to add them to the script in Vugen. This can be accomplished in Vugen by going to the File menu and selecting "Add to script." Any files you select will be added to the action navigation pane in Vugen and will be automatically pushed to any load generators during a test. You should not have to map any directories on the load generators .

If you are using a shared file (such as a function header) that you do not want to attach to all scripts, just make sure that the directory linked to in the script is accessible on all load generators. If not, the appropriate mappings must be completed so the file is accessible during test runs.The file must be placed on the all the load generators which are used in the test

Test id and Test instance ID in performance center | PC test id and test instance id

Here i will show how to find the test id and test instance id in performance center.
Usually people considers the as the  test instance id,but both are different.

To find the test id and test instance id,Follow the below steps.
  • Go to controller
  • Go to the test plan and from there go to the scenarios.
  • Open the scenario for which you need the Test id and Test instance id.
  • Click on the edit scenario button.
  • As shown in below, the number which is highlighted is the test id,here it it 


Now click on the Home button and go to the same scenario ,where you will see the test instance tab.Click on the instances and you can find the Test instance id that ass


How to change jenkins default port 8080

Follow these simple steps and change the default port number on Jenkins.
  • Go to the Jenkins directory we installed the Jenkins (By default, it is located under C://Program Files//Jenkins)
  • Open the Jenkins.xml file.
  • Search for "httpPort=8080" (as shown in below image) and replace the "8080" with the new port number that you want to change, you can put 8081.

 
  • Save it and restart the Jenkins.
  • Browse the Jenkins url as https://localhost:8081

How to start jenkins in windows | How to restart jenkins server in windows machine | How to stop jenkins in windows

To restart the jenkins server in windows machines do the following:

Open the Command prompt
Go to your Jenkins installation directory (Default it is located under  under C://Programfiles//Jenkins)and execute the below commands

To Stop Jenkins:
jenkins.exe stop

To Start Jenkins:
jenkins.exe start

To Restart Jenkins:
jenkins.exe restart

Story behind Jenkins logo | Jenkins History | Jenkins logo background

A butler is a domestic worker in a large household. In great houses, the household is sometimes divided into departments with the butler in charge of the dining room, wine cellar, and pantry. Some also have charge of the entire parlour floor, and housekeepers caring for the entire house and its appearance.


Kohsuke Kawaguchi, the founder of Hudson project which then forked into currently known as Jenkins, He fondly calls it a butler which can get your task done according to your order. Hudson as well as Jenkins are very British sounding names where butler services originated and still are pretty popular. This is the motivation which 
Kohsuke Kawaguchi and  also time to time Kohsuke Kawaguchi casually mentions in his talks about this.

How Load runner Works ?

Suppose you want to test a bank server that serves many automatic teller machines (ATMs).

The ATMs provide a full range of banking services to the bank's customers--such as withdrawing and depositing cash. 

To test the bank server using LoadRunner, you create a scenario. The scenario defines the actions that are performed on the server during the load test. During the scenario that loads and monitors the bank server, you want to:

  1. emulate conditions of controlled load on the server
  2. emulate conditions of maximum load on the server
  3. measure server performance under load
  4. check where performance delays occur: network or client delays, CPU performance, I/O delays, database locking, or other issues at the server monitor the network and server resources under load 

Load Runner Introduction and Archietecture

LoadRunner is an industry-leading performance and load testing product by Hewlett-Packard (since it acquired Mercury Interactive in November 2006) for examining system behavior and performance, while generating actual load.

LoadRunner can emulate hundreds or thousands of concurrent users to put the application through the rigors of real-life user loads, while collecting information from key infrastructure components (Web servers, database servers etc). The results can then be analysed in detail, to explore the reasons for particular behaviour.

Consider the client-side application for an automated teller machine (ATM). Although each client is connected to a server, in total there may be hundreds of ATMs open to the public. There may be some peak times — such as 10 a.m. Monday, the start of the work week — during which the load is much higher than normal. In order to test such situations, it is not practical to have a testbed of hundreds of ATMs. So, given an ATM simulator and a computer system with LoadRunner, one can simulate a large number of users accessing the server simultaneously. Once activities have been defined, they are repeatable. After debugging a problem in the application, managers can check whether the problem persists by reproducing the same situation, with the same type of user interaction.

HP LoadRunner is an automated performance and test automation product from Hewlett-Packard for examining system behaviour and performance, while generating actual load. HP acquired LoadRunner as part of its acquisition of Mercury Interactive in November 2006.HP LoadRunner can simulate thousands of concurrent users to put the application through the rigors of real-life user loads, while collecting information from key infrastructure components (Web servers, database servers etc.)The results can then be analyzed in detail, to explore the reasons for particular behavior.

LoadRunner supports various application protocols; Flex AMF, Citrix ICA, Remote Desktop Protocol (RDP), ERP/CRM (e.g. SAP, Oracle eBusiness, Siebel and PeopleSoft), Databases, Mail Clients, Web Services, AJAX TruClient (with V.11.0).


LOADRUNNER COMPONENTS 




Loadrunner has mainly three components. 


  • VuGen (Virtual user generator) 
  • Controller (License based component) 
  • Analysis 

apart from these components there are other components like LoadRunner Agent process.

Vugen: 
The purpose of Vugen is to create scripts for single user and do the required enhancements to the script in a such a way that it can be run for multiple users.

Controller:
The purpose of Controller is to Run the load test and monitor the servers during load test execution. In loadrunner language is to create scenarios and the run the loadrunner controller scenario. Generally Controller installed in a client environment machine which will be configured with loadrunner license for defined number of users. Performance engineers to connect to this machine to run the load test. If the client has multiple projects and multiple performance engineer resources, client may setup mutiple controller with multiple licenses.
Analysis:
Analysis will be used to Analyze the results and creare graphs and reports to present the performance test report to stake holders.




File Extensions:

VuGen : .USR is the file extension.
Controller : .lrs is the file extension. - -> .lrr
Analysis : .lra is the file extension

Loadrunner environment:Number of machines required in loadrunner test environment. In general you can use one machine by installing all the components one box. 
1 Machine: Controller, Vugen, Anaylysis and Loadrunner agent process. The disadvantage is we may not able to run bigger load test.
Multiple Machine:
Controller1 - 1 Machine - 1000 user license
Load generators - 3 Machines
Controller2 - 1 Machine - 3000 user license
Load generators - 3 Machines
Controller4 - 1 Machine - 2000 user license
Load generators - 3 Machines 
Architecture of LoadRunner:

SAP Performance Testing(Including volumes details)

The entry criteria for volume and stress in any SAP system are due to following reasons. • Increasing the number of users or adding new users • A major software upgrade like database or operating system migration • A major hardware upgrade like implementing BIA infrastructure for BW • Implementing a new module or new functionality like accessing through SAP Portal instead of SAP GUI The common concern which arises in minds of project team before any SAP application go live can be classified as follows. • How does the database react with existing or desired concurrent SAP users? • Will the implemented SAP application meet the end user performance requirements with respect to response time and throughput? • Is this SAP implemented solution scalable? • Will there be any dumps related to RFC connections and local printing hanging issues during production operation? • Can BIA infrastructure improve the performance of BIW queries? • Can specified number of CRM users create desired volume of tickets per hour? • Is this implemented solution capable of handling estimated production level transaction volumes within the available time frame? • Was the hardware sizing done accurately? • Are Application Servers and Database Servers configured accurately to withstand desired number of processes or requests? • Which component can fail for what time? • Which component of the system limits the number of concurrent users? In every volume test the engagement model begins in the following manner (refer Figure 1). • Request from Project Team: The request can be made in various ways like Service Request (SR), by email or phone call and sometimes project team member walking in with request for testing. • Initiate Kick off meeting: The testing team should initiate kickoff meeting to discuss and understand requirements. During this meeting the scope and objectives of testing should be defined. • Explain the strategy of testing to project team as per the requirement. • Create Service Request with a unique id. • Create the test plan. • Assign resources as per availability in pool and required skill set. Request from Project Team in the form of SR /email / Phone Call / Walk in Is request converted into SR? Testing team initiate Kick Off meeting to understand testing requirements. Scope and Objectives of testing defined. Strategy explained to Project team as per the requirements. Yes No Create SR Test Manager does the testing effort estimation and prepares the high level test plan. Sends to project team against the SR. No Resources allotted as per capacity plan. If the resources are not available in the testing pool then a request for the same is raised. Resource availability TAT 3-4 weeks. STOP YES START Project team and Test Mgr discuss the plan and agree Figure 1: Volume Testing Engagement Model/Framework 2. Effort Estimation To estimate an effort for volume testing is a key task. The effort can be measured based on 3 phases. Phase I: Script Design START Test Mgr/Lead as per the test plan doc identifies the business critical transactions and sends it across to scripting team. Scripting team identifies the protocol and complexity of the script. Test Mgr/Lead sends the delivery date of scripts to project team and execution team as per the input from scripting team. STOP Figure 2: Script Design According to Figure 2 the script complexity is measured by the scripting team. Effort involved is estimated based on this scripting. As a best practice, the scripting effort is designed using a formula keeping in mind the complexity level. Considering a medium complex script a script analyst can cover 1 script in 2 days. Hence the formula is # of Scripts * 2 = # of Man Days Note: This formula also considers script analyst skill in LoadRunner scripting. Phase II: Test Environment Design Test Mgr/ Lead based on test plan doc sends the test environment details to execution team and project Execution team prepares the test environment with help from IS Provider. The Injectors and SAP GUI client installed Test Mgr/ Lead sends confirmation mail to project team and execution team. START STOP Figure 3: Test Environment Design venture between execution team and IS Provider. Based on • SAP test environment: It includes identifying and creating a landscape similar to production • lves few • ner Infrastructure: The number of injectors to simulate or generate the load is • KEY_LOCAL_MACHINE\SOFTWARE\SAP\SAPGUI Front\SAP Frontend • Ena he scripting option can be enabled at server level by executing transaction “rz11”. Check for parameter “sapgui/user_scripting” and set it to ‘True’. Test environment setup is joint requirements captured in test plan document the environment is prepared. This involves setting up: environment consisting of Application Servers and Central Instance with Database. SAP test data: Load copy of production data in test environment. Data copying invo steps to be followed in order to be sure that the data copied is of equal size in the test environment. If we copy data to different environment, say production to QA, then it is normal backup from production and then restore in QA. And if we want to copy data to different platform (say Windows to UNIX) or different DB we need to use "r3load". This is a tool from SAP to import and export table during installation. In certain cases the data used should be confidential. As a result scrambled data is prepared using a third party tool called DSM (Data Sync Manager from EPI-USE). This tool is used to scramble and depersonalize data. LoadRun prepared based on number of concurrent users captured in test plan document. As a best practice in case of SAP R/3 50 virtual users can be simulated from a single injector with configuration of 512 MB RAM and 40 GB hard disk. With similar configuration as a best practice in case of SAP BIW 20 virtual user can be simulated from a single injector. To get better and consistent connectivity between LoadRunner controller and injectors, it is advisable to have same version of LoadRunner package and fix pack installed in controller and injector. Enable scripting at client: The scripting option should be enabled in SAP GUI client. If the scripting option is disabled the LoadRunner scripts can be neither created nor executed. In order to enable scripting at client level go to Run Æ regedit. Set the following parameter value to 1. o [H Server\Security] UserScripting = 1 ble scripting at server: T Pha specific execution plan is created considering all the activities involved uring execution. This master execution plan is captured in excel sheet with following worksheets: • consists of various types of execution scenarios to be executed during s arises. eck is found in • se III: Execution Phase Figure 4: Execution Phase During execution phase a d • Project Activities: This work sheet consists of details tasks or activities to be accomplished before and during execution. • Script Plan: This work sheet consists of all the scripts as per defined business critical scenarios. Scenarios: This work sheet the volume testing. These scenarios are captured initially in test plan document. • Injectors: This work sheet consists of all the injector details with IP address or machine name and location where they are installed. This list also consist of spare or backup injector • Systems and Monitoring: This work sheet consists of detailed information of Servers which will be monitored and parameters which will be considered for monitoring. • Stakeholders: This worksheet is replica of contacts info section in test plan document. This information helps to contact right person during execution if any problem • Test Log: This worksheet is updated by the execution team as a best practice to maintain a log of activities done during execution. For example during execution if any bottlen application server then extra application server is added and again tested. This kind of details should be captured in test log which during final reporting helps to prepare a good report. Actions Issues: Any action items to be taken care by stakeholders or issues encountered during any phase of volume testing are registered in this worksheet. Execution Team executes the test. Encounter Bottlenecks Yes Bottleneck details sent to Project team. An further executio ns y Test Manager/Lead sends the consolidated report j Document the necessary parameter changes required. No Make the necessary parameter changes. Yes START No STOP • Lessons Learnt: The captured data from lessons learnt are documented in SAP Volume Testing Best Practices for future reference. 

Pre-requisite for SAP GUI Protocol scripting in Loadrunner

The fundamental requirement of Loadrunner to record and run SAP GUI scripts requires few settings at client and server side. Here are the main settings you need to incorporate:
1. Enable scripting at client side:
  • Install SAP GUI client on Vugen
  • To ensure that scripting is available on the client-end, check that there is a Scripting directory located in the SAP GUI installation directory.  If this directory does not exist, then the SAP Scripting API is not installed and you must reinstall SAP GUI with the SAP Scripting API option.
  • Once you have script SAP GUI complete package installed, configure all the required systems in SAP GUI, You will require the details of servers like server name, system number etc.
  • Ensure you have connectivity between SAP GUI and SAP server, if not then request for necessary ports to be opened.
  • You need to enable Scripting as circled in the red colour in the screen shot below and disable all check boxes as shown in the screen shot shown below. In order to do this, log on to SAP server, select the “Rainbow” Icon and select “Options”. And you must disable the remaining two check boxes
    - Notify When a Script attaches to a Running GUI
    - Notify When a Script Opens a Connection

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2. Enable scripting at server side:
  • Logon to SAP with a user with required privileges, User ID need to have proper privilege to enable scripting at server side. Basis should be able to provide you administrative privilege to do the same.
  • Logon to SAP using SAP GUI, run the transaction rz11, and enter parameter name sapgui/user_script.
  • Enable the parameter with the Current value changed to TRUE.  Save it and enable the changes on all the servers and scripting will be enabled the next time you log on.  

SAP GUI LoadRunner Commands

    The SAP Add-in for LoadRunner provides several sapgui specific functions.
    A recording of the SAPGUI front end client connecting and logging into the server captured these functions:
      sapgui_open_connection_ex(
      sapgui_select_active_connection("con[1]");
      sapgui_select_active_session("ses[0]");
      sapgui_select_active_window("wnd[0]");
      sapgui_window_resize(
      sapgui_logon(

    When a SAP transaction/command is specified:
      sapgui_set_ok_code(
      sapgui_send_vkey(F4,

      sapgui_select_menu
      sapgui_press_button("Enter Times (F5)", btn5,
      sapgui_select_tab and sapgui_is_tab_selected
      sapgui_select_active_window("wnd[1]");
      sapgui_window_scroll_to_row("0",

    Actions on a data entry screen:
      sapgui_set_focus(ctxtBSEG1,
      sapgui_set_text("Text", "{Text}", ctxtBSEG1,

      NOTE: Variable-length strings (defined as char*) are automatically created during recording within lr_strings.h for reference in commands.

      sapgui_set_password(
      sapgui_set_checkbox( and sapgui_is_checkbox_selected
      sapgui_select_radio_button( and sapgui_is_radio_button_selected
      sapgui_select_combobox_entry(
      sapgui_table_fill_data("Table", tblSAPLCATSTC_CATSD2, "{data}",

    Verification functions:
      sapgui_get_active_window_title(
      sapgui_get_ok_code( in the Command field text
      sapgui_get_text(
      sapgui_get_status_bar_text(
      sapgui_grid_get_cell_data(
      sapgui_grid_get_rows_count(

Go to Top of this page.
Next topic this page

Set screen Web Services

    IDoc (intermediate document) provide a standard data container structure for SAP to exchange data between processes, such as asynchronous EDI (electronic data interchange) between application programs written for SAP or between an SAP application and an external program.
    IDocs is the vehicle for data transfer in SAP's Application Link Enabling (ALE) layer.
    Different types of IDoc are used for purchase orders or invoices.
    In other words, an IDoc encapsulates data so that it can be exchanged between different systems without conversion from one format to another. Each IDoc generated exists as a self-contained text file that can then be transmitted to a receiver (requesting workstation) without connecting to the central database.
    There are several types of IDoc records: a single Control Record, one or many Data Records, and one or many Status record. Segments and attributes of segments (maximum number, hierarchical sequence, segment status, etc.) are used for interpretating the SDATA field in the data record. Each IDoc consists of several segments and a unique number assigned each iDoc for tracking and future reference. Each segment contain several fields.
    IDoc data is then converted by SAP's EDI subsystem to a universal EDI standard such as UN/EDIFACT (Electronic Data Interchange for Administration, Commerce, and Trade) or ANSI/X12.
    Business Application Programming Interface (BAPI) is used for synchronous communication method sRFC because data usually is returned to the sending system.
    BAPI methods are stored as RFC-capable function modules in the ABAP Workbench Function Builder accessing the SAP Business Object Repository (BOR).