18 January 2026:


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.

Specify a results & images directory at runtime when executing a suite

maheshgaikwadmaheshgaikwad Members
edited November -1 in Sahi - Open Source
Specify a results & images directory at runtime when executing a suite

Is there a way to specify a results & images directory at runtime when executing a suite? This will help schedule unattended execution.

Use case as follows -
1. I want to execute suite across Windows Chrome browser for v1.1 of the software for unattended - scheduled execution.
2. During the automation is being executed, I want the test results (\userdata\logs\playback) & the images dir (userdata\logs\playback\images) get saved in a non-default dir
3. I should be able to setup a scheduled job as follows –
testrunner.bat appsuite1.suite url chrome -results d:\somelocation\Win_chrome_v1.1_dateStamp
4. When the automation runs, results should be dumped (along with the images dir) into the dir specified in command prompt, instead of the default dir.

I am aware the results dir can be changed in properties file, but coulnd't find a way to do this at runtime.


OS Name - Windows 7
Browser Name - Chrome (latest version)
Sahi Build - Sahi Pro 4.3.2 (Build: 2012-09-26)

Comments

  • Hi,
    I do follow sahi forums regularly and looking at your requirment and from the sahi documentation , we have to pass the options to the testrunner.bat file and execute from command line

    Please try below 2 steps :

    1. SET LOGS_INFO = hmtl
    SET HTML_LOGS=C:/Results Folder

    -logsInfo %LOGS_INFO% -htmlLogDir %HTML_LOGS%

    2. Use the standard command to run suite
    testrunner.bat appsuite1.suite url chrome

    This fix will help out with minimal settings on batch file and i am not sure if we can do or pass the options directly from command prompt as you said :

    testrunner.bat appsuite1.suite url chrome -results d:\somelocation\Win_chrome_v1.1_dateStamp

    I do suspect , not a single post talks about passing parameters to the suite like:

    testrunner.bat appsuite1.suite url chrome etc

    Thanks,
  • testrunner.bat appsuite1.suite url chrome param1 param2 param3 etc
  • Hi

    you could also have a look at the .xml files in your sahi installation



    you can define a suite and run it with ANT and pass a logdir as argument

    Regards
    Wormi
  • Hi global,
    Thanks for the reply.
    Ant is not configured and prefer to run the suite from command prompt for which above settings can be done in .bat file for specifying log files.

    Could you please confirm any alternative of specifying the logs or results directory which can be specified while running from command promt.

    eg :testrunner.bat appsuite1.suite url chrome -results d:\somelocation
Sign In or Register to comment.