I am trying to run TestNG classes from command prompt. For that I am using ant. But while executing it is giving one error "The ' characters around the executable and arguments are not part of the command.". Below is the steps written in build.xml file :
<project default="test">
<path id="cp">
<pathelement location="lib/testng-6.8.6beta.jar"/>
<pathelement location="bin"/>
</path>
<taskdef name="testng" classpathref="cp"
classname="org.testng.TestNGAntTask" />
<path id="testng.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="test">
<testng classpathref="testng.classpath">
<classpath location="bin"/>
<classfileset dir="bin/com/selenium/excel/test_cases" includes="**/*.class"/>
</testng>
</target>
</project>
C:\Users\paresh\Google Drive\Android\Selenium_Assignment\Selenium_Using_Excel>ant -v
Apache Ant(TM) version 1.9.1 compiled on May 15 2013
Trying the default build file: build.xml
Buildfile: C:\Users\paresh\Google Drive\Android\Selenium_Assignment\Selenium_Usi
ng_Excel\build.xml
Detected Java version: 1.7 in: C:\Program Files (x86)\Java\jdk1.7.0\jre
Detected OS: Windows NT (unknown)
parsing buildfile C:\Users\paresh\Google Drive\Android\Selenium_Assignment\Selen
ium_Using_Excel\build.xml with URI = file:/C:/Users/paresh/Google%20Drive/Androi
d/Selenium_Assignment/Selenium_Using_Excel/build.xml
Project base dir set to: C:\Users\paresh\Google Drive\Android\Selenium_Assignmen
t\Selenium_Using_Excel
parsing buildfile jar:file:/C:/Users/paresh/Downloads/Compressed/apache-ant-1.9.
1-bin/apache-ant-1.9.1/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = j
ar:file:/C:/Users/paresh/Downloads/Compressed/apache-ant-1.9.1-bin/apache-ant-1.
9.1/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Build sequence for target(s) `test' is [test]
Complete build sequence is [test, ]
test:
[testng] Executing 'C:\Program Files (x86)\Java\jdk1.7.0\jre\bin\java.exe' wi
th arguments:
[testng] '-ea'
[testng] '-classpath'
[testng] 'C:\Users\paresh\Google Drive\Android\Selenium_Assignment\Selenium_U
sing_Excel\lib\jxl.jar;C:\Users\paresh\Google Drive\Android\Selenium_Assignment\
Selenium_Using_Excel\lib\selenium-java-2.35.0.jar;C:\Users\paresh\Google Drive\A
ndroid\Selenium_Assignment\Selenium_Using_Excel\lib\testng-6.8.6beta.jar;C:\User
s\paresh\Google Drive\Android\Selenium_Assignment\Selenium_Using_Excel\bin'
[testng] 'org.testng.TestNG'
[testng] '@C:\Users\paresh\AppData\Local\Temp\testng8174402001594921901'
[testng]
[testng] The ' characters around the executable and arguments are
[testng] not part of the command.
[testng] [TestNG] Running:
[testng] Ant suite
[testng]
[testng]
[testng] ===============================================
[testng] Ant suite
[testng] Total tests run: 3, Failures: 0, Skips: 3
[testng] Configuration Failures: 1, Skips: 4
[testng] ===============================================
[testng]
[testng] The tests failed.
BUILD SUCCESSFUL
Total time: 2 seconds
Please suggest.
Thanks.