简体   繁体   中英

how to access java class function in an android apk remotely for testing?

i have an application on android which communicates with Arduino device, it communicates with the Arduino through the USB interface and we would like to have access of some of those functions remotely in order to run our end to end tests. We're having problem in finding a way to run our Arduino mock(which we've built for testing the app on emulator) some functions which we need access remotely. Any help will be appreciated regarding this, Thanks.

I can think of two options:

  • a command line interface to your mock classes (like input )
  • a service you can invoke from command line (using service call SERVICE CODE [i32 INT | s16 STR] ... )

If you can provide a more detailed example perhaps other options would come to mind.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM