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.
Issue to find userdata.properties file for Ant
Hi,
I think i have found an issue in this very good software.
I'm trying to execute a test suite with ant.
It works fine when i execute all my test manualy.
For example: ant -f ../mydemo.xml test1 test2 test3
But when i would like to execute all my test with the command: ant -f ../mydemo.xml sahitests
I have this error message:
Ant try to find the sahi userdata.properties file in C:\sahi\bin\config\userdata.properties but the file is in C:\sahi\userdata\config\userdata.properties.
If i copy/paste the userdata.properties file in a config folder in C:\sahi\bin\, it works fine.
I hope it will help you to fix it
I think i have found an issue in this very good software.
I'm trying to execute a test suite with ant.
It works fine when i execute all my test manualy.
For example: ant -f ../mydemo.xml test1 test2 test3
But when i would like to execute all my test with the command: ant -f ../mydemo.xml sahitests
I have this error message:
C:\ANT_HOME\bin>ant -f ../../sahi/1.xml sahitests
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li
b\tools.jar
Buildfile: C:\sahi\1.xml
sahitests:
start-web:
[java] Sahi properties file = C:\sahi\config\sahi.properties
[java] Sahi user properties file = C:\sahi\bin\config\userdata.properties
[java] java.io.FileNotFoundException: C:\sahi\bin\config\userdata.properties (Le chemin d'accÞs spÚcifiÚ est introuvable)
[java] at java.io.FileInputStream.open(Native Method)
[java] at java.io.FileInputStream.<init>(Unknown Source)
[java] at java.io.FileInputStream.<init>(Unknown Source)
[java] at net.sf.sahi.config.Configuration.loadProperties(Configuration.java:115)
[java] at net.sf.sahi.config.Configuration.init(Configuration.java:95)
[java] at net.sf.sahi.config.Configuration.init(Configuration.java:74)
[java] at net.sf.sahi.WebServer.<clinit>(WebServer.java:34)
[java] >>>> Sahi demo web server started. Listening on port:10000
Ant try to find the sahi userdata.properties file in C:\sahi\bin\config\userdata.properties but the file is in C:\sahi\userdata\config\userdata.properties.
If i copy/paste the userdata.properties file in a config folder in C:\sahi\bin\, it works fine.
C:\ANT_HOME\bin>ant -f ../../sahi/1.xml sahitests
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li
b\tools.jar
Buildfile: C:\sahi\1.xml
sahitests:
start-web:
[java] Sahi properties file = C:\sahi\config\sahi.properties
[java] Sahi user properties file = C:\sahi\bin\config\userdata.properties
[java] Copying profile to C:\sahi\bin\browser\ff\profiles\sahi0
[java] Copying profile to C:\sahi\bin\browser\ff\profiles\sahi1
[java] Copying profile to C:\sahi\bin\browser\ff\profiles\sahi2
[java] Copying profile to C:\sahi\bin\browser\ff\profiles\sahi3
[java] Copying profile to C:\sahi\bin\browser\ff\profiles\sahi4
[java] Copying profile to C:\sahi\bin\browser\ff\profiles\sahi5
[java] Copying profile to C:\sahi\bin\browser\ff\profiles\sahi6
[java] Copying profile to C:\sahi\bin\browser\ff\profiles\sahi7
[java] Copying profile to C:\sahi\bin\browser\ff\profiles\sahi8
[java] Copying profile to C:\sahi\bin\browser\ff\profiles\sahi9
[java] >>>> Sahi demo web server started. Listening on port:10000
I hope it will help you to fix it
Comments
I also have to face this error message while executing all files with that command..
I hope next time we will get more from you...:)
Thanks for the post. A couple of points:
1) You do not need to use start-web unless you are using Sahi's experimental (and highly primitive) webserver. If you are testing your own application you don't need it.
2) The correct way to start the web server, is to start it from sahi/bin directory. In ant you can do this by passing a "dir" to the java task.
Example:
Regards,
Narayan