-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AndroidJUnit4 Instrumentation Tests fail to run #588
Comments
try adding a
in your android maven plugin pom.xml |
The tests being skipped isn't the issue, it just doesn't seem to be recognized on the emulator or device that they are instrumentation tests. I'm seeing similar issues when trying to run from an IDE so I need to do some more research on it when I get time. |
According to testSkip javadoc: Enables or disables integration test related goals. If <code>true</code> they will be skipped; if I am guessing the default value is auto ? Edit: Nevermind. If you figure this one out, can you please post the answer here |
Will this fix your issue if it is implemented? #623 |
Yes, I believe if #623 is implemented it should fix this issue. |
@kingargyle #623 is implemented and shipped. Did it fix your issue/allow your issue to be fixed? I'm using it in my project and it works well. |
Haven't tried it, probably won't get to check this out for a while, so I'm going to go ahead and close this issues since #623 is completed. |
Trying to use the gist https://gist.github.com/JakeWharton/1c2f2cadab2ddd97f9fb to get Instrumentation Tests to run without needing to extend the InstrumentationTestCase or their sub classes.
If I just create a test case like:
@SuppressLint("NewApi")
@RunWith(AndroidJUnit4.class)
public class LoginTest {
}
The test never runs, and the integration-test never tries to kick off the test on the emulator. I can get a little farther with the following:
@SuppressLint("NewApi")
@RunWith(AndroidJUnit4.class)
public class LoginTest extends InstrumentationTestCase {
}
However, in this case it launches, deployes the instrumentation package, and then returns the following:
So it acts like it never runs the tests at all. If I switch to a regular JUnit 3 test case, it works, but I'd rather use the goodness that the new AndroidJunit4 runner provides as documented here:
https://code.google.com/p/android-test-kit/wiki/AndroidJUnitRunnerUserGuide
Even if I specify the class to run, it won't do it.
My AndroidManfest.xml looks like the following:
The text was updated successfully, but these errors were encountered: