Testing CRUD, View and Reduce operations on Android

Hi there,

I am pretty new on Couchbase Lite Android. I am developing a simple (I would even say dummy) application which makes use of CBL, so far I have developed some kind of DAO for two simple models/documents. And now I would like to make some automatic tests to check that my CRUD operations, the View/Reduce/Queries are working fine. I have been Googling for many hours without any success (I found how to mock CB with Robolectric and Dagger but this is not what I am looking for), What is the way to go? I am so lost right now.

Summing up, I mainly would like to make “integration tests” of my queries (View+Reduce)

Any help or guidance would be very appreciated.

Hi,

It sounds like you want to create some mock data and run validation tests against it, is that right? Or are you more concerned with injecting the mock database as a dependency?

Here’s a couple of discussion threads that might help with creating test databases:

https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/mobile-couchbase/J174fGyGaG4/ZeCq5HW23-IJ