IMO, it's not so much that it's not TestNG, it's that it's Junit 3.  4 
would have been fine.  

Android's still got an incredibly obtuse approach to testing with the stub 
exceptions and pushing you toward running on-device.  So, we work around by 
pulling all our logic out into non-android classes and test those using 
standard junit 4 and mockito.  Add in robolectric with no config 
[@RunWith(RobolectricTestRunner.class) @Config(manifest = Config.NONE)] 
when you have to.  Picasso, Retrofit, Rx Java, Otto, Dagger -- yep, use 
them all.

Everything you've said about robolectric and android studio is true, from 
what I understand.  I always build on the command line with maven (yeah, I 
know I'm behind).  I have a friend who has claimed he's cracked the Android 
Studio+robolectric barrier, but he hasn't told me how yet.

Pat.

On Wednesday, October 1, 2014 4:13:51 PM UTC-5, Cédric Beust ♔ wrote:
>
>
> On Wed, Oct 1, 2014 at 1:56 PM, Rakesh <[email protected] 
> <javascript:>> wrote:
>
>> Crap, Google still only support Junit3.
>
>
> Sadly, I have to bear the blame for that.
>
> In the early days of Android (I should say the first days of Android), the 
> director of engineering came to me and asked me "Do you think we should use 
> TestNG for Android?".
>
> I was not prepared for this question so I told him I'd get back to him. I 
> spent the next few days going over the TestNG code base (that was circa 
> 2007 so TestNG was just three years old). Obviously, I knew that code base 
> very well but I had written it with server testing in mind, certainly not 
> with the intent of running on a mobile device, especially on an OS that we 
> were still in the process of writing.
>
> After a couple of days, I got back to him and I told him "No, I don't 
> think we should make TestNG the standard on Android, I just didn't write it 
> with this in mind and I'm afraid that it just won't perform well".
>
> So we went with JUnit 3.
>
> I'm sorry.
>
> -- 
> Cédric
>
> 

-- 
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/javaposse.
For more options, visit https://groups.google.com/d/optout.

Reply via email to