Re: [android-developers] Automatic testing tool for Android?

2010-09-22 Thread Timo Reimann
Hey,


On 17.09.2010 08:38, Dajinsol Jeon wrote:
 Yesterday, I heard that there is a program to test Android application
 automatically after installing apk onto real device. The one I have
 heard is commercial, and very expensive. Is there a open source tool? I
 know that adb shell support monkey test, but is it possible to use adb
 for UI interaction? For example, is it possible to send button-click
 event to button (which is specified by id or something else) in
 application by using adb?

I don't know about automatic testing on real devices but the SDK
provides a testing framework which you can use to write emulator-based
tests, including UI. Take a look at the relevant guide section:

http://developer.android.com/guide/developing/testing/index.html


HTH,

--Timo

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


Re: [android-developers] Compile error in the new “Hello Testing” Tutorials program

2010-09-22 Thread Timo Reimann
On 19.09.2010 12:55, Kieu Hua wrote:
 There is compile error in HelloAndroidTest program in the Tutorials
 “Hello Testing” program, because I got this compile error.
 “com.example.helloandroid.R.id.textview can not be resolved.”
 
 @Override
 protected void setUp() throws Exception {
 super.setUp();
 mActivity = this.getActivity();
 mView = (TextView)
 mActivity.findViewById(com.example.helloandroid.R.id.textview);
 resourceString =
 mActivity.getString(com.example.helloandroid.R.string.hello);
 }
 
 My com.example.helloandroid.R doesn’t have R.id.textview, and
 endroid.R.id class does not have endroid.R.id.textview field.
 
 Where do I support to get this field, 
 “com.example.helloandroid.R.id.textview”?

You need to assign an ID to the TextView element which is to be
instantiated in mView. The ID should be set in the XML file defining the
UI and should look like this:

  android:id=@+id/textview

You probably skipped the Hello, World! tutorial which sets up an XML
layout here:

http://developer.android.com/resources/tutorials/hello-world.html#upgrading


Cheers,

--Timo

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