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.
How to Run Sahi on remote machine ?
Hi,
I have a SAHI scripts (.sah) working fine in my local machine.
Can anyone guide me how can i run this (.sah) file in different machine remotely , where can can i see the results
Thanks
Tarun
I have a SAHI scripts (.sah) working fine in my local machine.
Can anyone guide me how can i run this (.sah) file in different machine remotely , where can can i see the results
Thanks
Tarun
This discussion has been closed.
Comments
To run .sah file on different machine remotely you will have to mention the machine name(remote machine name) in testrunner.bat by navigating to
<sahi-home>/userdata/bin/testrunner.bat
Instead of this:
java -cp %SAHI_HOME%\lib\ant-sahi.jar net.sf.sahi.test.TestRunner -test %SCRIPTS_PATH%/%1 -browserType %3 -logsInfo "%LOGS_INFO%" -baseURL "%START_URL%" -host localhost -port 9999 -threads %THREADS% -useSingleSession %SINGLE_SESSION% -tags %4
Use:
java -cp %SAHI_HOME%\lib\ant-sahi.jar net.sf.sahi.test.TestRunner -test %SCRIPTS_PATH%/%1 -browserType %3 -logsInfo "%LOGS_INFO%" -baseURL "%START_URL%" -host remotemachinename -port 9999 -threads %THREADS% -useSingleSession %SINGLE_SESSION% -tags %4
Restart Sahi.
The logs will be available on the remote machine.(Click logs on the Dashboard)
Let me know if you face any problem.
Regards
Sumitra
I had made the mentioned changes in testrunner.bat , but if i execute on the controller , it is executing on my local machine.
Can u please help on how should i execute the scripts and where to verify the execution results
But this the log its generating on cmd and it just opened the browser on the remote machine ,no action performed on the application
C:\Users\administrator.MAV\sahi\userdata\bin>testrunner.bat scripts\stnweblogin.
sah https://stnweb.cas.org/ ie
test=scripts/scripts\stnweblogin.sah
browserType=ie
baseURL=https://stnweb.cas.org/
host=192.168.6.104
port=9999
threads=5
useSingleSession=false
suiteName = scripts/scripts\stnweblogin.sah
base = https://stnweb.cas.org/
sahiHost = 192.168.6.104
port = 9999
threads = 5
browserType = ie
this.isSingleSession == false
Added shutdown hook.
http://192.168.6.104:9999/_s_/dyn/Suite_start?suite=scripts%2Fscripts%5Cstnweblo
gin.sah&base=https%3A%2F%2Fstnweb.cas.org%2F&threads=5&sahisid=sahi_2108d16f029d
e041b00b6570353feaabd372&browserType=ie&html=
Kindly check if the certificates are been accepted on the remote machine for IE browser.
Also,check if the browser is been set to port 9999.
Also, check if you are facing the same issue on other browsers?
Regards
Sumitra
When i used testrunner.bat scripts\stnweblogin.sah https://stnweb.cas.org/ ie on cmd
1. IE opened
2. Navigate to required url
But not performing any actions on object
At end shows
FAILURE
Shutting down ....
I have tried with firefox also , but same result
Can your please tell me where can i find logs to see what exactly is happing and the test results
I could not able to find info on logs
Can you please check the path to the script?
If you see testrunner.bat file, SET SCRIPTS_PATH=scripts; this already specifies that the scripts are already saved in scripts folder.
You have given as: testrunner.bat scripts\stnweblogin.sah https://stnweb.cas.org/ ie so Sahi will try to find stnweblogin.sah in userdata/scripts/scripts/stnweblogin.sah which is wrong.
It should be: testrunner.bat stnweblogin.sah https://stnweb.cas.org/ ie
To view the logs click on Logs link on the Remote Machine's Dashboard.
Let me know if you are still facing problem.
Regards
Sumitra
Thanks a lot , its really helpful