Wednesday, 17 October 2012

ANT


How to run tests using ANT




                  Go to http://ant.apache.org/bindownload.cgi

    Click on zip file below the Current Release of Ant title.

      Unzip to a folder the downloaded zip file(ant)

         Go to My Computer-Properties(Right click My Computer)

        Now go to Advanced system settings

        Click on Environment variables then

Step 1



•        Click on New below system variables(creating new environment variables)
•        Enter "ANT_HOME" in variable name field
•        Enter the path(the extracted folder of ant) of ant in variable value field

Eg:  "C:\\ant\apache-ant-1.8.4"(path)




Step 2



•        Scroll down in system variable and find path in variable column
•        Select path and click on edit
•        Now go to variable value, go to end and type ";"(semicolon)
•        Paste the path of the ant("C:\\ant\apache-ant-1.8.4") and add "\bin"

Eg:


 variable value= C:\Program Files\PC Connectivity Solution\;C:\Program Files\Java\jdk1.6.0_26\bin;C:\apache-ant-1.8.4-bin\apache-ant-1.8.4\bin;C:\Program Files\QuickTime\QTSystem\;C:\\ant\apache-ant-1.8.4\bin

•        Now click ok.


This completes configuring ant in your system.



To verify whether ant is configured



        Go to cmd prompt and type ant.



Note:



If u get any error message "Unable to locate tools.jar" then

•        Go to program files where java is installed
•        Now  go to jdk-lib folder
•        Copy tools.jar
•        Paste it in jre-lib folder
•        Now run ant in cmd prompt.


Note:



Next if u get error message" Build.xml file doesn't exist" then

->     Place your build.xml file directly in your project(not in source)




No comments:

Post a Comment