cucumber - Calabash-android: attach to running app -


i have calabash-android set working default scenario (using cucumber run tests or calabash-android console enter repl mode).

however, under scenarios, turns out pretty useful able attach app that's running. instance, start app in debug mode , start tests able set breakpoints , check why features don't work expected in scenarios.

when comes calabash on ios, task straightforward: no additional preparation needed app starts test server bundled in , can attach calabash @ time. however, calabash android seems force-quitting app every time try start calabash having app running.

is there way around it?

edit looks below answers didn't much, still hope (calabash devs, you?) stumble upon 1 day. have spent time discovering issue myself, , that's specific issue is:

  1. start app in debug mode (using xamarin, instance)
  2. start calabash-android console path_to_apk
  3. try issuing commands (e.g. query("*")) – fails message keepalivedisconnected
  4. try running start_test_server_in_background – app killed , debug session terminated

digging deeper details, found out start_test_server_in_background in fact runs shell instrument sh.calaba.instrumentationbackend.calabashinstrumentationtestrunner being instrumentation backend , bunch of other flags describing app instrument, port use etc.

thus being said, following lot: is possible shell instrument attach running app?

great question, , simple answer is:

no

at least not on android (i cannot attest ios). why? calabash has establish hooks on app want run on before can run tests on app. due mixture of reasons regarding android stack.

the first reason security. android locks down apps in installation phase based on permissions set it. because of design, calabash (or other app-process-interfering script) not able execute in middle of app process. have found out, can still run calabash tests start of app android validate calabash purpose.

the second reason architecture. android designed layers of processes , views. trying interfere more 1 process on variety of levels.

the best can start calabash app without reinstalling it, android allow do.

finally, apologize if answer not delve technical details, these answers given me during particular hackathon struggled similar issue.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -