Category Archives: bamboo

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