Android Testing

Dec 11, 2014 at 7:13 PM
I am running tests with googletest which creates an executable that runs on the device.

However, casablanca requires a reference to the VM in order to proceed (pplx/threadpool.cpp:36). A VM is not available for the test environment.

Do you have any suggestions for testing?

Dec 12, 2014 at 1:43 PM
Hi luisfeliu,

The C++REST SDK requires a VM reference to perform some JNI calls which enable JNI within our threadpool and enable SSL to use the device's certificates. If you don't need either of those, it should be possible to modify the library and remove all uses of the JNI. However, if you do need either of those, then your application fundamentally requires an instance of the JVM. As standalone executables seem unsupported by Google, I don't think they allow access to the JVM.

For our own testing purposes, we use a NativeActivity which makes calls to the built-in android logcat functionality to record test progess.