4

I have a simple Scala project, build with sbt, tested with JUnit. The project is plugged into Shippable CI and in the CI interface, I can see Tests tab when running a build. Seeing "No test reports exist, skipping test report processing" message and reading Shippable documentation led to adding following into the shippable.yml file:

before_script:
    - mkdir -p shippable/testresults
    - ln -s ../target/test-reports shippable/testresults

Shippable now recognises that the are some files - they look like regular JUnit XML test output:

<?xml version='1.0' encoding='UTF-8'?>
<testsuite hostname="Davids-MacBook-Pro.local" name="recfun.PascalSuite" tests="3" errors="0" failures="0" time="0.027">
    <properties>
        <property name="jline.esc.timeout" value="0"/>
        <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
....

, but I get following error from Shippable and test results are not provided:

reports --destination /shippableci/testresults tests --source /root/src/bitbucket.org/gaincore/recfun/shippable/testresults
No valid test reports found in path: /root/src/bitbucket.org/gaincore/recfun/shippable/testresults exiting...

What do I have wrong? Do I need to do anything else with the xml output? Does it need to be parsed, or are the any naming conventions?

David Lukac
  • 728
  • 7
  • 20

1 Answers1

2

Its working fine for me. This is the build link: https://app.shippable.com/runs/56ebcfb56b2b030d006f133d

shippable.yml is:

language: scala

scala:
  - 2.11.0

before_script:
  - mkdir -p shippable/testresults
  - ln -s ../target/test-reports shippable/testresults

sample project link is: https://github.com/akskas/sample_scala/tree/test-normal

Please provide some more context about your shippable.yml file, if you are still having this issue. You can follow the progress of this issue here: GITHUB: Shippable/support/issues/2409

akskas
  • 15
  • 3
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/11681250) – Brian Tompsett - 汤莱恩 Mar 18 '16 at 10:48
  • @BrianTompsett-汤莱恩I have added the code that could change over the time. Other link pages won't change. – akskas Mar 18 '16 at 11:00
  • @akskas I believe the reason that it's working for you isn't because of the symlink but rather because you are writing to the shippable/testresults directory in your sbt file. If you remove that from the build you'll see the same results as noted by David. I need to test this out but I believe this problem with the symlink is that you need to only create the `shippable` directory (that is, just the parent directory) for the symlink in the next line to work correctly. – roborative Nov 21 '16 at 18:00
  • With regards to my last comment, I couldn't get the symlink to work in such a way that the tests were found. In the end, I simply moved the directory to where shippable expected to find it (`shippable/testresults`) and had success. – roborative Nov 29 '16 at 17:55