How do I set the working directory for TestNG in a multi-project gradle build?

360 views
Skip to first unread message

Robert Krüger

unread,
Nov 15, 2013, 4:27:43 AM11/15/13
to testng...@googlegroups.com
Hi,

I know this is really more a gradle question but since nobody in the
gradle forum or stackoverflow answered, this is sort of my last hope
to find someone who actually uses gradle and testng and can answer
this question.

http://forums.gradle.org/gradle/topics/how_do_i_set_the_working_directory_for_testng_in_a_multi_project_gradle_build

Thanks,

Robert

Jonathan Major

unread,
Nov 24, 2013, 3:27:13 PM11/24/13
to testng...@googlegroups.com
hi Robert,

you over ride the gradle java plugin's test task like this:

test {
        ignoreFailures = true  //use this to allow build to continue for CI purposes
        useTestNG()
        options.suites("src/test/resources/testng.xml") //pick up centralized xml suite for each sub project

put this in your top level build.gradle and it will get run with the build task and iterate over each sub project

Jonathan
Reply all
Reply to author
Forward
0 new messages