Q: Jenkins failing robolectric test cases...! I am trying to build my android project on Jenkins 2.0 server on Ubuntu machine.
I am running the following commands for that purpose:-


*

*./gradlew clean (this  is working fine)

*./gradlew build (this is failing random number of test cases)


However I also install Jenkins 2.0 on my Windows 7 machine and run the same commands as above, and it was passing all test cases every time. I am not understanding what is wrong with that.
I did lot of debugging but could not find any solution, please help me to get rid out of this thing...! 
This is my 34th build log on Jenkins
testPreCondition FAILED
    java.lang.NullPointerException at ConfigurationFragmentTest.java:36

handleBackButtonPressing FAILED
    java.lang.NullPointerException at ConfigurationFragmentTest.java:36

48 tests completed, 2 failed
:app:testDebugUnitTest FAILED

This is my 35th build log on Jenkins without making any code changes
    > handleBackButtonPressing FAILED
            java.lang.NullPointerException at ConfigurationFragmentTest.java:36

    > testPreCondition FAILED
            java.lang.NullPointerException at ConfigurationFragmentTest.java:36

      > testPreconditions FAILED
            java.lang.NullPointerException at UpdateTabFragmentTest.java:30

      > testPreconditions FAILED
            java.lang.NullPointerException at ServiceTabFragmentTest.java:29

      > testPreConditionIsNotNull FAILED
            java.lang.NullPointerException at HomeActivityTest.java:63
 48 tests completed, 5 failed
 :app:testDebugUnitTest FAILED



A: You should check the Jenkins console output for something like
"WARNING: No manifest file found " in the console output.
Those NPEs are typical for missing resources. 
The most common source for failing robolectric builds on different environmnets is probably robolectric not beeing able to load any resources.
Since robolectric needs to know where your Android Manifest is, you may have to provide a extra robolectric.properties for the build
http://robolectric.org/configuring/
