0 Test Results Uploaded

When I click to the Tests button of my unit-tests job, it says:

0 test results uploaded
We detected the `store_test_results` key but there is an issue with the output.
We recommend checking to see that your output was saved correctly.

Config.yml has this job:

    executor: exectr
    working_directory: ~/project/CT-StandardLibrary
      - attach_workspace:
          at: ~/
      - run:
          name: Build Tests
          command: |
            make tests
      - run:
          name: Run Tests
          command: |
            make runtests
      - store_test_results:
            path: ~/project/CT-StandardLibrary/cppunit-result

But the Upload step displays this:

Archiving the following test results
  * /root/project/CT-StandardLibrary/cppunit-result/results/ArgumentVectorTest.xml
Total size uploaded: 3.0 KiB

And the contents of that particular file:

<?xml version="1.0" encoding='ISO-8859-1' standalone='yes' ?>
<testsuites tests="4" failures="0" time="0.000">
  <testsuite name="ArgumentVectorTest" tests="4" failures="0" time="0.000">
    <testcase classname="ArgumentVectorTest" file="ArgumentVectorTest.cpp" name="testBasics" time="0.000"></testcase>
    <testcase classname="ArgumentVectorTest" file="ArgumentVectorTest.cpp" name="testForLoop" time="0.000"></testcase>
    <testcase classname="ArgumentVectorTest" file="ArgumentVectorTest.cpp" name="testRangeLoop" time="0.000"></testcase>
    <testcase classname="ArgumentVectorTest" file="ArgumentVectorTest.cpp" name="testRangeMethods" time="0.000"></testcase>

I’ve done the steps others have recommended. That is, my upload directory contains a subdirectory, and it’s in the subdirectory that my .xml files are. The testcase entries have classname, file, name, and time arguments. I’ve done basic XML validation – I know it’s good XML, although this could still be a schema thing.

It sure would be nice if the tool would tell us what’s actually wrong. Any other ideas?

So just OMG. I really wish CircleCI would tell you what it doesn’t like.

I just got it to work. I did a bunch of random things trying to get it to work. Here’s my latest file:

<?xml version="1.0" encoding='ISO-8859-1' ?>
  <testsuite name="WorkQueueTest" errors="0" failures="0" skipped="0" tests="13" time="4.011" timestamp="2023-06-08T19:30:01.743365" hostname="ct-ubuntu-u20">
    <testcase classname="WorkQueueTest" name="testQueueAndWork" time="0.010"></testcase>
    <testcase classname="WorkQueueTest" name="testIterator" time="0.000"></testcase>
    <testcase classname="WorkQueueTest" name="testReverseIterator" time="0.000"></testcase>

There may have been several changes required, but the last one that I’m calling The Fix is changing the encoding to utf-8.

I don’t know if I need all the fields in the field. That’s what I was chasing for a while.

As of now, this is resolved. But CircleCI – you really could save people if you explained why you don’t like their XML files.