harrah / xsbt

*NOTE* sbt has moved to the sbt organization!
https://github.com/sbt/sbt
Other
53 stars 26 forks source link

TestNG in sbt #107

Closed harrah closed 11 years ago

harrah commented 11 years ago

We tried running TestNG in adapting the jUnit Testframework. This works fine, but there is no reporting out of the box. Another issue is, that it just counts the test methods tagged as Test and not all the tests created e.g. by a DataProvider. Failed tests in dataprovider driven Tests are not reported as failed in the summary. So we change the strategy and started to run TestNG from by a runTask:

lazy val heinz = runTask(Some("org.testng.TestNG"), testClasspath, "testngSBT.xml").dependsOn(test) describedAs "Runs testNG."

This works quite nice, but the problem is, that sbt hangs after the run. This is true on Windows and Linux machines. One idea now is to kill the TestNG process, but val process = Process("org.testng.TestNG") returns a ProcessBuilder, which doesn't have a destroy() or exit().

Any ideas or workarounds?

harrah commented 11 years ago

IMPORTANT This project has moved to https://github.com/sbt/sbt. This issue still exists to avoid dead links, but GitHub limitations prevent the original issue from being correctly preserved here. Please see sbt/sbt#107 for the full issue and to comment.