lundi 1 août 2016

How to test custom cordova plugin's native code?

I know cordova-plugin-test-framework will help in testing any cordova project. I am developing a custom camera cordova plugin for Android platform. I would like to write some Junit/Instrumentation test cases for my custom camera Android plugin code. I am facing issues as I can't create CordovaInterface, CordovaWebView Objects from my test class.

Is there anyway that I can create CordovaInterface, CordovaWebView Objects from my test class and pass these as parameters for my custom camera Android plugin excute method.

I would like to avoid unit test cases at js level using cordova-plugin-test-framework and write some Junit test cases (as I will have access to most of the internal classes my camera cordova plugin use). please correct me, if this wrong approach.

Aucun commentaire:

Enregistrer un commentaire