How to parse SBT test reports on Shippable?

525 Views Asked by At

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?

1

There are 1 best solutions below

4
On

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