androidMock
https://www.dropbox.com/s/8ekgxg1r8h4ho7n/droidTest.apk
###Functions
- build a framework for building apps that can access and modify state of applications
- mock.py notification pop up a notification : popup a notification
- mock.py settings method=toggleAdb : open/close adb
- mock.py alarmManagerService : schedule and unschedule task test
- method.py Am method=forceStop package=packageName : execute ActivityManager.forceStopPackage for app whose package name is packageName
- method.py Am method=killProcess package=packageName : use Process.kill process whose package name is packageName
- method.py Am method=killBackground package=packageName : use ActivityManager.killBackgroundProcesses process whose package name is packageName
- method.py Am method=anr :ause a anr
- mock.py Am method=resolve : PackageManager.queryIntentActivities to reolve intent
- mock.py Am startAll : start multiple activies
- mock.py network method=toggle wifi=1 : toggle wifi data
- mock.py network method=profile : get the generic connection of network,such as mobile and wifi state
- mock.py Pm start package=packageName : start launcher application of packageName
- mock.py Pm list package=packageName: list general information of a package
- mock.py shortcut : create a shortcut of a application
- mock.py telehphony : get inserted simcard size
###How to.. ####set up the framework
- add droidMocks.jar to libs
- add this to AndroidManifest.xml
- add application instance in tag,such as DemoDroidMocksApplication
- in the Application's onCreate, put :
####add mocks
- write a class that extends Mocker
- do what you want in dump()
####use mock.py
- add the mock.py file to PATH
- useage: mock.py [module] [key=value] [key1=value2] ....
###TODO
- add usage for every module when mock.py [module] is typed
- su custom command executor
- use multiple methods to invoke ANR
- move locks to ViewTest
- add mock to sendsms and mms
- redirect logs to a View
- move resources to view
- move systemui related to viewTest