Hi,
I am trying to run Testng programatically, I have an AllTests.java in which I create the testng.xml dynamically and pass it to TestNG to run. When I run AllTests.java directory, the tests run fine but fails when I try to run through Ant.
public class AllTests {public static void main(String[] args) throws Exception { TestNG myTestNG=new TestNG();
List<XmlSuite> testSuites=new ArrayList<XmlSuite>();
testSuites.add(createXmlSuite()); myTestNG.setXmlSuites(testSuites);
myTestNG.setOutputDirectory("c://temp");
myTestNG.run(); }
java.lang.NullPointerException at org.testng.internal.PoolService.isFinished(PoolService.java:148) at org.testng.internal.PoolService.submitTasksAndWait(PoolService.java:104) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1143) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
Any ideas would be great! Thanks in advance
Regards, Jeganathan.
--
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.
--
Hi Cédric,
In this particular case, I'm not launching it via testng.xml, I'm right clicking -> run as TestNG Test
name: SingleSuite
tests:
- name: Test1
classes:
- name: test.jar.Class1
- name: test.jar.Class2
On Mon, Jun 13, 2011 at 2:25 PM, Felipe Knorr Kuhn <fkn...@gmail.com> wrote: