Note that there are some explanatory texts on larger screens.

plurals
  1. POMake Android jenkins build fail if tests fail
    primarykey
    data
    text
    <p>I have seen several post regarding making a build in Jenkins fail if the unit test execution fail (e.g. this <a href="https://stackoverflow.com/questions/6681880/how-to-make-jenkins-display-fail-if-one-of-the-ant-tests-fail">one</a>). It turns out that by default Jenkins reports builds with failing tests as <code>unstable</code> and some people do not like that. This, however, will be perfectly fine for me. I just want to be able to easily differentiate builds with passing tests from such with failing tests. </p> <p>And here is the catch: <strong>I am developing for Android</strong> so my build is configured following <a href="https://wiki.jenkins-ci.org/display/JENKINS/Building+an+Android+app+and+test+project" rel="nofollow noreferrer">this page</a>. Basically the tests are run with the following command:</p> <pre><code>ant all clean emma debug install test </code></pre> <p>As result coverage report is generated and published in Jenkins.</p> <p>All posts I have read about configuring the Jenkins result according to tests results were dealing with ant task manipulation. However, if we look at the android <code>build.xml</code> the Android tests are run with adb command: <code>adb shell am instrument ...</code>. I don't know how to configure this command to print the tests results. It can be configured to print the coverage report. I have already done that, but was never able to make the build fail according to the coverage report.</p> <p>I hope somebody else also faced the same problem and managed to solve it. Any guidance will be most appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload