[testng-users] Unalbe to use @dataProvider while running a test suite from ant

15 views
Skip to first unread message

Naresh

unread,
Dec 29, 2009, 1:49:47 AM12/29/09
to testng...@googlegroups.com

Hi,

I have a TestNG class that uses @dataProvider annotation. I am trying to run
the test case specified in a test suite with ant.

Please find ant script as below.

<taskdef name="testng" classname="com.beust.testng.TestNGAntTask"
classpathref="project.class.path" />

<target name="run-tests" depends="compile" >
<testng classpathref="project.class.path" annotations="JDK"
dataproviderthreadcount="1" outputDir="../test-reports">
<xmlfileset dir="../test/Resources" includes="test-suite.xml" />

</testng>


When I run the ant script I am getting exception in invoking data provider
as below.

null

org.testng.internal.MethodHelper.invokeDataProvider(MethodHelper.java:698)
at org.testng.internal.Parameters.handleParameters(Parameters.java:369)
at org.testng.internal.Invoker.handleParameters(Invoker.java:1121)
at org.testng.internal.Invoker.createParameters(Invoker.java:872)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:955)


Could you please let me know the solution for this problem. Thanks in
advance.
--
View this message in context: http://old.nabble.com/Unalbe-to-use-%40dataProvider-while-running-a-test-suite-from-ant-tp26951674p26951674.html
Sent from the testng-users mailing list archive at Nabble.com.

Cédric Beust ♔

unread,
Dec 29, 2009, 2:27:13 AM12/29/09
to testng...@googlegroups.com
Can you post your Java source?

-- 
Cedric



--

You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.





--
Cédric


Reply all
Reply to author
Forward
0 new messages