Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

Getting scriptname dynamically during runtime for logging purpose

$
0
0

Hello

   We want to write custom logs on Response time and error messages during runtime to a shared drive . We are currently manually harcoding scriptname as a filename (TTT_Schedule_Cancel__TCWEB_Error_) in Evaluate Javascript code step as below .

How can i Capture Scriptname dynamically .. is there a TC API to get just like Utils.getEnv("COMPUTERNAME")

Also where can i find help on Utils.getEnv and what parameters it can take

Here TTT_Schedule_Cancel__TCWEB is the scriptname

var filename1 = "\\\\172.18.229.50\\LOGS\\\TTT_Schedule_Cancel__TCWEB_Error_";
var filename2 = "\\\\172.18.229.50\\LOGS\\\TTT_Schedule_Cancel__TCWEB_";
filename1=filename1+hostIP+"_"+datestring+".txt";
filename2=filename2+hostIP+"_"+datestring+".txt";

Thanks

Naveen


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>