AWS device with espresso and JUnit4

I want to test my application in an AWS farm using

androidTestCompile 'com.android.support.test:runner:0.4'
androidTestCompile 'com.android.support.test:rules:0.4'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.1'
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.1') {
    exclude group: 'com.android.support', module: 'appcompat'
    exclude group: 'com.android.support', module: 'support-v4'
    exclude module: 'recyclerview-v7'
}
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'com.squareup.retrofit:retrofit-mock:1.9.0'
androidTestCompile 'com.squareup.assertj:assertj-android:1.1.0'
androidTestCompile 'com.squareup.spoon:spoon-client:1.2.0'

Test example:

@RunWith(AndroidJUnit4.class) and run with AndroidJUnitRunner, I have my tests starting like:

@RunWith(AndroidJUnit4.class)
@LargeTest
public class EstimationActivityTests {

@Rule
public ActivityTestRule<LoginActivity> mActivityRule = new ActivityTestRule(LoginActivity.class);

@Before
public void setup() {
}

@Test
public void showsRightDataOnCreate() {
org.junit.Assert.assertEquals("asd", "asd");
}
}

But it just checks the tests for breaking and setting the kit ... it looks like it doesn't recognize the tests ...

Another thing is that I create apk and test apk with gradlew.

#./gradlew assembleMockAndroidTest

and I upload files to app-mock-androidTest-unaligned.apkand app-mock-unaligned.apk.

What happened in my process?

Case: https://forums.aws.amazon.com/thread.jspa?messageID=647198

+4
source share
1 answer

All test clan names must end with “Tests,” and test functions must begin with “test” and then work.

http://makingiants.com/blog/run-espresso-tests-on-amazon-aws-farm-test-center/

+4

Source: https://habr.com/ru/post/1609495/


All Articles