In real life you should deal with different apps some are good quality some 
... let say not the best.
And robolectric is the only way to test those, cos whole business logic 
seats in Activity.

Why google can't just reuse (part of) robolectric? Is there any discussion 
about that?
Are there some hints how to integrate robolectric flawlessly?

P.S. Thanks for AndroidStudion.

On Wednesday, February 4, 2015 at 11:20:25 PM UTC+1, Artem Zinnatullin 
wrote:
>
> "Simulator which runs on the JVM" you mean whole Android emulator? That's 
> pretty big amount of work. And I think result won't be much faster than 
> Genymotion or Android x86 + Intel HAXM, just easier CI and dev setup.
>
> For business logic unit testing purposes current test support is enough 
> (Robolectric was enough too, never understood people who wanted to simulate 
> Fragment/Activity behavior in unit tests), for more integration testing — 
> Android Emulator. 
>
> On Wednesday, February 4, 2015 at 10:50:04 PM UTC+3, Jake Wharton wrote:
>>
>> On Wed Feb 04 2015 at 9:42:49 AM Michal Bendowski <[email protected]> 
>> wrote:
>>
>>> I agree with Roman here - it's not clear to me how subclassing would 
>>> solve the real issue: you would still have to implement all methods that 
>>> you call from production code.
>>>
>>
>> With a fake I can implement it in a re-usable fashion using actual 
>> behavior (e.g., a Bundle backed by a Map). With mocks I have to script 
>> behavior, thus negating any utility of the unit test's logic (or, at least 
>> making it redundant).
>>  
>>
>>> What we might also consider is having an android-util library that gives 
>>> you the real, working implementation of Uri. But that's a different 
>>> conversation.
>>>
>>
>> Everyone wants this badly, but...
>>
>> This is a bottomless pit which I would advise against. That exact 
>> sentence was uttered 4 years ago and now we have the half-abomination (fake 
>> impls), half-amazeballs (real impls, like Uri) that is Robolectric.
>>
>> Where does this stop? Intent? Bundle? Parcel? With Parcel now you're 
>> hitting native code. Do you fake those methods? Compile the .so's for the 
>> desktop?
>>
>> Spend your energy on a simulator which runs on the JVM instead. That's 
>> the logical conclusion to your statement, after all!
>>
>

-- 
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/d/optout.

Reply via email to