Thursday, August 30, 2012

How to set authentication object for web services

Problem Statement: In certain cases where the application under test (AUT) is a smart client application and the application uses web-services for it's operations. During recording of the application VUGen doesn't record the authentication object and while replaying the script you get the below error for the web services request(s):


An Authentication object was not found in the SecurityContext
The reason for the SOAP fault is: "An Authentication object was not found in the SecurityContext"

Solution: As mentioned above, the application being a smart client 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.

Hope this helps in solving your issue.

Wednesday, August 29, 2012

How to set CITRIX client file security for Load Generator

Problem Statement: During scenario execution, there might be a step where the citrix session will be interacting with local drive for some operations like select a local file to upload. In this case the citrix session on the load generator will be stuck up due to CITRIX client file security dialog. 

Solution: While doing any operations to access local system resources CITRIX gives a pop-up to user to whether to allow the access or not and settings for it (as shown below in the screenshot):


mostly in our session we choose "Full Access / Read Access" and "Never ask me again". So while we replay our scripts on our local machines it runs fine; but this can cause an issue while running a scenario through a load injector (or load generator).

If you are running the scenario through local injector (localhost) then you can manually do the setting while performing the same operation on the application.

If you are running the scenario on a remote injector then you need to login to that injector machine (as admin) and again perform the same operation and provide access to the citrix client (assuming that the injector is running magentproc under your id).

In case of performance center this thing is a bit tricky; in this case what you need to do is to login to the injector machine (as admin) and open the following location:

"(root directory)\Documents and Settings\(username)\Application Data\ICAClient" and open the webica.ini file in a notepad.

by default there will not be any entries in this file, you need to make the following entry after the "[Access]" line:
"GlobalSecurityAccess=405" (this security code is for "Full Access and Never ask me again setting")

Now your webica.ini file should look like this 


please note that you need to make this change for "IUSR_METRO" and "default user" under "Documents and Settings"
Then restart your performance center agent service and run your test; this should enable your transaction to pass on the remote 

Tuesday, August 28, 2012

View Citrix Vuser in LoadGenerator

Problem Statement: During scenario execution, you might be wondering is there a way where I can see why a certain VUser (Citrix protocol) is failing and why; which needs a kind of debug run to find a solution / fix to your code.

Solution: Actually there is a simple solution to the above mentioned problem. You can enable the citrix vuser view in controller command line (or in Performance Center) to view what the user is doing in replay window.

To do so all you need to do is to go to script group details and provide command line as shown in the screenshot below:


If you are using Performance Center, other than normal LR controller then you can use the command line feature in the design mode of the script as shown in the below screenshot:


One done start your scenario and you can see your virtual user replay in the load generator machine.
Please note that if you are running the Injector from PC then you need to stop the performance center agent service and start "magentproc.exe" manually under your user account so that you can view it properly. Otherwise this will be running under the PC user session and you will not be able to view the replay and waiting this thing to happen in your session.

Hope this small article helps you in resolving your issues.