Android and Junit reports Test run failed: No test results

by Conny » Fri, 16 Jul 2010 21:31:11 GMT


Sponsored Links
 Sorry people I am getting the reputation of solving my own issues :).

Fixed it. I just put in a default constructor and removed moved the
initializing of myActivity to the setup. It worked.

package com.sears.android.test;


import com.my.android.myActivity;

import android.app.Activity;
import android.test.ActivityInstrumentationTestCase2;

public class TestCartView extends
                ActivityInstrumentationTestCase2<myActivity> {

        Activity myActivity ;
        public TestCartView() {
                super("com.my.android.myActivity", myActivity.class);
        }
        public TestCartView(String pkg, Class<myActivity> activityClass) {
                super(pkg, activityClass);
        }

        protected void setUp() throws Exception {
                super.setUp() ;
                myActivity = super.getActivity() ;
        }

        public void testSomethingSilly() {
                assertNotNull(myActivity) ;
        }


        public void testSomethingSillier() {
                assertNotNull(myActivity) ;
        }

        protected void tearDown() throws Exception {
                super.tearDown();
        }

}





--



Android and Junit reports Test run failed: No test results

by Conny » Sat, 17 Jul 2010 01:34:53 GMT


 One more piece of information that is helpful here.

ActivityInstrumentationTestCase2(String pkg, Class<T> activityClass)
This constructor is deprecated. use
ActivityInstrumentationTestCase2(Class) instead
 ActivityInstrumentationTestCase2(Class<T> activityClass)
Creates an ActivityInstrumentationTestCase2.

Some examples use
ActivityInstrumentationTestCase2(String pkg, Class<T> activityClass)

Regards
Conny





--


Sponsored Links


Other Threads

1. Dot before Class Name?

<provider class=".NotePadProvider"
                 android:authorities="com.google.provider.NotePad" />

Why is there a dot (a period) before the Class name?


- Juan T.
--~--~---------~--~----~------------~-------~--~----~

2. Marketplace html error - cannot administrate my downloads or create new applications. Will someone in google please read !

Is there nobody here who can help? Is there anybody here who can
suggest who I ask ?



--~--~---------~--~----~------------~-------~--~----~

3. Problem : Overriding a couple of styles using a theme..

4. Neeeeeed HELP......How to get the text's length after TextView.setText()?

5. WMA / MIDlet-push support

6. beginner question.

7. my PacMan version released