Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test events were not received - Android Studio

Tags:

I have no idea how to test and I was following a tutorial.I am trying to run:

package name.company.sunshine.app.data;  import android.test.AndroidTestCase;  public class TestPractice extends AndroidTestCase {      /*        This gets run before every test.      */     @Override     protected void setUp() throws Exception {         super.setUp();     }      public void testThatDemonstratesAssertions() throws Throwable {         int a = 5;         int b = 3;         int c = 5;         int d = 10;          assertEquals("X should be equal", a, c);         assertTrue("Y should be true", d > a);         assertFalse("Z should be false", a == b);          if (b > d) {             fail("XX should never happen");         }     }      @Override     protected void tearDown() throws Exception {         super.tearDown();     } } 

but I get somewhere in the bottom left corner, in the console Test events were not received. What am I doing wrong ? Should I run something else ?

like image 972
Bogdan Daniel Avatar asked May 06 '15 13:05

Bogdan Daniel


1 Answers

When you run your test select the Android Test option.

Screen Shot

The JUnit and Gradle options should not be used for this type of test.

like image 57
Matt Accola Avatar answered Sep 28 '22 15:09

Matt Accola