Gary, I can strongly recommend pulling Gradle trunk (using Bazaar, Git or even Subversion :-) and installing it yourself. TestNG support is integrated and "Just Works" (tm).
All I have to do is add a testCOmpile dependency on a TestNG jar and my
project builds and tests fine.
usePlugin ( 'java' )
dependencies {
addMavenRepo ( )
testCompile ( 'org.testng:testng:5.8:jd...@jar' )
}
On Thu, 2009-02-26 at 06:00 -0800, GaryMcWilliams wrote:
> Idiot!
>
> ok, remembering that doing a google search rather than just a forum search
> returns more results!
>
> So, Tom Eyckmans is working on all this, so it's not in the current release.
> Is there a short-term fix (hint: noob-proof details, if possible!) that I
> can use to get my testNG stuff running?
>
>
>
> GaryMcWilliams wrote:
> >
> > complete noob here trying to use gradle against a small project. Can get
> > it all working except the testng tests. I searched the forum here, got
> > some hits against testng, but nothing that give a poor noob any real help!
> > Anyone offer any hints on getting my testNG tests to run?
> >
> > - I note a reference to a plugin contributed for 0.5, but using
> > "usePlugin('testng')" does not get me anywhere.
> > - I also tried a useTestNG() that I came across somewhere (cannot find
> > reference now) but that fails also.
> >
> >
> > build.gradle:
> > usePlugin('java')
> >
> > type = 'jar'
> >
> > version = '1.0'
> > sourceCompatibility = 1.5
> > targetCompatibility = 1.5
> >
> > dependencies {
> > addMavenRepo()
> > addFlatDirResolver('lib', new File(rootDir, 'lib'))
> > compile ':log4j:1.2.12'
> > testCompile 'org.testng:testng:5.8:jdk15'
> > }
> >
> > running gradle test gives:
> > $ gradle test
> > :init
> > :resources
> > :compile
> > :testResources
> > :testCompile
> > :test
> > [ant:junit] Test play.CounterTest FAILED
> > [ant:junit] Test play.CounterUtilTest FAILED
> > [ant:junitreport] the file
> > d:\dev\jira-stuff\JiraPlay\build\test-results\TESTS-T
> > estSuites.xml is not a valid testsuite XML document
> >
> > Build failed with an exception.
> > Run with -s or -d option to get more details. Run with -f option to get
> > the full
> > (very verbose) stacktrace.
> >
> > Build file 'd:\dev\jira-stuff\JiraPlay\build.gradle'
> >
> > Execution failed for task :test.
> > Cause: There were failing tests. See the report at
> > d:\dev\jira-stuff\JiraPlay\bu
> > ild\reports\tests.
> >
> > BUILD FAILED
> >
> >
>
--
Russel.
====================================================
Dr Russel Winder Partner
Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road, f: +44 8700 516 084
London SW11 1EN, UK. m: +44 7770 465 077
signature.asc
Description: This is a digitally signed message part
