Pergunta

When we install agents for android or ios app, we usually add some library and change some configuration settings. How does just adding a library can make that app to record events and push it to the monkey talk IDE.

Usually when we add a library to a project, if we need to use it, we have to import it and then use it in the code. But how does this agent do all the work without any source code modification?

Foi útil?

Solução

Monkey talk library is using AOP and aspectJ combination to get current task thats why they are adding <uses-permission android:name="android.permission.GET_TASKS" /> permission. Now using using this permission they can access application current Activity and its view . so they are parsing current view each time when its changed. and adding new listener for these views.

For more information you can download and study its code is open source.

Outras dicas

neeraj t is correct: in Android, MonkeyTalk code is invoked by AspectJ aspects - bits of code which are "weaved" into the app and get invoked when cerain methods are called. In iOS, MonkeyTalk is initialized statically, forced by using the "-all_load" linker flag.

Simple answer is No, FoneMonkey must be compiled into the application under test for it to work. So yes, someone must have access to the application source. But once FoneMonkey has been compiled into the app, you no longer need the source, and you can handoff the APK to QA

Ref - Source

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top