0

I have an apk file and I want to develop and run some tests on it (I just have the apk file, I don't have access to source code).

I found a tutorial about this here and I found a video here but both are for Eclipse and I can't make this work with Android Studio.

There is any way to do it with Android Studio with any Framework? (Robotium, Espresso, Appium, Calabash, etc...) .

Anyone know more about this and can give me some explanation or some examples to follow through?

TFC
  • 151
  • 7
  • It is too common question. Android Studio creates two folders: **androidTest** and **test** for [instrumentation](http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Testing) and [unit](http://tools.android.com/tech-docs/unit-testing-support) testing respectively. Also there are functional [monkey](http://developer.android.com/intl/ru/tools/help/monkey.html) test and plenty of libs for different testing goals. – The Dreams Wind Jan 21 '16 at 18:55
  • AleksandrMedvedev , thankyou for your comment! :) I know that Android Studio create those two folders. But how can I develop some tests at those folders and run those tests against an .apk file without access to source code? – TFC Jan 21 '16 at 19:08
  • In tests your source code is still available. I suggest you to investigate [this](http://www.vogella.com/tutorials/AndroidTesting/article.html) article. – The Dreams Wind Jan 21 '16 at 19:20

1 Answers1

1

The tool I use for automation is called Calabash. The only thing you need is an apk. No source code/building your own version of the app. Its a tool that is very powerful and quite simple to use. I have begun making a video tutorial series for it here https://www.youtube.com/playlist?list=PLInoIpH9dfLyvdaOjozON9QnQP1pK30y-

You can use any editor you want - eclipse, android studio, even a basic notepad. The calabash tools run completely independent of an editor. All you need is the android sdk which comes with android studio. You can use tools in the android sdk to help like running emulators, and visually finding ids.

John Engelhart
  • 279
  • 4
  • 13
  • I will follow your series. :) You will make a video explaining how can we test an application just with an apk? Did you know any other series or tutorial with other frameworks? – TFC Jan 22 '16 at 07:05
  • Yeah the series so far goes into how to set up the framework, run the apk on emulators, do some basic interaction via command line (Which can then be scripted) and gets into some basics of the file structure. Future videos will go more in depth on how to use the calabash api, write tests, run on multiple physical devices, then finally setting up page object model for long term sustainability – John Engelhart Jan 22 '16 at 14:49
  • With calabash it's possible to simulate a shake at accelerometer? – TFC Jan 29 '16 at 11:46