Criteria for junit test metadata, not picking up w/ clojure/boot?

How does Circle pick up on test metadata? I’m using clojure and boot, and have it outputting junit reports to $CIRCLE_TEST_REPORTS/junit. The files are named after namespaces, not the test files, for example myapp.test.server-test.xml and the files look normal.

A test run under “Collecting Test Metadata” shows

Compressing test results...
Uploading test results...
Test results uploaded.

But Circle is still prompting me to “Set up Test Summary”. Any ideas? If is was successfully picking up the reports, would I witness different behavior? I’d really like to get this working to enable auto-parallelizaiton.

It sounds like everything should be working. Can you open a ticket in the support app so we can take a look at the project and results files?

If this is not a paid org, can you DM me the org/project URL on CircleCI so we can look?

Did you get this working? I’m setting up a clojure project on circle and having directions for this would be cool! Thanks.


Sorry folks, I had gotten it working and then got busy with other things. The project is private, but here’s the relevant bits:


    - ./script/test-ns:
        parallel: true
          - test/**/*_test.clj
          - test/**/*_test.cljc
    - boot test-cljs
    - mkdir -p $CIRCLE_TEST_REPORTS/junit/
    - find . -type f -regex ".*/target/reports/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;


#!/usr/bin/env bash

# converts `src/clj/namespace/to/some_file.clj` to ``
file_to_ns () {
    echo $(echo "$1" \
               | sed -e 's|test/clj\w*/||' \
               | sed -e 's|.clj\w*$||' \
               | sed -e 's|/|.|g' \
               | sed -e 's|_|-|g')


for f in $*; do
    nss+="-n $(file_to_ns $f) "

boot test-env \
     test -j "reports" \
     $nss \
     target -d  target

There were three things I didn’t quite understand:

  1. Circle expects the directory containing the junit-style output to be in a directory called “junit”
  2. boot-test puts those files in a subdirectory of the target
  3. you cannot use $CIRCLE_TEST_REPORTS as your boot compile target if you want this to work.
1 Like