Search code examples
androidtestingmobilemonkeytalkfonemonkey

How does Monkey talk agents work without source code modification in the app


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?


Solution

  • 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.