ANT - Compile is succes but getting error in run. | Selenium Forum
M
Posted on 02/01/2017
Hi,
i am trying to execute to TC via ANT>

Compile is done and build is success but while performing "run", i am getting error as attached.
I have provided jar file path in "build.xml" and nothing else is changed in the xml.

M
Replied on 02/01/2017

Path where "Jars" are stored in your local machine is not configured correctly.
it should point out the exact path where "Jars" are available on your machine

[attachment=0:1lll4hyx]Testng.png[/attachment:1lll4hyx]

Responsive image

M
Replied on 02/01/2017

But the path mentioned is correct. i have placed jars in the same path..
Please refer this attachment


M
Replied on 02/01/2017

Can you once verify whether "ANT" is succesfully installed or not in "Environment variables"?


M
Replied on 03/01/2017

Yes.. I see its successfully installed.
Refer attach document.


M
Replied on 03/01/2017

Please crosscheck whether all Jar files are included in project or not


M
Replied on 03/01/2017

I have compared with the videos shown.. it contains all jar files.

Jars files copied from "download code" only.


M
Replied on 03/01/2017

Can you confirm if below "Run" is correct from build.xml?
or do i need to include "include_name = project.class" name as well ?
<!-- run -->
<target name="run" depends="compile">
<testng classpath="${test.classpath}:${test.dest}" suitename="testing_testng">
<xmlfileset dir="${ws.home}" includes="testng.xml"/>
</testng>
<!--
<testng classpath="${test.classpath}:${test.dest}" groups="fast">
<classfileset dir="${test.dest}" includes="example1/*.class"/>
</testng>
-->
</target>


M
Replied on 03/01/2017

if both build.xml & testng.xml are not in same path, please make sure that complete path of testng.xml is entered in build.xml file
[attachment=0:2pc8zfjb]testngxml.png[/attachment:2pc8zfjb]

Responsive image

M
Replied on 04/01/2017

Both are in the same path...


M
Replied on 04/01/2017

@ashish come on skype at qtpselenium1 right now we will fix the error there.


M
Replied on 04/01/2017

joining.. 5 mins


M
Replied on 05/01/2017

what is your skype id?


M
Replied on 06/01/2017

My id is: ashish.govil19

Issue is fixed.. i replaced below under "run" target:

<xmlfileset dir="C:\Selenium\TestNG_xml"

Before it was:

<xmlfileset dir="${ws.home}" includes="testng.xml"/>


M
Replied on 08/01/2017

ok.