0 Replies - 1444 Views - Last Post: 03 December 2007 - 01:34 AM

#1 harshakirans   User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 124
  • Joined: 26-April 06

List URL's in each Action of LR script

Posted 03 December 2007 - 01:34 AM

Description: The load runner projects are stored as folders. Input the folder path as 1st argument.Lists the URL's in each action recorded by the loadrunner tool(LR script).
#!/usr/bin/perl
 @t=`dir $ARGV[0]*.c`;
 $n=$#t-2-4;
 printf"there are %d files",$n;
 @param;
  for($k=5,$i=0;$k<=9;$k++,$i++)
  {
   print "n$t[$k]";
  if ($t[$k] =~ m/.{38}(.*.)c$/)
  {
     $param[$i]=$1;
  }
 }

foreach $line(@param)
{
$line=reverse($line);
chop($line);
$line=reverse($line);
$db="$ARGV[0]\"."$line"."c";
$db =~ s/\/\\/;
#print $db;
#$db="c:\exer1\Action1.c";
open (DB,"$db") || die "Can't Open file: $!n";
print "nURL statements in action $linen";
while ()
{
if($_ =~ m/URL=/)
{
print "n$_";
}
}
close DB;
}


Is This A Good Question/Topic? 0
  • +

Page 1 of 1