Issue
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 ?
Solution
When you run your test select the Android Test option.
The JUnit and Gradle options should not be used for this type of test.
Answered By - Matt Accola
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.