I am developing in Android, I am using instrumentation to test Phone application. Instrumentation is Android env to test applications.
For that I use am command with name of test case. I run adb, then I enter adb shell, then write in shell the am command.
I wish to deliver a parameter together with this am command. I mean that I wish to deliver parameters to the test launched by the am command.
Is it possible ??? Please help ?
Since you are already working on Android sdk, given you know the sdk location on your system - Go to sdk location on terminal(command prompt)-> type adb shell -> type am help
with example http://whenpridefucks.blogspot.in/2011/12/android-send-broadcast-intents-via-adb.html
Pass the paramater in: (e.g., -e peerID SCH-I545)
In the test class:
exactly is:
com.shortcut.activity/com.shortcut.activity.SelectCardActivity -> uir to your main class activity start app. will pass to your app param user_id = 1 and on class SelectCardActivity you get it as bellow :
you can pass a data uri, mime type and even "extras" to the am command.
You could pass them as "extras" and then get the extras that are passed to it.
You would pass them like this:
then in your code: