Testing android implementation of cordova plugin -


i have created cordova plugin has android implementation. java code has calls sdk interfaces specific hardware mobile device connected to. write unit tests java code , mock calls sdk can run tests during ci.

when looking this, found cordova-plugin-test-framework, can tell, tests write against javascript code, not actual platform implementations. i'm sure use , write tests, require mobile device connected hardware, , don't want have actual calls sdk. in other words, don't have way of mocking sdk calls using this.

i thought maybe run junit command line java code, getting errors because couldn't find org.apache.cordova.callbackcontext. tried faking own object, continued, found more dependencies code in isolation doesn't know about.

next figured best test within android project under /platforms in ionic mobile app, since dependencies visible @ point. i'm able run ./gradlew test (https://developer.android.com/studio/test/command-line.html) here, can't figure out how implement test cases call pick them up. there kind of config can add knows tests? i'd fine if there place had put them.

i'm open options this. want able run junit test part of our ci process.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -