Hi,

A problem always trouble me.

I have added the "android.test.runner" user library and
"android.test.InsturmentationTestRunner" in instrumentation.
But when i run the test in Instrumentation, 0 test has been run.

My test class is as below:
package com.android.ProjectTest.test;

import android.R;
import android.app.Instrumentation;
import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.LargeTest;
import android.util.Log;
import android.widget.Button;
import android.widget.EditText;

import com.android.ProjectTest.ProjectTest;


public class TestNewSDKTest extends
ActivityInstrumentationTestCase2<ProjectTest> {
    private Button sentmessage;
    private EditText txtMessage;
    private EditText TxtPhoneNo;
    private Instrumentation mInst = null;
    private static final String TAG="ProjectTest";

    public TestNewSDKTest() {
             super("com.android.ProjectTest",ProjectTest.class);
}
    protected void setUp() throws Exception {
        super.setUp();
        mInst = getInstrumentation();
        ProjectTest a=getActivity();
        }
     protected void tearDown() throws Exception {
        super.tearDown();
}

   @LargeTest
    public void TestSendM()throws Exception
    {
        Log.v(TAG,"Test Send SMS");
        String PhoneN="5556";
        String Message="Hello, my friend";
                ProjectTest a=getActivity();
                a.txtMessage.setText(Message);
        a.txtPhoneNo.setText(PhoneN);
        assertEquals(TxtPhoneNo.getText(),PhoneN);
        txtMessage.setText(Message);
        assertEquals(txtMessage.getText(),Message);
    }

}

But after i run the test in Instrumentation, the log shows that 0 test
is run.
The log is as below:
       INSTRUMENTATION _RESULT stream=
       Test result for InstrumentationTestRunner=
       Time :0.001
       OK(0 tests)
       Instrumentation_CODE=-1


So, Is i messing some conditions. Why this happened.
Anybody could help me?
Thank you.

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