Skip to content

Android JUnit Test using SQLCipher #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xxtesaxx opened this issue Jul 11, 2014 · 1 comment
Closed

Android JUnit Test using SQLCipher #133

xxtesaxx opened this issue Jul 11, 2014 · 1 comment

Comments

@xxtesaxx
Copy link

Hello everyone,
i hope you can help me to get this working. I want to write JUnit tests for my App and heres the problem:
I added the icudt46l.zip to the assets directory of my test project. Then i wrote a simple ActivityUnitTestCase. In the setUp() method, i call SQLiteDatabase.loadLibs(getInstrumentation().getTargetContext());
but unfortunately i always the the "net.sqlcipher.database.SQLiteException: not an error" error.

Is it possible to have JUnit tests with SQLCipher for Android? How should i load the libs in a test project? I saw that there is a "test suite" but this is just a regular Android App doing some stuff. I need real unit tests for my company and i wonder how this could be done. If anybody has an idea, i would love to hear about it.

@xxtesaxx
Copy link
Author

The error magically disappeared when i deleted the app from the device/emulator and reinstalled it. Now i can use Android JUnit tests with SQLCipher. I have no explanation why but to be honest, i don't really care as long as it works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant