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.

What is Quality Center?

HP Quality Center is Web based Test Management tool. We can access Quality Center over the internet or intranet, via a Web browser. It involves interrelated steps such as defining release, developing requirement, designing and execution of tests, monitoring and reporting defects. Quality Center simplifies and organizes application management by giving us systematic control over the process. It helps in creating framework and foundation for application management workflow. Quality center features a system for organizing and tracking application release, enabling us to align business priorities and quality expectation with our project’s requirement, test and defects.

What is the testing lifecycle?

There is no standard testing life cycle, but it is consist of following phases:

- Test Planning (Test Strategy, Test Plan, Test Bed Creation)
- Test Development (Test Procedures, Test Scenarios, Test Cases)
- Test Execution
- Result Analysis (compare Expected to Actual results)
- Defect Tracking
- Reporting

What are the automated Performance testing phases?

The phases involved in automated performance testing are:

Planning/Design: This is the primary phase where team will be gathering the requirements of the performance testing. Requirements can be Business, Technical, System and Team requirements.

Build: This phase consists of automating the requirements collected during the design phase.

Execution: it is done in multiple phases. It consists of various types of testing like baseline, benchmarking testing

Analyzing and tuning: During the performance testing we will be capturing all the details related to the system like Response time and System Resources for identifying the major bottlenecks of the system. After the bottlenecks are identified we have to tune the system to improve the overall performance.

What activities are performed during performance testing of any application?

Following activities are performed during testing of application:

1. Create user scenarios
2. User Distribution
3. Scripting
4. Dry run of the application
5. Running load test and analyzing the result

What are the exiting and entering criteria in the performance testing?

We can start the performance testing of application during the design. After the execution of the performance testing, we collected the results and analyzed them to improve the performance. The performance tuning processed will be performed throughout the application development life cycle. Performance tuning is performed which is based on factors like release time of application and user requirements of application stability, reliability and scalability under load, stress and performance tolerance criteria. In some projects the end criteria is defined based on the client performance requirements defined for each section of the application. When product reaches to the expected level then that can be considered as the end criteria for performance testing.

What is the reason behind performing automated load testing?

Following drawbacks of manual Load Testing that leads to Automation load testing:

- Difficult to measure the performance of the application accurately.
- Difficult to do synchronization between the users.
- Number of real time users are required to involve in Performance Testing
- Difficult to analyze and identify the results & bottlenecks.
- Increases the infrastructure cost

What is concurrent user hits in load testing?

When the multiple users, without any time difference, hits on a same event of the application under the load test is called a concurrent user hit. The concurrency point is added so that multiple Virtual User can work on a single event of the application. By adding concurrency point, the virtual users will wait for the other Virtual users which are running the scripts, if they reach early. When all the users reached to the concurrency point, only then they start hitting the requests.

What is performance tuning?

To improve the system performance we follow a mechanism, known as Performance tuning. To improve the systems performance there are two types of tuning performed:

Hardware tuning: Optimizing, adding or replacing the hardware components of the system and changes in the infrastructure level to improve the systems performance is called hardware tuning.

Software tuning: Identifying the software level bottlenecks by profiling the code, database etc. Fine tuning or modifying the software to fix the bottlenecks is called software tuning.

Tuesday 5 April 2016

what are the laungages supported by load runner?

Following languages are supported by LoadRunner:
1. C Language
2. Visual Basic Scripting
3. Visual Basic For Applications
4.  Java Scripting

For what purpose, User will be using ‘continue on’ error?

Continue on should be set only when making Execution Logs more descriptive or adding logic to the Vuser.

What are all the reasons to use the Server Resources Monitor?

Server resources monitor is used to find how much data is coming from Cache and helps to find out what are all the parts of the system have bottlenecks

What is difference between Manual scenario and Goal oriented scenario?

Following are the differences between Manual and Goal Oriented scenario:
Manual Scenario
Goal Scenario
Main purpose is to learn how many Vusers can run concurrentlyGoal may be throughput, response time, or number of concurrent Vusers
Gives you manual control over how many Vusers run and at what timeLoad Runner manages Vusers automatically

What tools are required to analyze Vuser run results?

Following tools are required to analyze Vuser run results:
  • Execution Log
  • Run-Time Viewer and
  • Mercury Test Results window

What should be done to view parameter substitution in the Execution Log?

Parameter substitution can be viewed in the extended log in the Run time settings.

What are the four selection methods when choosing data from a data file?

Following are the four selection methods:
  • Sequential
  • Random
  • Unique
  • Parameter name

How can we find database related issues?

Monitors and the Data Resource Graph can be used to find database related issues. LoadRunner allow the tester to specify the resource that needs to be measured before the controller is run.

What is remote command launcher?

The remote command launcher enables the controller to start applications in the host machine.

What are the Load Runner testing process?

Following are the testing process in LoadRunner:
  • Plan load test
  • Create Vuser Scripts
  • Define Scenario
  • Run Scenario
  • Analyze results

Monday 4 April 2016

What is the difference betweeen standard log and ectended log?

The Standard log sends a subset of functions and messages sent during script execution to the log. The subset depends on the vuser type.Extended log sends a detailed script execution messages to the output log.This is the mainly used during debugging when we want information about: parameter substitution, data returned by the server, advanced trace.

How do you debug a LoadRunner script?

 VuGen contains two options to help debug Vuser scripts-the Run Step by Step command and breakpoints. The Debug settings in the Options dialog box allow us to determine the extent of the trace to be performed during scenario execution. The debug information is written to the Output window. We can manually set the message class within your script using the lr_set_debug_message function. This is useful if we want to receive debug information about a small section of the script only.

Friday 1 April 2016

Explain Error handling in LoadRunner.

We can specify how a Vuser handles errors during script execution. By default, when a Vuser detects an error, it exits. A run-time setting is used to instruct a Vuser to complete the execution of the test script when an error occurs while executing the script.

- To do this, select the Continue on Error check box in the Miscellaneous run-time settings.
- Instruct VuGen to complete all execution in where an lr_error_message function was invoked, as Failed.
- The lr_error_message function is invoked by a programmed “If statement”, when a certain condition is met.

What is wasted time in VuGen Replay log?

 Waste time is never performed by any browser user and just the time spent on the activities which support the test analysis. These activities are related to logging, keeping record and custom analysis.

How is VuGen script modified after recording?

 Once the script is recorded, it can be modified with the following process:
Transaction
Parameterization
Correlation
Variable declarations
Rendezvous Point
Validations/Check point

What are the reasons why parameterization is necessary when load testing the Web server and the database server?

parameterization is like script varibles.It is used to vary input to  the server and to emulate real users.Different set of data are sent to the server each time the script is run.one script can emulate many different users on the system. 

what is the use of Scheduler?

we can use the load runner scheduler to set up a scenario to run automatically.

How many areas we can do the correlation?

Areas of correlation are:

1)Iteam Data
2)Time Stamp
3)Links
4)Check Boxes
5)Radio Buttons
6)List Buttons

You want to have each step in your script measured as a transaction in the Controller and not shown in the Replay Log in VuGen. How can you accomplish this?

This can be done by enabling  the automatic transaction in the Run-time settings

You have created several Auto Correlation rules. A new tester on your team is preparing to record a group of scripts on the same application on his workstation. What can you do to provide the tester with the correlation rules?

I would  export the Auto Correlation rules to a .cor file, and then have the new team member import the .cor file into his Auto Correlation rules

What would be your recommendation to improve performance measure?

Fine Tuning of network, database, and app and web server is recommended.
At the network level try to optimize the latency and bandwidth.
At database level, verify all indexes and sequences by running profilers. You may also optimize your database queries.
At the App server level, run profilers for finding the memory leaks in the application
At the web server level you can use monitors and optimize the throughput and other related metrics of the server.

What are the types of check points is available in LoadRunner?

Loadrunner provides two types of check points
a) Image Checkpoints : This checkpoint will verify the presence of an image on a page during run-time
b) Text Checkpoint : This checkpoint will verify the presence of a text-string on a page during run-time
Both of the above checkpoints can be added in Vugen.

How will you divide your script into multiple Actions? Why?

I will divide the script into Actions based on the functionality. For example, Once Action for Logining into Application, another Action for booking and so on.
Actions increase code reusability, reduce maintenance time and hence, decrease costs.

What is the difference in running the Vuser as a process and as a thread? Which is more advantageous way of running Vuser?

When Vuser is run as a process the same driver program is loaded into memory for each Vuser. This will take a large amount of memory and will limit the number of Vusers you can run on a single generator
When Vuser is run as a thread, only one instance of driver program is shared by given number of Vusers.  You can run more number of Vusers on a single generator using the multi-threading mode.

How did you find web server related issues?

Using Web resource monitors we can find the performance of web servers. Using these monitors we can analyze throughput on the web server, number of hits per second that occurred during scenario, the number of http responses per second, the number of downloaded pages per second.

If web server, database and Network are all fine where could be the problem?

The problem could be in the system itself or in the application server or in the code written for the application.

Thursday 31 March 2016

What drawbacks do manual load tests have?

The manual load testing drawbacks are:
  • It is very expensive to do Manual Testing, as real users charge by the hour.
  • With manual load testing, load testing for longer durations like for 7 days won’t be possible, as users really work a maximum of eight hours daily.
  • You will not get accuracy for results correlation as there are delays between actions of users.
  • It is hard to do results collection as the results capture each other.
  • It is hard to do.

What are the criteria for entering and exiting in testing performance?

You can begin testing application performance during the designs. After evaluating these tests, you can collect and analyze the results for performance to be improved. The process of performance tuning will be done throughout the life cycle of the application development. Performance tuning is done based on factors like application release time and application stability user requirement, scalability under load, reliability, performance tolerance and stress tolerance criteria. The end criteria in some projects are defined based on the performance of the client, defined for each application section. When a product gets to the level expected then this is considered as performance testing end criteria.

Mention what is the benefit of LoadRunner on testing tools?

Benefit of LoadRunner testing tools is
  • Versatility
  • Test Results
  • Easy Integrations
  • Robust reports
  • Enterprise Package

Mention what are the phases for automated performance testing?

Phases for automated performance testing includes
  • Design or Planning
  • Build
  • Execution
  • Analyzing & Tuning

Explain what are the common mistakes done in Performance Testing?

The common mistakes done in Performance Testing are
  • Direct jump to multi-user tests
  • Test results not validated
  • Unknown workload details
  • Too small run durations
  • Lacking long duration sustainability test
  • Confusion on definition of concurrent users
  • Data not populated sufficiently
  • Significant difference between test and production environment
  • Network bandwidth not simulated
  • Underestimating performance testing schedules
  • Incorrect extrapolation of pilots
  • Inappropriate base-lining of configurations