Test reports are not collected


#1

I use the circle.yml below , yet nothing shows up under artifacts and the test summary says:
Help us provide better insight around your tests and failures. Set up your test runner to output in JUnit-style XML, so we can:

circle.yml
machine:
java:
version:
oraclejdk8
environment:
TERM: dumb

general:
branches:
only:
- master # only build/deploy from master
artifacts:
- “build/reports/tests” # preserve the generated HTML test reports

test:
override:
- ./gradlew test -is
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex “.*/build/test-results/.*xml” -exec cp {} $CIRCLE_TEST_REPORTS/junit/ ;


#2

The problem was that I use the bnd gradle wrapper that writes the xml files to “generated/test-results”

The gradle circle.yml sample from the documentation must therefore be modified:

  • find . -type f -regex “.*/generated/test-results/.*xml”

#3