views:

28

answers:

0

Hi

Im having a problem starting or running any activity unit tests from within eclipse.

Even i start a clean project and make a simple test class it always prints to the console:

[2010-10-05 13:10:24 - testAndroid] Collecting test information
[2010-10-05 13:10:25 - testAndroid] Test run failed: Test run incomplete. Expected 2 tests, received 0

Any ideas ?

Just for testing, I have created a fresh Android project called Demo with a test project called DemoTest

The main activity to test is called Main and I have created a simple testclass MainTest that looks like this:

package net.demo.test;
import android.test.ActivityInstrumentationTestCase2;
import net.demo.Main;

    public class MainTest extends ActivityInstrumentationTestCase2<Main>
    {

        public MainTest()
        {
            super("net.demo", Main.class);
            // TODO Auto-generated constructor stub
        }
    }

My tests used to run fine before, but suddenly I cant run any of them, they all fail with the same error, even I create new a project. It seems like it something to do with Eclipse or and not with the Code.

Update: Seems like extending SingleLaunchActivityTestCase<Main> is working, but still got no clue about how to make ActivityInstrumentationTestCase2<Main> working.