Espresso Test for Android in Circle CI


#1

This is my Circle.yml file

***Start
general:
artifacts:
- /home/ubuntu/your-app-name/app/build/outputs/apk/

machine:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux

dependencies:

override:
    - chmod +x gradlew
    - echo y | android update sdk --no-ui --all --filter "platform-tools, tools"
    - echo y | android update sdk --no-ui --all --filter "android-25, build-tools-25.0.2"
    - echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
    - echo y | android update sdk --no-ui --all --filter "extra-android-support"
    - echo y | android update sdk --no-ui --all --filter "com.google.gms.google-services"

- yes | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-25.0.2,android-25

    - echo y | ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies

test:

override:

start the emulator

  • emulator -avd circleci-android24 -no-audio -no-window:
    background: true
    parallel: true

wait for it to have booted

  • circle-android wait-for-boot

unlock the emulator screen

  • sleep 30
  • adb shell input keyevent 82

run tests against the emulator.

  • ./gradlew ExampleInstrumentedTest -PdisablePreDex
    ***End

I want to run ExampleInstrumentedTest in the circleCi environment but I’l getting failed build everytime.

Please help.

ISSUEE : Action failed: Configure the build


#2