18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Can't find the Execution time in logs ,,any other way to find it
I cannot find the execution time for the particular testcase in text logs ,,can you please tell me where to find it
Comments
I don't know any other easy way of doing this (unless you use some performance test tools)
var $start = new Date();
// Your steps
var $period = new Date() - $start;
_log("Time taken for script is: " + $period)
Can this be done in a batch mode as well?
echo [%date% %time%] starting
:: batch file code
echo [%date% %time%] ending
Thanks for your reply.
I used your input in my batch file but the first and last lines (that I added) fails with the below error message from the log file. Everything else in the batch passes.
=======
Starting script
JSERROR
Script did not start within 130 seconds. at Feb 26, 2010 12:57:19 PM
Stopping script
=========
Here is a sample code from one of my simple batch file. Basically, there are 2 scripts in this batch file.
=======
echo [%date% %time%] starting
FB_3515.sah http://www.xxxx.net/v4cgi/login.pl
FB_2733.sah http://www.xxxx.net/v4cgi/login.pl
echo [%date% %time%] ending
If you are running suite in IE, then add those lines in ie_batch.bat located at <sahi-base-directory>/userdata/bin directory.
for firefox, add those lines in ff_batch.bat located at same location.
so, ff_batch.bat will look like this,
echo [%date% %time%] starting
SET SAHI_HOME=..\..
SET SAHI_USERDATA_DIR=..
java -cp %SAHI_HOME%\lib\ant-sahi.jar net.sf.sahi.test.TestRunner <your file path> "C:\Program Files\Mozilla Firefox\firefox.exe" <your testing url> default localhost 9999 3 firefox.exe "-profile %SAHI_USERDATA_DIR%/browser/ff/profiles/sahi$threadNo -no-remote"
echo [%date% %time%] ending
when you run ff_batch.bat, then it prints the starting time and ending time in the console.
Thanks,
Venky.
Is there a way to print this to the log file instead?