There might be the situations you come across where you have to download the PDF, excels, any report while scripting and need to measure its donwload time and size of the downloaded file. Normally, vugen do not record any requests for downloading or opening an PDF, excel or any report in file formats. The only way I hae come across is to use web_get_int_porperty().This function can be used after the request where you perform the action for downloading or opening an file.The proper place can be identified by entering the comments in the script while recording. We can pass few constants as parameter to this function which will give the download time in milliseconds and file size in bytes.
i = web_get_int_property(HTTP_INFO_DOWNLOAD_TIME); //returns time in milliseconds to download file
j = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE); //returns size in Bytes for downloaded file
To record download time and size for each iteration per vuserwe can implement file writing code in our scripts to log the same in custom way.
lr_output_message("The download time of the PDF was: %d milliseconds",i);
lr_output_message("The download size of the PDF file was: %d Bytes",j);
web_save_timestamp_param("pEndTime",LAST);
lr_think_time(x);
if ((fp = fopen(filename, "a+")) == NULL) {
lr_error_message("Unable to create %s", filename);
return -1;
}
else
{
fprintf( fp,
"%s,%s,",i,j,);
}
fclose( fp );
Labels
- college view (3)
- Inintiatives (1)
- Java (4)
- Performance Testing (9)
- Poetry (6)
- Scripting (5)
- Social (2)
- Tips (4)
Saturday, October 19, 2013
Get Downloaded File Size And Time In VUGEN
Labels:
Performance Testing
Thursday, October 10, 2013
Enabling Run As Different User Option In Windows 2007
Recently I come up with issue in logggin with different user over different programs in windows. I was logged using my credentials, however I wanted to start program like IE using different user. To login with different users, windows has provided the Secondary Logon Service under Services and applications. Hence, this secondary service should be started on your computer to login with different user.
To start Secondary Logon service follow these steps:
1. start-->Run->services.msc and hit enter
another way is click on Start-->Click on My Computer-->Click on Manage-->Expand Services And Applications and then Click on Services 2. Click on any service and type secondary , you will see Secondary logon Service. 3. Check the status column if the status is blank or stopped then right click and click on start the service. 4. Select properties option on right click and select "Automatic" in Startup option. If it is not enabled , select manual. Run as Different user:
1. Go to c:\program files\Internet Explorer\iexplore.exe
2. Press/hold shift key and right click on iexplore.exe
3. You will find another option will be added to your list(third option) is added as "Run as different user"
4. Enter required credentials you wish to login.
another way is click on Start-->Click on My Computer-->Click on Manage-->Expand Services And Applications and then Click on Services 2. Click on any service and type secondary , you will see Secondary logon Service. 3. Check the status column if the status is blank or stopped then right click and click on start the service. 4. Select properties option on right click and select "Automatic" in Startup option. If it is not enabled , select manual. Run as Different user:
1. Go to c:\program files\Internet Explorer\iexplore.exe
2. Press/hold shift key and right click on iexplore.exe
3. You will find another option will be added to your list(third option) is added as "Run as different user"
4. Enter required credentials you wish to login.
Labels:
Performance Testing,
Tips
Tuesday, October 8, 2013
The One Change I Would Like
The One Change I Would Like
The one change I would like
without strike and rally's on bike
Bring the governance back,
instead a government alike.
The one change I would like
without producing echo on mike
Bring our economy back
and promoise us, it will again spike.
The one change I would like
timely investigations of crimes
want justice to the victims,natives and their wives
and there would be no condition of psych.
The one change I would like
without laws,ammendments and food securities
Don't want to be hungry
and mourn our appetite, due to price hike.
The one change I would like
without demands of my rights
stop barricades , enlight us with free education
and stop this routine of shrike
            -Sachin Dhanure.
The one change I would like
without strike and rally's on bike
Bring the governance back,
instead a government alike.
The one change I would like
without producing echo on mike
Bring our economy back
and promoise us, it will again spike.
The one change I would like
timely investigations of crimes
want justice to the victims,natives and their wives
and there would be no condition of psych.
The one change I would like
without laws,ammendments and food securities
Don't want to be hungry
and mourn our appetite, due to price hike.
The one change I would like
without demands of my rights
stop barricades , enlight us with free education
and stop this routine of shrike
            -Sachin Dhanure.
Labels:
Poetry
Subscribe to:
Comments (Atom)