Error "An Authentication object was not found in the SecurityContext" in load runner
Some times in our application with the web-services,during recording of the application VUGen doesn't record the authentication object and while replaying the script you get the error An Authentication object was not found in the Security Context The reason for the SOAP fault is:
"An Authentication object was not found in the SecurityContext" As mentioned by above error, the application is mostly launched via a web-link where the run time jars / dlls are downloaded locally and application is launched. During launching itself the application takes the credentials from local system (your AD account details) and authenticates the user. In case of replaying this operation in VUGen this authentication information is not available, this can be done by sending the authentication information in the header before the first web-service request as shown below: Otherwise if your web service method has property for sending authentication object then you can do so in the request itself.
Posted by raviteja gorentla
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, Errors in LoadRunner, ExtraStuff, General, Monitoring, Performance Testing, PerformanceCenter
WHAT IS A REVERSE PROXY SERVER?
A proxy server is a go-between or intermediary server that forwards requests for content from multiple clients to different servers across the Internet. A reverse proxy server is a type of proxy server that typically sits behind the firewall in a private network and directs client requests to the appropriate back-end server. A reverse proxy provides an additional level of abstraction and control to ensure the smooth flow of network traffic between clients and servers. Reverse proxy server benefits:
1.Load balancing: A reverse proxy server can act as a “traffic cop,” sitting in front of your back-end servers and distributing client requests across a group of servers in a manner that maximizes speed and capacity utilization while ensuring no one server is overloaded, which can degrade performance. If a server goes down, the load balancer redirects traffic to the remaining online servers.
2.Web acceleration:Reverse proxies can compress inbound and outbound data, as well as cache commonly requested content, both of which speed up the flow of traffic between clients and servers. They can also perform additional tasks such as SSL encryption to take load off of your web servers, thereby boosting their performance.
3.Security and anonymity :By intercepting requests headed for your back-end servers, a reverse proxy server protects their identities and acts as an additional defense against security attacks. It also ensures that multiple servers can be accessed from a single record locater or URL regardless of the structure of your local area network.
Posted by raviteja gorentla 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Analysis, Controller, General, Performance Testing, PerformanceCenter, Tips n Tricks, Vugen
Perceiver Monitoring tool
Perceiver is the new monitoring tool.This is introduced because Companies invest in enterprise applications and infrastructure to deliver optimal service to their end-user community. IT organizations are asked to manage more systems with fewer resources, while reducing costs. Performance Analysts and Capacity Planners are often asked to create volumes of custom charts and graphs for different audiences, instead of focusing on high value capacity planning and performance engineering responsibilities that provide a greater return on investment for the company.For this it is the best solution to use the BMC perceiver tool. KEY BENEFITS : User interface allows non-experts to easily access actionable data Ad hoc queries to track, view, and relate performance metrics to business applications Common interface for enterprisewide systems and applications Out-of-the-box value with BMC best practices view FEATURES : 1.Enhances decision-making capabilities by providing direct access to relevant performance data through a dynamic Web interface 2.Provides ad-hoc queries to track, view and relate detailed performance metrics to business applications 3.Increases the visibility and success of the performance organization by providing a consumer viewing tool for internal customers 4. Simplifies training and use via an easy-to-use web interface, eliminating the need for expert users and additional in-depth training 5. Maximizes the investment in BMC Performance Assurance by greatly increasing the number of direct users 6. Delivers out-of-the-box value with pre-loaded BMC Software Best Practice views including an online drag and drop editor for customization 7. Protects your performance investment by providing a performance viewing tool available across multiple platforms ABOUT BMC SOFTWARE BMC Software delivers the solutions: IT needs to increase business value through better management of technology and IT processes. Our industry-leading Business Service Management solutions help you reduce cost, lower risk of business disruption, and benefit from an IT infrastructure built to support business growth and flexibility. Only BMC provides best-practice IT processes, automated technology management, and award-winning BMC Atrium technologies that offer a shared view into how IT services support business priorities. Known for enterprise solutions that span mainframe, distributed systems, and enduser devices, BMC also delivers solutions that address the unique challenges of the midsized business. Founded in 1980, BMC has offices worldwide and fiscal 2008 revenues of $1.73 billion. Activate your business with the power of IT. www.bmc.com Source: http://discovery.bmc.com/
Posted by raviteja gorentla 2 comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Analysis, Controller, Errors in LoadRunner, ExtraStuff, General, LoadRunner, Manual Testing, Monitoring, Performance Testing,PerformanceCenter, Scripting, Tips n Tricks, Vugen
CPU of Load Generator Exceeded 80%
Recently i ran in to a load test and i saw the CPU of Load Generator Exceeded 80% and here are the ways to find out the root cause: There could be several things, but using 2008 machines on VMs is common. If you are using web vusers should be a small footprint.
Check if you have admin rights on the system or not?
Is CPU consumption above 80% during the entirety of the test
Check for any mismatch in versions in patch version
Try to run the agent using "Run as administrator"
Check for the mdrv process in the htask manager of the controller and the load generator machines while running the test
make sure to have the same patches level on every component, having a version mix is a real problem.
Please check if you have the following components installed on your LG machine McAfee Antivirus or Symantec NetBackup
Posted by raviteja gorentla No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Analysis, Controller, LoadRunner, Performance Testing, PerformanceCenter, Scripting, Tips n Tricks, Vugen
"Error -27778: SSL protocol error when attempting to connect with host" in load runner
Recently i had some issues with SSL protocol error,while running the scripts in controller i am facing the "Error -27778: SSL protocol error when attempting to connect with host",so finally i got rid of that by using the below steps in the script Keep the below code at the start of of script use web_set_sockets_option("SSL_VERSION", "TLS"); web_set_sockets_option("SSL_VERSION", "1"); This forces the SSL connection to the server to use version 1 of the SSL protocol rather than letting the server suggest a version during the connection handshake. We had same issue on vugen 11.50 with new patch also then we enabled the below setting Run-Time Settings -> Preferences -> Select "WinInet Replay Engine instead of Sockets (Windows Only)."
Posted by raviteja gorentla 2 comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, General, Performance Testing, Scripting, Vugen
LoadRunner – Script Anatomy Description
When you record and save a LoadRunner script in Vugen, there are a number of files that are created. Here’s what they are, and what they do and identification of the files you can safely delete.. Files Required for PlaybackDuring the course of recording and playback of scripts, the Vugen application will create many files, but only some of them are necessary for playback (either in Vugen or the Controller). For example, say you have script named PerformancEngineer, with two Actions, Home and Forums, then the required files you would need in the PerformanceEngineer script directory would be: * PerformanceEngineer.usr * default.usp * default.cfg * globals.h * Home.c * Forums.c * vuser_init.c * vuser_end.c * PerformanceEngineer.prm Here’s what is in each file: PerformanceEngineer.usr: Primarily, the .usr file defines which actions are used by the script. There are other properties which define which protocols are used and other settings, but most of the info default.usp: Contains the run logic for the script default.cfg: Contains the run-time settings (except for run-logic) globals.h: The global headers file- visible and editable in Vugen *.c (Action files): These are the action files containing your script code. You can edit these files in ny text editor, if you want. Sometimes it is easier than starting up Vugen PerformanceEngineer.prm: Containes the parameter definitions *.dat: Your data files, you can save these in the script directory or somewhere else, even a mapped network drive on a different server Files Created During Vugen Playback All of the files listed below can safely be deleted and not affect your ability to use the script. result1: One or more result directories are created which contain script playback results *.idx: The .idx files are binary “index” files created by Vugen for holding parameter values PerformanceEngineer.ci: combined_PerformanceEngineer.c: A list of #includes for all of your Actions logfile.log, mdrv.log: random log files which you will probably never need to look at mdrv_cmd.txt, options.txt: These text files contain commands and arguments for the script compiler and driver (mdrv) and are created dynamically, so you can safely delete them. output.txt: This one is important. This file contains all of the log messages generated during script playback. The contents of this file appear in the “Output Window” section of Vugen output.bak: A backup of the above file pre_cci.c: Output from the C pre-processor, which contains all of the functions used in your scrip, from all of the Acitons and header files. In summary, you can delete: *.txt, *.log, *.idx, *.bak, result*, pre_cci.c, combined_*, *.ci Files Created During Recording The ‘data’ directory in your script directory contains the script recording data. I usually delete this so it doesn’t get checked into my version control system, but you may want to keep it around if you use the graphical scripting mode and/or you want to compare playback vs. recording. The auto-correlation feature makes use of this data, too, but I haven’t had much sucess using that feature. (This has been referred from the site performanceengineer.com)
Posted by raviteja gorentla
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, ExtraStuff, General, LoadRunner, Performance Testing, Tips n Tricks, Vugen
How to run Ajax Click n Script in Controller?
AJAX (Asynchronous JavaScript and XML) is a technique for creating interactive Web applications. With AJAX, Web pages exchange small packets of data with the server, instead of reloading an entire page. This reduces the amount of time that a user needs to wait when requesting data. It also increases the interactive capabilities and enhances the usability.
Using AJAX, developers can create fast Web pages using Javascript and asynchronous server requests. The requests can originate from user actions,timer events, or other predefined triggers.AJAX components, also known as AJAX controls, are GUI based controls that use the AJAX technique—they send a request to the server when trigger occurs.
For example, a popular AJAX control is a Reorder List control that lets you drag components to a desired position in a list. VuGen’s support for AJAX implementation is based on Microsoft’s ASP.NET AJAX Control Toolkit formerly known as Atlas.
AJAX Supported Frameworks
The supported frameworks for AJAX functions are:
Atlas 1.0.10920.0/ASP.NET AJAX—All controls
Scriptaculous 1.8—Autocomplete, Reorder List, and Slider
VuGen supports the following frameworks at the engine level. This implies
that VuGen will create standard Web Click and Script steps, but not AJAX
specific functions:
Prototype 1.6
Google Web Toolkit (GWT) 1.4
AJAX Example Script
VuGen uses the control handler layer to create the effect of an operation on a GUI control. During recording, when encountering one of the supported AJAX controls, VuGen generates a function with an ajax_xxx prefix. In the following example, a user selected item number 1 (index=1) in an
Accordion control. VuGen generated an ajax_accordion function.
Note: When you record an AJAX session, VuGen generates standard Web (Click and Script) functions for objects that are not one of the supported AJAX controls. In the example above, the word FILE_PATH was typed into an edit box.
web_browser("Accordion.aspx",
DESCRIPTION,
ACTION,
"Navigate=http://labm1app08/AJAX/Accordion/Accordion.aspx",
LAST);
lr_think_time(5);
ajax_accordion("Accordion",
DESCRIPTION,
"Framework=atlas",
"ID=ctl00_SampleContent_MyAccordion",
ACTION,
"UserAction=SelectIndex",
"Index=1",
LAST);
web_edit_field("free_text_2",
"Snapshot=t18.inf",
DESCRIPTION,
"Type=text",
"Name=free_text",
ACTION,
"SetValue=FILE_PATH",
LAST);
Note: When you record an AJAX session, VuGen generates standard Web (Click and Script) functions for objects that are not one of the supported AJAX controls. In the example above, the word FILE_PATH was typed into an edit box.
Posted by raviteja gorentla 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, General, LoadRunner, Performance Testing, Vugen
HTTP WATCH
Why do you need an HTTP Viewer or Sniffer? All web applications make extensive use of the HTTP protocol (or HTTPS for secure sites). Even simple web pages require the use of multiple HTTP requests to download HTML, graphics and javascript. The ability to view the HTTP interaction between the browser and web site is crucial to these areas of web development:
Trouble shooting
Performance tuning
Verifying that a site is secure and does not expose sensitive information
How can HttpWatch Help?
HttpWatch integrates with Internet Explorer and Firefox browsers to show you exactly what HTTP traffic is triggered when you access a web page. If you access a site that uses secure HTTPS connections, HttpWatch automatically displays the decrypted form of the network traffic. Conventional network monitoring tools just display low level data captured from the network. In contrast, HttpWatch has been optimized for displaying HTTP traffic and allows you to quickly see the values of headers, cookies, query strings . HttpWatch also supports non-interactive examination of HTTP data. When log files are saved, a complete record of the HTTP traffic is saved in a compact file. You can even examine log files that your customers and suppliers have recorded using the free Basic Edition.
Why HttpWatch? Seven reasons to use HttpWatch rather than other HTTP monitoring tools:
Easy to Use - start logging after just a couple of mouse clicks in Internet Explorer or Firefox. No other proxies, debuggers or network sniffers have to be configured
Productive - quickly see cookies, headers, POST data and query strings without having to manually decode raw HTTP packets
Robust - reliably log thousands of HTTP transactions for hours or days while tracking down intermittent problems
Accurate - HttpWatch has minimal impact on the normal interaction of the browser with a web site. No extra network hops are added, allowing you to measure real world HTTP performance
Flexible - HttpWatch only requires client-side installation and will work with any server side technology that renders HTML pages in Internet Explorer or Firefox. No special server-side permissions or configurations are required - ideal for use against production servers on the Internet or Intranet
Comprehensive - works with HTTP compression, redirection, SSL encryption & NTLM authentication. A complete automation interface provides access to recorded data and allows HttpWatch to be controlled from most popular programming languages.
Professional Support - updates and bug fixes are provided free of charge on our website and technical support is available by email, phone or fax.
Uses of HttpWatch:
Testing a web application to ensure that it is correctly issuing or setting headers that control page expiration
Finding out how other sites work and how they implement certain features
Checking the information that the browser is supplying when you visit a site
Verifying that a secure web site is not issuing sensitive data in cookies or headers
Tuning the performance of a web site by measuring download times, caching or the number of network round trips
Learning about how HTTP works (useful for programming and web design classes)
Alowing webmasters to fine tune the caching of images and other content
Performing regression testing on production servers to verify performance and correct behavior
Posted by raviteja gorentla 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, Errors in LoadRunner, ExtraStuff, General, JMeter, Monitoring, Performance Testing, Scripting, Tips n Tricks, Vugen
What is a HAR File and what is the use of HAR??
HAR stands for HTTP Archive.
This is a common format for recording HTTP tracing information. This file contains a variety of information, but for our purposes, it has a record of each object being loaded by a browser. Each of these objects’ timings is recorded. The HAR file format is still an evolving standard, and the information contained within is both flexible and extensible. You should expect the HAR file to include a breakdown of timings including:
how long it takes to fetch the DNS information
how long each object takes to be requested
how long it takes to connect to the server
how long it takes to transfer from the server to the browser of each object
whether the object is blocked or not
The data is stored as a JSON document and extracting meaning from the low level data is not always easy, but with practice, a HAR file can quickly help you identify the key performance problems with a web page, which in turn will help you efficiently target your development towards the areas that will deliver the greatest return on your efforts.
Posted by raviteja gorentla 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, Errors in LoadRunner, General, LoadRunner, Performance Testing, Scripting, Tips n Tricks, Vugen
Parameterization in Load Runner
Replacing hard coded values in the script with different values is called Parameterization.
Parameterization used for :
Reducing script size
Avoiding cache effect
Type of Parameters 1.Date/Time – Whenever we have to replace a date value with a parameter, Date/Time parameter is used. Any post with past date is not valid. To keep it updated, Date/Time parameter provides flexibility to get the current or future date. If past date is needed, it handles that too. 2.Group Name -We can generate a parameter on the basis of group that we select on controller for the script while execution. This parameter will only work while running the script on controller. 3. Iteration Number – This replaces the parameter with current iteration number. This is generally used to build some logic. For example- when we want some code in script to be executed alternatively. For this, we will use the iteration number to check whether it is even or odd number and for one of the condition we will execute the function. 4. Load Generator Name – We can also generate parameter while executing the script on controller on the basis of load generator name on which that script is running. This parameter only works while running the script on controller. 5. Vuser ID – When we run the script on controller, it assigns a unique id to each virtual user that emulate during the execution. This parameter type is used – To print the Vuser ID in an external file for script-debugging purpose. To segregate transaction volume based on Vuser ID 6. File – Some time we want to pass the specific value in the script. In such cases, we use file and enter the values that want to use during execution. LR provides options to run the script with provided list sequentially or randomly on next iteration. In few cases we want to use a set of values passed to the script. In such cases, we can use same file for the other parameter value as well.
7. Random Number – As per need, Vugen also generates random value from the provided range. 8.Unique value – In few situations, script is not allowed to pass any duplicate value. In such cases, unique parameter is used to avoid failures due to duplicate value,. 9.User Defined function – Such parameter calls a function whose return value replaces the parameter name. 10. XML – XML Parameter Types are used for multiple valued data contained in an XML structure. XML parameters are widely used with Web Service scripts and with SOA services.
Posted by raviteja gorentla No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Analysis, Controller, ExtraStuff, General, LoadRunner, Performance Testing, Vugen
Capture, Filter and Inspect Packets using Wireshark Tool
Here is the demo.. Wireshark, a network analysis tool formerly known as Ethereal, captures packets in real time and display them in human-readable format. Wireshark includes filters, color-coding and other features that let you dig deep into network traffic and inspect individual packets. This tutorial will get you up to speed with the basics of capturing packets, filtering them, and inspecting them. You can use Wireshark to inspect a suspicious program’s network traffic, analyze the traffic flow on your network, or troubleshoot network problems. Getting Wireshark You can download Wireshark for Windows or Mac OS X from its official website. If you’re using Linux or another UNIX-like system, you’ll probably find Wireshark in its package repositories. For example, if you’re using Ubuntu, you’ll find Wireshark in the Ubuntu Software Center. Just a quick warning: Many organizations don’t allow Wireshark and similar tools on their networks. Don’t use this tool at work unless you have permission.
Capturing Packets: After downloading and installing Wireshark, you can launch it and click the name of an interface under Interface List to start capturing packets on that interface. For example, if you want to capture traffic on the wireless network, click your wireless interface. You can configure advanced features by clicking Capture Options, but this isn’t necessary for now. As soon as you click the interface’s name, you’ll see the packets start to appear in real time. Wireshark captures each packet sent to or from your system. If you’re capturing on a wireless interface and have promiscuous mode enabled in your capture options, you’ll also see other the other packets on the network. Click the stop capture button near the top left corner of the window when you want to stop capturing traffic.
Color Coding You’ll probably see packets highlighted in green, blue, and black. Wireshark uses colors to help you identify the types of traffic at a glance. By default, green is TCP traffic, dark blue is DNS traffic, light blue is UDP traffic, and black identifies TCP packets with problems — for example, they could have been delivered out-of-order.
Sample Captures If there’s nothing interesting on your own network to inspect, Wireshark’s wiki has you covered. The wiki contains a page of sample capture files that you can load and inspect. Opening a capture file is easy; just click Open on the main screen and browse for a file. You can also save your own captures in Wireshark and open them later.
Filtering Packets If you’re trying to inspect something specific, such as the traffic a program sends when phoning home, it helps to close down all other applications using the network so you can narrow down the traffic. Still, you’ll likely have a large amount of packets to sift through. That’s where Wireshark’s filters come in. The most basic way to apply a filter is by typing it into the filter box at the top of the window and clicking Apply (or pressing Enter). For example, type “dns” and you’ll see only DNS packets. When you start typing, Wireshark will help you autocomplete your filter. You can also click the Analyze menu and select Display Filters to create a new filter. Another interesting thing you can do is right-click a packet and select Follow TCP Stream. You’ll see the full conversation between the client and the server. Close the window and you’ll find a filter has been applied automatically — Wireshark is showing you the packets that make up the conversation.
Inspecting Packets Click a packet to select it and you can dig down to view its details. You can also create filters from here — just right-click one of the details and use the Apply as Filter submenu to create a filter based on it. Wireshark is an extremely powerful tool, and this tutorial is just scratching the surface of what you can do with it. Professionals use it to debug network protocol implementations, examine security problems and inspect network protocol internals
Posted by raviteja gorentla No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Analysis, Controller, General, Performance Testing, Tips n Tricks
Base64 Encode/Decode for LoadRunner
Code:
#include "base64.h"
vuser_init()
{
int res;
// ENCODE
lr_save_string("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789","plain");
b64_encode_string( lr_eval_string("{plain}"), "b64str" );
lr_output_message("Encoded: %s", lr_eval_string("{b64str}") );
// DECODE
b64_decode_string( lr_eval_string("{b64str}"), "plain2" );
lr_output_message("Decoded: %s", lr_eval_string("{plain2}") );
// Verify decoded matches original plain text
res = strcmp( lr_eval_string("{plain}"), lr_eval_string("{plain2}") );
if (res==0) lr_output_message("Decoded matches original plain text");
return 0;
}
base64.h include file
/*
Base 64 Encode and Decode functions for LoadRunner
==================================================
This include file provides functions to Encode and Decode
LoadRunner variables. It's based on source codes found on the
internet and has been modified to work in LoadRunner.
Created by Kim Sandell / Celarius - www.celarius.com
*/
// Encoding lookup table
char base64encode_lut[] = {
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q',
'R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h',
'i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y',
'z','0','1','2','3','4','5','6','7','8','9','+','/','='};
// Decode lookup table
char base64decode_lut[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,62, 0, 0, 0,63,52,53,54,55,56,57,58,59,60,61, 0, 0,
0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,
15,16,17,18,19,20,21,22,23,24,25, 0, 0, 0, 0, 0, 0,26,27,28,
29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,
49,50,51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
void base64encode(char *src, char *dest, int len)
// Encodes a buffer to base64
{
int i=0, slen=strlen(src);
for(i=0;i
{ // Enc next 4 characters
*(dest++)=base64encode_lut[(*src&0xFC)>>0x2];
*(dest++)=base64encode_lut[(*src&0x3)<<0x4 amp="" src="" xf0="">>0x4];
*(dest++)=((i+1)>0x6]:'=';
*(dest++)=((i+2)
}
*dest='\0'; // Append terminator
}
void base64decode(char *src, char *dest, int len)
// Encodes a buffer to base64
{
int i=0, slen=strlen(src);
for(i=0;i
{ // Store next 4 chars in vars for faster access
char c1=base64decode_lut[*src], c2=base64decode_lut[*(src+1)], c3=base64decode_lut[*(src+2)], c4=base64decode_lut[*(src+3)];
// Decode to 3 chars
*(dest++)=(c1&0x3F)<<0x2 amp="" c2="" x30="">>0x4;
*(dest++)=(c3!=64)?((c2&0xF)<<0x4 amp="" c3="" x3c="">>0x2):'\0';
*(dest++)=(c4!=64)?((c3&0x3)<<0x6 amp="" c4="" div="" x3f="">
}
*dest='\0'; // Append terminator
}
int b64_encode_string( char *source, char *lrvar )
// ----------------------------------------------------------------------------
// Encodes a string to base64 format
//
// Parameters:
// source Pointer to source string to encode
// lrvar LR variable where base64 encoded string is stored
//
// Example:
//
// b64_encode_string( "Encode Me!", "b64" )
// ----------------------------------------------------------------------------
{
int dest_size;
int res;
char *dest;
// Allocate dest buffer
dest_size = 1 + ((strlen(source)+2)/3*4);
dest = (char *)malloc(dest_size);
memset(dest,0,dest_size);
// Encode & Save
base64encode(source, dest, dest_size);
lr_save_string( dest, lrvar );
// Free dest buffer
res = strlen(dest);
free(dest);
// Return length of dest string
return res;
}
int b64_decode_string( char *source, char *lrvar )
// ----------------------------------------------------------------------------
// Decodes a base64 string to plaintext
//
// Parameters:
// source Pointer to source base64 encoded string
// lrvar LR variable where decoded string is stored
//
// Example:
//
// b64_decode_string( lr_eval_string("{b64}"), "Plain" )
// ----------------------------------------------------------------------------
{
int dest_size;
int res;
char *dest;
// Allocate dest buffer
dest_size = strlen(source);
dest = (char *)malloc(dest_size);
memset(dest,0,dest_size);
// Encode & Save
base64decode(source, dest, dest_size);
lr_save_string( dest, lrvar );
// Free dest buffer
res = strlen(dest);
free(dest);
// Return length of dest string
return res;
Posted by raviteja gorentla 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, General, LoadRunner, Performance Testing, PerformanceCenter, Scripting, Tips n Tricks, Vugen
Loadrunner MAPI Protocol
The comments made here about the Loadrunner MAPI protocol are applicable for Loadrunner version 8.1. MAPI is Loadrunner’s Microsoft Exchange protocol. I had reasonably straight forward objectives for a test I was preparing. Ramp up a few hundred users who would simulate use of Microsoft Exchange, i.e. users who were logging on, sending and receiving emails I expected that Loadrunner would work with Outlook much like Loadrunner works with Internet Explorer. Loadrunner can simulate Internet Explorer with multiple users and sessions all working independently. Whilst working with the MAPI protocol I discovered that Loadrunner struggles to interact with Outlook. Some of the problems encountered were: 1) Not all of the statements worked. While they did not cause any problems, they just did not do what they were supposed to do. For instance: The following statement should return a message ID, which it didn’t. msgid = mapi_get_property_sz_ex(&mapi, "Message ID"); The following statement deleted a mail, but would not delete another email unless the logon statement was reissued on a fresh iteration: mapi_delete_mail_ex(&mapi,"NextMail", "Show=all", LAST); 2) While the logon statement worked, it was not possible to logon a user to Outlook unless that user was logged onto the domain. Theoretically, the web_set_user will do this for you but it was not possible to introduce a web statement into the email script. 3) Configuring Outlook and permissions on the Injector machines was very much a trial and error process. Some handy hints:
Sessions can be run as local or global sessions. If running as a global session, the Loadrunner statements all finish with a suffix of _ex. The following settings are required: Define mapi as ‘MAPI mapi = 0;’ When using a global statement, stick ‘&mapi’ as the first parameter e.g.;mapi_logon_ex(&mapi, "Logon", The logon statement is as follows: mapi_logon_ex(&mapi, "Logon", "ProfileName=Default Outlook Profile", "ProfilePass=", LAST); To login a user, check the following settings: The profile name can be found by; Right click Outlook; select properties; select show profiles. Funnily enough, the default Outlook profile is actually called ‘Default Outlook Profile’. A mailbox for a user will be associated with an Outlook profile. This can be checked or amended by; Right click Outlook; select properties; highlight the profile and select properties; select email accounts; select view or change email accounts; select change / add / remove as appropriate. In the logon statement above, password is not entered, mainly because it does not seem to be required. More than one virtual user could be used per injector with this protocol, however, each virtual user per injector was accessing the same mailbox.It is worth increasing the mailboxes in size otherwise error messages will be returned if the mailbox fills up. There is a setting in Exchange that detects if an automated program is running which may cause a popup message to be displayed. This will cause execution of the automation to stop. In fact, any popup will cause execution of the automation to stop.If anyone else has had a better experience with this protocol than I have, I would be very interested to hear about it. You will find below a sample Loadrunner script that may help with your load testing project: char * message; char * msgid; api; int rc; int i; MAPI mapi = 0; char msg_id; Action() { // Get the Message identifier of current email message. msgid = mapi_get_property_sz_ex(&mapi, "Message ID"); lr_output_message("the message id is %s", lr_eval_string("msgid")); lr_start_transaction("P02S01_Logon"); mapi_logon_ex(&mapi, "Logon", "ProfileName=Default Outlook Profile", "ProfilePass=", LAST); lr_end_transaction("P02S01_Logon", LR_AUTO); lr_think_time(10); lr_start_transaction("P02S02_Send"); mapi_send_mail_ex(&mapi,"SendMail", "To={send}", //"To=Greg, David Marie", "Subject=Test7 {GROUP}:{VUID} @ {DATE}", "Body=Test Message! Please ignore.This is text inside the body of the email" "111This is text inside the body of the email " "111This is text inside the body of the email " "111This is text inside the body of the email " "111This is text inside the body of the email ", "ATTACHMENTS", "File=C:\\readme.doc", "ENDITEM", LAST); lr_end_transaction("P02S02_Send", LR_AUTO); lr_think_time(10); lr_start_transaction("P02S03_Send"); mapi_send_mail_ex(&mapi,"SendMail", "To={send}", "Subject=Test8 {GROUP}:{VUID} @ {DATE}", "Body=Test Message! Please ignore." "222This is text inside the body of the email " "222This is text inside the body of the email " "111This is text inside the body of the email ", "ATTACHMENTS", "File=C:\\readme.doc", "ENDITEM", LAST); lr_end_transaction("P02S03_Send", LR_AUTO); msgid = mapi_get_property_sz_ex(&mapi, "Message ID"); lr_output_message("the message id is %s", lr_eval_string("msgid")); lr_think_time(10); lr_start_transaction("P02S04_Open_email"); mapi_read_next_mail_ex(&mapi,"NextMail", "Show=all", "Peek=false", LAST); lr_end_transaction("P02S04_Open_email", LR_AUTO); /* lr_think_time(10); lr_start_transaction("P02S05_Delete_email"); mapi_delete_mail_ex(&mapi,"NextMail", "Show=all", "Peek=false", LAST); lr_end_transaction("P02S05_Delete_email", LR_AUTO); */ for (i=0; i<(atoi(lr_eval_string("{randnum1}"))); i++) { lr_start_transaction("P02S04_Open_email"); rc = mapi_read_next_mail_ex(&mapi,"NextMail", "Show=all", "Peek=false", LAST); lr_end_transaction("P02S04_Open_email", LR_AUTO); } lr_think_time(10); lr_start_transaction("P02S05_Delete_email"); mapi_delete_mail_ex(&mapi,"NextMail", "Show=all", "Peek=false", LAST); lr_end_transaction("P02S05_Delete_email", LR_AUTO); return 0;
Posted by raviteja gorentla No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, ExtraStuff, General, LoadRunner, Performance Testing, Tips n Tricks, Vugen
How does collating the test results work in loadrunner controller?
At the end of a test the results are collated by the LoadRunner controller. Each of the generators results are collected in a .eve (Event) file and the output messages for the controller are collected in a .mdb (Microsot Access) database. This happens in the directory specified for the results on the controller. A .lrr (loadrunner results) file is created. The .lrr file is text. The .eve file was text prior to around LoadRunner 7.5, but since then it has been an unpublished compressed format.
When you start the analysis utility it take the information in the .lrr file and the .eve file and creates a .mdb (microsoft access database) or SQL Server database entries which contain each timing record and data point entries. If collation fails at the end of the test you will have only partial results for analysis.
Posted by raviteja gorentla No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Analysis, Controller, General, LoadRunner, Performance Testing, Scripting
Client Interview Question in Load runner
1) How you will get the requirements? 2) What is the differences between running vuser as a process and thread ? 3) Which functions are used in scripting ? 4) Work flow process of the perormance testing? 5) Have you used in controller ? 6) How you design a scenario in controller ? 7) Have written any functions in scripting ? 8) What are the bottlenecks you found? 9) Have you using goal oriented scenario ? 10) Tell me your project end to end process? 11) Tell me about your experience project profile 12) Your LR rating in 1 to 10 scale 14) What is protocol? 15) What is a memory leak? 16) Define Heap Usage? 17) Your past experience how many users you have run the test? 18) What are the bottlenecks you have find the current project? Tell me two critical bottlenecks 19) What type recommendations given to the client or stakeholder? 20) What protocol you worked in fast experience? How to work with that web service protocol in your project. 21) You have any use the heart beat settings did you used in current project? 22) How work is handled in the team? 24) You have 10 URLs? How to test the URLs in in at a time LR (i am not understand the Question) 26) You have any used the custom functions in your project? 28) When memory reach 100%, then ideally what you will think? 30) What type of reports and documents you have prepared? Explain the summary report. 32) Tell me the LR server requirements? 34) What type of analysis did you used in your projects? Tell me few observations and what parameter u have captured? 36) What you have done the Pervious projects? Explain the last project 38) What are other options in correlation function and did u used in your project?
Posted by raviteja gorentla No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Analysis, Citrix, Controller, Errors in LoadRunner, ExtraStuff, General, LoadRunner, Manual Testing, Monitoring, Performance Testing, SilkPerformer, Tips n Tricks
Error: "License cannot be save in your installation directory. (Error code = -4) It will be used only for this session."
Solution:
Make sure that you have administrator privilege to the Controller. If you are accessing the Controller via the network, make sure that you have write access to the network.
Posted by raviteja gorentla No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, Errors in LoadRunner, ExtraStuff, General, LoadRunner, Manual Testing, Performance Testing, Scripting, Tips n Tricks,Vugen
Error “License security violation. Operation is not allowed”
Solution:
If you are applying “TEMPORARY” license, it will not work if LoadRunner was previously installed with a “TEMPORARY” or valid license key. You need to contact HP Customer Support for a valid license key.
Posted by raviteja gorentla No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, Errors in LoadRunner, ExtraStuff, General, Performance Testing, Scripting
Error “License key was generated with a version superior to your license manager. Upgrade your license manager”
Solution:
Make sure the HostID that was sent to HP Customer Support was generated from the correct LoadRunner version. If you sent the HostID of LoadRunner 7.6, but apply the license key on LoadRunner7.0 install, you will get this problem.
Posted by raviteja gorentla No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, Errors in LoadRunner, ExtraStuff, General, LoadRunner, Performance Testing, Scripting, Vugen
Error: “Cannot install license information, probably access to system resource was denied”
Solution:
This error indicates that you need to log in with local administrator permission, since you installed the product with administrator permission. If you still get the error after login as local administrator, run setlicensepermissions.exe from the \bin directory to change the registry permissions
Posted by raviteja gorentla No comments:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: Controller, Errors in LoadRunner, ExtraStuff, General, LoadRunner, Performance Testing, Scripting, Vugen
Error: “License manager does not support objects of this type or license is invalid”
Verify the followings:
Check the properties of the license key. If you apply a license key that has components that does not come with that version of LoadRunner, you will get this error.
Example:Apply WAN emulation license (introduced in LoadRunner 7.6), or J2EE diagnostics (Introduced in LoadRunner 7.8 FP1) license on LoadRunner 7.5 Make sure that you are applying the license key on a machine where the license is generated for. In LoadRunner7.x, license keys are host lock. If you try to apply the license key on a separate machine, you will get this error.