Getting TestNG results reporting in Bamboo (in a Gradle build)

To get TestNG parser working in Bamboo do the following:

  1. In top level build.gradle
      • use ‘useDefaultListeners=true’ this produces the testng-results.xml file(s)*
      • Put everything in a code block under useTestNG()
  1. use ant style **/testng-results.xml as the file locator  in Bamboo’s

here is the build.gradle:
test {
useTestNG(){
useDefaultListeners = true
ignoreFailures = true
options.suites("src/test/resources/testng.xml")
}
}

* This works for a multi-project gradle setup as the testng.xml files are located in each sub-directory.

Answered my own problem on Atlassian site https://answers.atlassian.com/questions/236699/testng-not-picking-up-test-results-xml

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s