incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bowser <bows...@gmail.com>
Subject Re: Update on CordovaView/CordovaActivity - Tests
Date Wed, 11 Jan 2012 23:04:36 GMT
On Wed, Jan 11, 2012 at 11:16 AM, Brian LeRoux <b@brian.io> wrote:

> Joe was this related to the JUnit stuff Lunny was working on? I'm
> thinking the unit tests should just be bundled in the proj no?
>
>
No, the JUnit stuff that Lunny was doing is different and is straight up
vanilla JUnit and doesn't deal with the Android environment.  There are
about current three (maybe four) different tactics to writing tests to
PhoneGap Android:

   - Testing Non-Android Specific Java Classes using JUnit - The approach
   Lunny used with the Preferences that was merged in (Fairly easy to do if
   you're familiar with JUnit)
   - Testing Android-Specific Java classes (i.e. Cordova View) using tests
   - We need to create multiple activities for each of the use cases (i.e.
   Splashscreen, Using in an XML Layout vs an Activity exending
   CordovaActivity).  It also uses JUnit, but in a totally different way than
   the previous approach, since we have to specify targets in our
   AndroidManifest for the project.  Perhaps we can have the Test project and
   the regular Android project co-exist, but that seems like a lot of work. In
   addition, we need a way to test CordovaView when it's used outside of a
   CordovaActivity.
   - Testing using Mobile-Spec all in Javascript (Easiest, biggest payoff.
    This is why we already do this!)
   - (Maybe) Testing using WebDriver (Not possible so far, should be in
   theory with the CordovaView, but so far we don't have this working yet)

I want to avoid cluttering the framework code with numerous activity
classes that don't need to exist just for test purposes that could offer
false results. I do think that some of these tests should eventually live
in their own project somewhere, separate from the framework code, somewhere
in a test folder.

Does that make sense?  Or can testing on Android be made easier somehow?

Joe

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message