ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins. Read more for important details.
ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins.Read more for important details.
Absent Member.. Absent Member..
Absent Member..
532 views

Windows Explorer or Command Prompt

I have a requirement to generate a vugen script checking a xml file present in a UNC path and then open the xml file to check for a time stamp.What is the easiest way to do it.

 

I tried recording both cmd and windows explorer using windows socket but it didnt work.

 

Any suggestion will be appreciated.

0 Likes
4 Replies
Absent Member.
Absent Member.

When you mention it didnt work, do you mean no events where recorded? If that is the case this may be all client side activity so no events will be generated. You could use a GUI protocol like RDP to perfom this.

 

Regards,

Mario M.

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.

LoadRunner:
http://h30499.www3.hp.com/t5/LoadRunner-Support-Customer/bd-p/loadrunner-support-customer-forum

Performance Center:
http://h30499.www3.hp.com/t5/Performance-Center-Support/bd-p/performance-center-support-customer

How to:
http://www.youtube.com/watch?v=4ChlysWupWM

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
0 Likes
Absent Member.. Absent Member..
Absent Member..

We really dont want to do the RDP protocol as this is a critical server and security wouldnt allow login to this server frequently.

 

Thanks

0 Likes
Absent Member.
Absent Member.

You may choose another way to do this. Write some C code to get the useful info of the file from the UNC path, and use loadrunner to load the dll and get the result from your dll.

 

Please refer to the API lr_load_dll.

0 Likes
Absent Member.. Absent Member..
Absent Member..

Here's a quick example of something I've used in the past.

Action()
{
long downloaded;
char *buffer;

if ((downloaded=fopen("\\\\shared_drive\\test\\test.xml","r")) == NULL )
{
lr_error_message("Cannot open \\shared_drive\test\test.xml");
return 0;
}
else
{
buffer=(char*)malloc(500000);
while (!feof(downloaded))
{
fread(buffer, sizeof(char), 500000, downloaded);
}
lr_error_message("%s",buffer);
}

lr_save_string(buffer, "xml_page");
lr_error_message("xml page content %s",lr_eval_string("{xml_page}"));

return 0;
}
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.