You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Joe Bowser <bo...@gmail.com> on 2017/02/15 20:43:20 UTC

Cordova Android Test Re-Write

Hey

So, after the last release when we switched bridge modes, we ran into some
issues related to the new bridge not behaving exactly like the old bridge.
This isn't a huge deal, since the old bridge never went away, and you can
manually set the bridge, but it would have been good to actually have some
unit tests related to this.

Basically, we're at the point where I'm not going to accept any new PRs on
Cordova-Android outside of gradle PRs until we get some solid tests in
place.  The old unit tests were refactored back in 2015, and unfortunately
the person who did it removed a lot of tests that were required and wrote
other tests that no longer work with the current permission system in
Android.  Combined with the fact that we have to update the tests to use
the new instrumentation, since the old instrumentation could be deprecated
any day now, we need to do a rewrite.

At any rate, the plan is as follows:

1. The unit tests are being written on my branch currently, and once I feel
we have feature parity with what currently exists, minus the ones that I
don't think make any sense, I'll be pushing these up to master.

https://github.com/infil00p/cordova-android/tree/unit_tests

2. Once these are done, I will be expecting any non-trivial change to
Cordova-Android to have a corresponding Instrumentation Test involving both
HTML/CSS/JS and jUnit tests.  If I see a PR without a jUnit test, added to
the new test project, it will not be accepted.

3. Once this is done, I do plan on moving plugins to be library projects,
and these library projects will also have jUnit tests.  This means that we
can hopefully avoid PRs that break the EXIF data and other major problems
that people have been having with these plugins.

Questions, comments about this plan? Want to help? Let me know?

Joe