Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

TestNG not picking up **/test-results/*.xml

jonathan major November 22, 2013

hi ,

I'm facing a problem with Bamboo on-demand, multi-project gradle and TestNG.

Tests are executing and are writing xml and html results to their respective folders i.e.

The testNG parser is using ant style: **/test-results/*.xml

The build log is as follows:

simple23-Nov-2013 16:19:03Finished task 'RaptureQA Gradle build'

simple23-Nov-2013 16:19:03Starting task 'collect testng results' of type 'com.atlassian.bamboo.plugins.testresultparser:task.testresultparser.testng'

simple23-Nov-2013 16:19:03Parsing test results...

simple23-Nov-2013 16:19:04Failing task since test cases were expected but none were found.

simple23-Nov-2013 16:19:04Finished task 'collect testng results'

Not sure why its not finding the xml test results?

additionally, I have noticed it you rerun only the parse task (by disabling other tasks) the entire contents of the build folder are deleted.

Jonathan

1 answer

1 accepted

2 votes
Answer accepted
jonathan major November 25, 2013

so I got it working (i.e. Bamboo reporting testng reports), which requires a couple of changes:

  1. 1. in top level build.gradle
    • use 'useDefaultListeners=true' this produces the testng-results.xml files in each dir
    • put everything in a code block under useTestNG()
  2. use **/testng-results.xml in Bamboo's

here is the build.gradle:

test {
useTestNG(){
useDefaultListeners = true
ignoreFailures = true
options.suites("src/test/resources/testng.xml")
}
}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events