todotxt / todo.txt-android

Official Todo.txt Android app for managing your todo.txt file stored in Dropbox.
http://todotxt.com
GNU General Public License v3.0
1.24k stars 408 forks source link

Restore unit tests #502

Closed evanp closed 6 years ago

evanp commented 6 years ago

When we moved to Gradle, the unit tests disappeared. We need to add them back into the project so we can make changes; this is especially important for testing that updates to the Dropbox API work.

dae3 commented 6 years ago

Working on this one now

dae3 commented 6 years ago

OK, unit tests are back and running at dae3/todo.txt-android@8758910ceea96c1a3a28f4e10f76bbad2e5ea532.

A number are failing because of test environment problems, mostly seems to be missing mocks for Android system bits.

I'll start working through but it'd be good to get some more eyes on this.

dae3 commented 6 years ago

Here's what needs work:

Turns out they all just needed to be run by the instrumented test runner. All tests now run, although some still fail, but appear to be genuine failures.

If anyone has a the output of a test run from the pre-Gradle build that'd be great too, to distinguish between genuine test failures and test environment breakage.