Sunday 24 July 2016

How to Execute Vugen script using Command Prompt.

To run a script from a command line or the Run dialog box:
  1. Open a Command Prompt window, or select Start > Run to open the Run dialog box.
  2. Type mdrv followed by the script name, using the following syntax:
    <installation_dir>/bin/mdrv.exe -usr <script_name>  
    where script_name is the full path to the .usr script file, for example, c:\temp\mytest\mytest.usr.
  3. Add other command line options and arguments.
  4. Click Enter. The mdrv program runs a single instance of the script without the user interface. The output files provide the runtime information.

**** Jain

Sunday 3 July 2016

Citrix ICA Protocol

I am going to highlight some tips that can be helpful to performance test engineers to effectively work on Citrix applications.  By understanding and implementing these points, script debug and test execution will be a lot easier.
            Citrix products deliver applications across networks. Applications reside on the Citrix server; access to those applications is delivered to remote machines (the Citrix clients) via Citrix's ICA protocol. ICA supports a full GUI interface of the server application on the client side.
Citrix Server: Citrix Server works as a remote connection by users and allows multiple users that allow multiple applications at the same time.
 Citrix provides server and desktop virtualization, networking,Software-as-a-services (SaaS) and cloud computing technologies, including Xen open source products

Independent Computing Architecture (ICA) is a proprietary protocol for an application server system, designed by Citrix Systems. The protocol lays down a specification for passing data between server and clients, but is not bound to any one platform.

VuGen records GUI activity on the Citrix client and replays it to the Citrix server.
Currently, events are recorded in analog mode. That is, objects are identified by their coordinate position, and not by a context-sensitive name (e.g."OK_BUTTON"). For example, the parameters of the ctrx_mouse_click function, x_pos and y_pos, specify the pixel coordinates of the mouse click, found, say, within a window dialog's "OK" button.

Load Runner does neatly attempt to get around some of these issues by giving the load tester the ability to install agent processes on each of the Citrix instances (Citrix virtual desktop agent).  This gives visibility to sync on items such as text and object information such as focus, visible, checked and enabled.  This will add 2MB per Citrix client, which is worth paying for the extended object and sync visibility.

            Citrix is an environment, where u can published u r application in Citrix environment to access through globally for secure purpose.
            If the application is deployed in Citrix then we have to use “Citrix ICA “protocol. Before accessing the application we have to connect the Citrix through URL.

Step1:- Access the Citrix environment through URL
Step2:- provide credentials and select your application in Citrix
Step3:- perform the business scenario against the application and logoff            from the server

We have to use web http/html as well as Citrix protocol for completing the above scenario. Why we have to go for web http/html means to launch the Citrix, we have to use web browser so we can go for web http/html.
Further process we can use Citrix protocol.

***Number of vusers per Load Generator Machine:

A Load Generator machine can run only a limited number of Citrix Vusers at the same time. This is due to the graphic limitations of that machine. This limits the performance load that be applied to the application. To solve this problem and increase the number of vusers per machine -
1. Open a terminal server session on that machine.
2. Call this terminal server session as a new Virtual-user injector machine.
3. Connect to this new virtual injector machine from controller. To connect, use respective machine names e.g. Machine_001, Machine_002, etc (Or) respective IP Addresses.
4. Use these additional machines as Load Generators.

***Pre Requisites to use Citrix protocol:

1.      Install ICA agent in Vugen & LG machines
2.      A Citrix VUser’s memory footprint is two to three times a Web VUser’s memory footprint.
3.      Citrix transactions, Citrix windows and bitmap functions in Load Runner take time to stabilize and hence we must not ignore think time when replaying the script.
4.       Use the keyboard as often as possible, avoid using mouse clicks.

The API is divided into the various types of client activity:

***Functions in Citrix Protocol

1.      ctrx_nfuse_connect();
2.      ctrx_sync_on_window ();
3.      ctrx_sync_on_bitmap
4.      ctrx_sync_on_bitmap_change.
5.      ctrx_sync_on_bitmap_change
6.      ctrx_mouse_click ();
7.      ctrx_type ();
8.      ctrx_key();
9.      ctrx_get_window_name

***Most commonly used citrx functions are


1. Ctrx_nfuse_connect ();
2. Ctrx_sync_on_window ();
3. Ctrx_mouse_click ();
4. Ctrx_type ()
5. Ctrx_key ()
6. Ctrx_get_window_name ();
7. Ctrx_sync_on_bitmap ();
8. Ctrx_get_text_location ()
9. Ctrx_get_text ();

 ***Lost in Citrix Error:

Citrix error where expected windows are not appearing where they are supposed to or they are not the right ones.

1. Ctrx_get_window_name
2. Ctrx_get_window_position

--->Solution

At the top of the script initialize the variables

Char window_name[100]; long xpos,ypos,
width,height;

 ctrx_get_window_name(window_name); ctrx_get_window_position(window_name, &xpos, &ypos, &width, &height);
lr_output_message("Window = %s. x= %ld, y= %ld, width= %ld,
height = %ld", window_name, xpos, ypos, width, height);


***Error handling functions and challenges are:

1.   Ctrx_get_text(); Retrieves a text in a rectangle
2.   Synchronization issues
a.   synchronization with bit map
b.   text verification and capture dynamic value from on screen
I. Ctrx_get_text: capture the on screen text & handle the text verification point
II. Ctrx_get_bitmap_value : return a value of a bit map as a string





***JAIN...!!!


Tuesday 21 June 2016

Citrix protocol - ctrx_type & ctrx_key function...

ctrx_type (string) and ctrx_key (key, key modifier) 


               These two functions are the way to send keyboard data to the Citrix server. The ctrx_type function sends normal keyboard data and the ctrx_key function sends non-alphanumeric keys to the server.

                 In order to send special keyboard commands like Alt-F, ctrx_key can be used. For example, ctrx_key (“f”, MODIF_ALT) will send Alt-F to the server.



***Jain

Sunday 19 June 2016

Citrix Bitmap Synchronisation Function...!!!

ctrx_sync_on_bitmap (x, y, length, width, hash)


***This sync function is used when waiting on something other than a window to
change.

                                    A good example would be a “search” business process. Before continuing with the script, a bitmap sync could be placed in the script to make sure there were results. Inserting a bitmap sync can be done either during or after recording the script.

1. The bitmap sync button is located on the recording bar. To insert one after recording, bring up the tree view of the script. Find a line that has a screenshot of the place that needs a sync. From there, a sync_on_bitmap step can be inserted. 


The inserted step will look similar to this:

ctrx_sync_on_bitmap(449, 90, 107,
18,"9c097ec91de046c32e9b632b16125913");

The bitmap sync is one of the most difficult parts of a Citrix script to maintain. When they are used, any application changes made in the environment can potentially break the script. If the bitmap syncs stop working, there are a couple of ways to fix the script. The first is to rerecord the sync in a new script and copy the newly captured bitmap sync it into the old script in place of what is there. 


2. The second way is to find out what hash value LoadRunner is seeing at the coordinates of the bitmap. Before running the script, turn on advanced logging in the Vugen run-time settings and enable the advanced trace option. When it gets to the point of failure in the script, the LoadRunner execution log will show the expected hash value and the actual hash value of the bitmap. Copy the actual
hash value into the script and determine if the script will run. Alternatively, both bitmaps could be used in the statement by separating them with a pipe (“|”). 

An example of this would be

ctrx_sync_on_bitmap(158, 300, 312, 132,
"84e312c9701b3dbb225182ae41cdc228|571b7bccd5eb40172dbc7e79d4

61528d ");

***Jain

Saturday 28 May 2016

Difference between REST & SOAP...!!!



Difference between REST and SOAP 


#
SOAP
REST
1.
XML based message protocol
Architectural style Protocol
2.
Uses WSDL for Communication
Uses XML or JSON
3.
Transport Independent

***Since SOAP messages are wrapped inside a SOAP envelop it can be sent over to any transport mechanism e.g. TCP, FTP, SMTP or any other protocol
Transport Dependent

***RESTful web services are heavily dependent upon HTTP protocol.
4.
SOAP web service can return response with only XML
RESTful web service can return response in various format e.g. JSON, XML and HTML
5.
Difficult to call from Javascript
Easy to call from JavaScript
6.
SOAP messages consumes more bandwidth

***Because SOAP has additional header for every message & XML is more verbose than JSON
Rest consumes less bandwidth

*** Because RESTFul services utilizes HTTP header.

7.
SOAP web services totally ignore web caching mechanism.

RESTful web service take full advantage of web caching mechanism because they are basically URL based
8.
Security in SOAP based web services need additional infrastructure in web to enable message or transport level security concerns. 

Security in RESTful web service can be implemented using standard and traditional solutions for authorised access to certain web resources
9.
SOAP Stands for Simple Object Access Protocol (SOAP).
REST stands for REpresentational State Transfer (REST)


***Jain

How to set LoadRunner Agent as a service or process..???

Difference between Agent as Process & Agent as Service


Agent as Process
Agent as Service
It runs the ‘magentproc.exe
It runs the service ‘magentservice’ 
User needs to login to the machine in order to start this Agent
Runs automatically even if the user does not log in to the system

Have to start the LoadRunner agent manually each time we reboot the PC/server or
You need to put the LoadRunner agent process into a windows startup group
 Load Runner Agent start automatically 
During Load Runner Installation

Agent as process :- During  installation select the  option "Manual log into the Load Generator machine”
Agent as service :- During  installation select the  option "Allow Virtual Users to run on this machine without user login"  

After Load Runner installation

***To switch from running the LoadRunner agent as a service to running as a process:
1. Uninstall LoadRunner agent service by typing in
magentservice.exe -remove<enter>
2. If the uninstall is sucessful, you will receive the following messages:
Stopping Load Runner Agent Service.
Load Runner Agent Service stopped.
Load Runner Agent Service removed.
3. Start the agent process by running magentproc.exe from <LoadRunner>\launch_service\bin
4. Add the LoadRunner Agent Process shortcut back into the Startup group.

***To switch from running the LoadRunner agent as a process to running as a service:
1. Remove the LoadRunner Agent Process shortcut from the Start -> Program Files -> Startup group.
2. Install magentservice.exe
Type in magentservice.exe -install<enter>
3. If the install is successful, you will receive the following messages:
LoadRunner Agent Service installed or started
4. Go to the Window’s Services and change its properties to start it as "Automatic."
NOTE -  You need admin rights to do this.

***The magentservice.exe file path is
C:\Program Files (x86)\HP\LoadRunner\bin or C:\Program Files\HP\LoadRunner\bin


*** Jain

Wednesday 13 April 2016

What are the modules of Quality Center?

The Quality Center modules are:

Management Module: This module includes following sub modules:

1. Release module: Enable us to define release and cycles for the application management process.
2. Libraries module: Enables us to define libraries to track changes in project, reuse entities in project, or share entities across multiple projects.

Requirement Module: Helps us to manage requirements. This includes defining what we are testing, defining requirement topics and items, also analyzing requirements.

Test Plan: Enable us to develop and manage test in a hierarchical tree-structure. Tests can be linked to requirement and defects.

Test Resources: Enables us to manage test resources in a hierarchical tree structure. Tests resources can be associated with tests.

Test lab: Enables us to run tests and analyze the results.

Defect Module: Helps us to report defects, determine, repair priorities and reopen defects.

Dashboard: Helps to create graphs, reports and excel reports.