Android Espresso wrong set up, or work not stable?

后端 未结 1 909
耶瑟儿~
耶瑟儿~ 2021-01-20 19:41

I have been implementing android espresso test for a week. What is the real thing - is implementing server call and wait for it with espresso. This is called Idle Resource c

相关标签:
1条回答
  • 2021-01-20 20:31

    I'm having the same issue, and I think the main problem is that, the button, opens a new Indent, but seems that this alone don't cause the bug, which is very strange, it only happens when you typeText on an EditText before calling the click().

    P.S: I managed to work that out, seems like I had a couple of doubled dependency problems, once I solved that, the tests worked out without any problem and without the need to do any work around.

    My build.gradle part of the espresso ended like this:

    dependencies {
        repositories {
            mavenCentral()
        }
        // Espresso
        compile 'org.apache.commons:commons-lang3:3.1'
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.0') {
            exclude group: 'com.google.guava'
            exclude module: 'espresso-idling-resource'
        }
        androidTestCompile('com.android.support.test:testing-support-lib:0.1') {
            exclude group: 'com.google.guava'
            exclude module: 'espresso-idling-resource'
        }
    }
    

    I also added this before dependencies:

    configurations {
      androidTestCompile.exclude group: 'com.android.support'
      androidTestCompile.exclude module: 'support-v4'
      androidTestCompile.exclude module: 'appcompat-v7'
    }
    
    0 讨论(0)
提交回复
热议问题