-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/5/10 19:11 , A. Elk wrote:
> In other words, you can do button presses in a "sample" Android
> app from a test package, but you can't do them from your app's
> test package to the app under test.

Right.

> (The test package is the same as the "test app" and the "app under
> test" is the application you're trying to build.)
>
> Are you using ActivityInstrumentationTestCase2 as your test case
> class? I assume that you're calling TouchUtils.clickView(t,v)
> where
>
> t is the test case object (probably _this_), and v is the Button
> object you want to click, in the Activity you're testing in the
> app under test.

I'm trying _also_ with TouchUtils.clickView(); I'm also exploring
other testing frameworks. The cited Robotium, for instance, creates
MotionEvents with the DOWN/UP sequence and the proper position and
feeds them to the Instrumentation (yes, I'm using AITC2). I've
manually verified that the events are properly created (uptime,
coordinates are ok - tested with the hierarchyviewer - etc).

Yesterday night I discovered that tests launched my application not in
touch mode (in fact, I could see a focused button in orange). This
would have been an explanation, but then I explicitly added
setActivityInitialTouchMode(true) in setUp(), I got a visual
confirmation that it has been accepted (I no more see a focused
button), but it's not yet working.


- -- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
java.net/blog/fabriziogiudici - www.tidalwave.it/people
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxbsrYACgkQeDweFqgUGxfhaACfZpiS5INwfKXAHoblnkbGammP
dbwAn0WuoLcxXkTbDzj8qRORCEVZQaUf
=3h7h
-----END PGP SIGNATURE-----

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