On Tue, Feb 11, 2014 at 11:38 AM, Jürgen Cruz <[email protected]> wrote:

> I think that is precisely the reason Jake Warthon discontinued his plugin
> and went full instrumentation tests. I agree with Jake that one should use
> Instrumentation tests in emulator since they are closer to reality than
> third party frameworks like Robolectric.
>

I still write unit tests that barely touch Android code (if at all) as unit
tests should. They are just invoked by the instrumentation tests now
because it's supported and I needed one less thing to maintain. People who
rely on Robolectric to behave 100% like Android are writing their unit
tests wrong.

I cannot describe how annoying it is to have to run tests on a device or
Genymotion, though. It makes me not want to write tests. I run them once a
week an tend to ignore failures for quite some time. What a stark contrast
"modern" Android development has become to previously automatically failing
pull requests unless all tests pass.

But I still consider a lot of pure Java classes exist in an Android app
> that could benefit from JUnit tests.


This.

Even code that barely touches Android (e.g., Bundle, Intent) should be unit
testable via mocks.

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to