On Tue, Jan 12, 2010 at 4:27 AM, Klaus Ackermann <ackerm...@gmx.at> wrote:

> Does anyone know a way how to execute a testng.xml suite file with buildr ?
> When i switch my tests to testng buildr tests every single class in
> alphabetic order. I want to specify the order and with testng this can
> normally be done by using the xml configuration file.
>

Using a testng.xml file is not currently supported.  If you want to
contribute support for it, it would be welcome.

In the mean time, you could invoke TestNG directly by doing something like,

  test.using :testng
  test.exclude '*'  # Prevent normal task from executing
  task(:testng) do
    Java.java "org.testng.TestNG", "testng.xml",
     :classpath => [ test.compile.dependencies, test.compile.target,
                     test.compile.target, resources.sources ],
     :java_args => ["-Xmx1024m"]
  end
  task :test => :testng

This is untested;  I'm guessing you'll have to tweak a few more things but
should get you going in the right direction.

alex

Reply via email to