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.

How to run a test suite through ant in command prompt

smile1234smile1234 Members
edited November -1 in Sahi - Open Source
I am facing an issue as I have to run the SAHI scripts through Ant on command prompt.

C:\Program Files\sahi\ant -f automate.xml all
ant-sahi' is not recognized as an internal or external command,
perable program or batch file.

could u please help me for this.

Regards,
vani

Comments

  • Hi,

    Ensure you have Ant installed on your system and the path properly set.

    Regards,
    Pankaj.
  • Hi pankaj,

    After I installed Ant that problem is solved, but i am facing another problem ie

    Exception in tread "main' java.lang.NoClassDefFoundError: Files\sahi\lib;c:Program.

    I put my project.xml file in sahi folder and i set the class path in envvar is

    C:\Program Files\sahi\lib;C:\Program Files\Ant\lib;C:\Program Files\jdk1.6.0_03\lib;

    I have some doubts:

    1.where i have to put junit.jar and log4j.jar files in sahi.
    2.what is the log dir for junit

    <report type="junit" logdir="${basedir}/temp/junit"/>
    3.only junit.jar is required or we install total junit software.

    please help me for these issues.
  • From where can i get Ant installation set up.
  • Download it from
    http://ant.apache.org/
    and ensure that you have properly set the system variables: Path, ANT_HOME and JAVA_HOME
  • narayannarayan Administrators
    Hi Smile1234,

    Don't install sahi in a folder with a space.
    Install sahi in something like C:\Programs\ or C:\

    You do not need junit.jar or log4j.jar to run Sahi.

    The junit style logs will be in Sahi/temp/junit directory. You can access better reports at http://localhost:9999/logs


    -Narayan
Sign In or Register to comment.