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.

Batch Files

Keshava Reddy KKeshava Reddy K Members
edited November -1 in Sahi - Open Source
Please Let me know, how to run batch files from cmd prompt.
Please give me step by step procedure

Comments

  • Hi Keshava,

    Could you please elobarate regarding your issue?

    Also, have a look at : http://sahi.co.in/w/Running+multiple+tests+in+batch+mode

    Regards
    Sumitra
  • Hi Sumitra,

    Below is my code in cmd

    c:\sahipro\userdata\bin> testrunner.bat scripts\Keshav\BHFL\Administration\Depar
    ment.sah myapplicationurl ie

    After executing above, am getting below error
    Shutting down ...
    Connection refused: connect
  • Hi Keshava,

    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.

    It should be:

    testrunner.bat Keshav\BHFL\Administration\Deparment.sah http://myapplicationurl/ ie

    Check if this solves your issue.

    Regards
    Sumitra
  • Where can i see the logs info for this Batch
  • Hi keshava,

    Start Sahi. Click on "logs" on the Dashboard to view the logs.

    Regards
    sumitra
  • Tnq Sumitra,

    am going well. Please help me for below
    Here am able to see 1 browser for 1 sah file and all are running simultaneously but i want to execute one ofter other in a single browser in batch mode
  • Hi Keshava,

    You can run a suite file from a single browser by changing the Threads in the ant target.
    <target name="runbrowsertests">
    
            <sahi suite="../userdata/scripts/demo/demo.suite" 
                browserType="firefox" 
                baseurl="http://sahi.co.in/demo/" 
                sahihost="localhost" 
                sahiport="9999" 
                failureproperty="sahi.failed" 
                haltonfailure="false" 
                threads="1"
                >
                <report type="html" />
            </sahi>
        </target>
    

    If it still doesn't work, edit browser_types.xml (Click "configure" link on dashboard). Change <capacity> to 1 for the browser that you want to run the tests with. Restart Sahi.

    Regards
    Sumitra
Sign In or Register to comment.