Invoke Vugen from a .net app

1. Add System as a Reference to the project
2. Here is actual code to run the script -
Shell("[Vugen Installation Folder]\bin\mmdrv.exe -usr [Full path of the script] -vugen_win 0", AppWinStyle.NormalFocus)

Example :


Shell("C:\Program Files\HP\Virtual User Generator\bin\mmdrv.exe -usr C:\FlightsTool\FlightCal.usr -vugen_win 0", AppWinStyle.NormalFocus)
Note: Neither Vugen now the Run Time window will be visible as the script runs in the background, however the results, log files, etc will be still be saved in the usual location.

Sample date conversion program using vugen scripting in Load runner

//Main Function
Action()
{
char *ConvDate;

//Call date conversion function
dateConv("10/JUL/2009", ConvDate);
lr_output_message("date is %s",ConvDate);
return 0;
}

//Date conversion function
dateConv(char *MyDate, char *ReqDate)
{
lr_save_var(MyDate,2,0,"Date");
lr_save_var(MyDate+3,3,0,"pMonth");

lr_output_message("Month is %s",lr_eval_string("{pMonth}"));

if(strcmp(lr_eval_string("{pMonth}"),"JAN")==0)
lr_save_string("01","Month");
/*  Similar rest of the code goes here....*/
else if(strcmp(lr_eval_string("{pMonth}"),"DEC")==0)
lr_save_string("12","Month");

lr_save_var(MyDate+7,4,0,"Year");

ReqDate = lr_eval_string("{Month}/{Date}/{Year}");
lr_output_message("date is %s",ReqDate);

return 0;
}

Bugzilla interview questions?

What is Bugzilla?Bugzilla is a bug tracking system developed at mozilla.org.

How do enter a bug in Bugzilla?To enter a bug, through "Enter a new bug" link from the main Bugzilla page. This will take you to a product selection screen.

What happens once enter a bug?After you enter a bug, mail is sent both to you and the QA department. A member of the QA department will verify that they can reproduce your bug.

How do search a bug?To search a bug, through "Query" link from the main Bugzilla page.

How do submit a patch?The new Bugzilla system supports the attachment of patches, test cases, and various other forms of file types directly from the bug report screen. Just click on "Create an attachment"

Are cookies required in Bugzilla?Yes.

How can you view your assigned bugs?We can view the assigned bugs though “My Bugs” link.

How can you generate bug report?We can generate bug report through “Report” link.

When Bugzilla was released?Bugzilla was released in 1998.

Which language was written Bugzilla first time?Bugzilla was originally written in "TCL".

Who developed the Bugzilla?Terry Weissman

Which language Bugzilla written?"Perl"

What are the Bugzilla fields?Bugzilla have 11 fields like-
(1)Product
(2)Component
(3)Version
(4)Platform
(5)OS
(6)Priority
(7)Severity
(8)Assigned To
(9)URL
(10)Summary
(11)Description
How can you edit your account in Bugzilla?We can use "User Preferences" link.

How can you add new Product in Bugzilla?We can use "Product" link for adding new product.

How can you add Components of product in Bugzilla?We can use "Components" link for adding components in Bugzilla.

How can edit version of any product in Bugzilla?We can use "Edit Versions" link

"Memory violation error "in Load Runner

Reasons for this:
  1. C pointer errors,C programming invalid declarations
  2. Memory full
  3. Not enough Memory for what you need to place in a defined space
  4. Memory not yet allocated before attempting to use it
  5. Memory allocated but not deallocated
  6. Trying to copy a non pointer version of a datatype to a pointer defined version of a datatype, such as copying a character array to a pointer to a character array
  7. Generally unless you have a hardware issue this is a developer error

How to verify the Vusers or Monitors that are currently licensed in load runner

How to verify license related information like Expiration dates, monitors purchased, and the number and type of Vusers.

For LoadRunner7.0 – 7.8 Feature Pack1:
a. Bring up the Controller and go to Help - About LoadRunner
b. Click on ‘License Info…’ and you will see the License Information.


For LoadRunner8.0:
a. Go to Start - Programs - LoadRunner - LoadRunner
b. Click on the ‘License’ menu and you will see the ‘Host ID’ on the screen.

How do I add a new License key in load runner?

For LoadRunner7.0 – 7.8 Feature Pack1:1. Bring up the Controller and go to Help - About LoadRunner. 
2. Click on "New License" and type in the new license key. 
3. Click .
4. Close the Controller and restart it; the new license key will be in effect.

For LoadRunner 8.0:1. Close the Controller
2. Go to Start - Programs - LoadRunner - LoadRunner
3. Click on the ‘License’ menu
4. Click on ‘New License’ and type in the new license key
5. Click , and to close the window
6. Bring up the Controller again.

How do I generate a HostID for a LoadRunner license in load runner

For LoadRunner7.0 – 7.8 Feature Pack1:a. Bring up the Controller and go to Help - About LoadRunner
b. Click on ‘License Info…’ and you will see the ‘Host ID’ on the screen.


For LoadRunner8.0:a. Go to Start - Programs - LoadRunner - LoadRunner
b. Click on the ‘License’ menu and you will see the ‘Host ID’ on the screen.

Note: If for some reason you are not able to get to this screen, you can run licidgenerator.exe in \bin directory to generate Host-id

How do I identify the SSL protocols and certificates used by a website when testing with LoadRunner

Cause -Understanding the SSL Protocols and certificates used by a website.
Solution -To identify the type of SSL and certs used on a web server, type the following commands from a Loadrunner client workstation :


  • Go to the Loadrunner/bin directory.
  • Type "openssl", this will then display an >openssl prompt.
  • Type "s_client - connect www.test.com:443" where test.com is your web site.

This will then return details of the web servers SSL configuration.

Other usefull commands to use in LoadRunner Web protocol scripts are as follows:

web_set_sockets_option("SHUTDOWN_MODE", "FAST");Allows the disconnection of the SSL session to be completed quickly.

web_set_sockets_option("SSL_VERSION", "TLS");
web_set_sockets_option("SSL_CIPHER_LIST", "RC4-MD5");
These options allow the version and cipher for SSL to be specified. Possible versions and ciphers are detailed in the Loadrunner Function Reference.

web_set_sockets_option("TRACE_SSL_IO","1");This option will detail all SSL IO in the normal vuser log.

web_set_sockets_option("PRINT_SSL_INFO","1");This option will detail the version and certificate used in the SSL configuration.

web_set_sockets_option("PROXY_INITIAL_BASIC_AUTH","0");This option disables the initial Basic authentication

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.

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