You can implement Instrumentation in a separate .apk; actually that is
generally how you do it.  As long as it is signed with the same certificate
as the target .apk, when you run the instrumentation you will run the target
app with your instrumentation loaded and running in it.

I don't know of any useful links off-hand, but I am sure others do.

On Tue, Jul 14, 2009 at 1:11 PM, AndroidAutoTest <[email protected]>wrote:

>
> By the way, can Instrumentation be used for black-box testing?
> I heard that Instrumentation is a service and part of an application.
> That means test code cannot be run on release mode.
>
> I would really appreciate if you post any link to show example for
> this.
>
> Thank you for your information.
>
> On Jul 14, 11:52 am, Dianne Hackborn <[email protected]> wrote:
> > You can use Instrumentation, which allows test code to run inside the
> app,
> > so it can directly access views and retrieve them with things like
> > View.findViewById().
> >
> > On Tue, Jul 14, 2009 at 7:55 AM, AndroidAutoTest <[email protected]
> >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > I am investigating to improve test engine for automating android
> > > platform.
> > > The test engine I developed controls UI component by the absolute
> > > coordinate of the screen, not by its control ID.
> > > For example, if I want to click a button "A", I can send a command to
> > > click the button by tapping the screen by the specified coordinate.
> >
> > > However, if the location of the button is changed due to UI change, I
> > > have to change my script accordingly so that it taps on the right
> > > coordinate to press the button.
> >
> > > Is there any other method to control the UI component by its ID or
> > > name, not by tapping the absolute coordinate?
> >
> > > For example, if I can send a command to press a button "A" by its
> > > name, the script would press the button successfully no matter where
> > > the button is located.
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > [email protected]
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.- Hide quoted text -
> >
> > - Show quoted text -
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to