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 get the value of the testsuite parameter specified in ant task
My requirement is this :
1. I need to upload files using my web app
2. The files are stored in a directory relative to the directory containing testsuite file. <sahi testsuite="...." ... />
3. To construct the path to the files I need the location of the testsuite parameter.
_scriptPath() / _scriptFile() are not really useful in my case since the location of the scripts may change but not the files to be uploaded and hence do not want to depend on these functions.
How do I do this ?
thanks,
Hari
1. I need to upload files using my web app
2. The files are stored in a directory relative to the directory containing testsuite file. <sahi testsuite="...." ... />
3. To construct the path to the files I need the location of the testsuite parameter.
_scriptPath() / _scriptFile() are not really useful in my case since the location of the scripts may change but not the files to be uploaded and hence do not want to depend on these functions.
How do I do this ?
thanks,
Hari
Tagged:
Comments
Also, to read from a property file and not hard code any paths, I would need to construct the path to it which is again an issue.
We need a function to return the location of the testsuite which we can expect to be a reasonable stable reference point.
I think you should use _scriptPath as the reference and build the file path before upload. Views?
Hence keeping it relative to one script is not really a solution for me.
E.g. My only constant in this test suite is my sahi-dir in which I would place my.test.suite.
If the number of test cases becomes large I may choose to have sub-dirs for specific areas. In this case I cannot be constructing the path to the properties file in each of my scripts.
This is cumbersome/maintenance nightmare.
Atleast this is how I would do it.
Having a function return the location of the testsuite parameter would work for me.
Some one else can make their own choice based on their needs.