CircleCI 2.0 Android Espresso No config found and No Tests Errors

Upon deploying my App with Espresso tests on CircleCI i get No configuration and “No Tests” error. The Espresso tests are working fine locally on Android Studio.

With a commit, CI job runs and fails with “No config found” error. details of the error is as follows:

> #!/bin/sh -eo pipefail
    #No configuration was found in your project. Please refer to https://circleci.com/docs/2.0/ to get started with your configuration.
    false
    Exited with code 1
  1. When i manually setup and build the project on Circle-CI i see its progressing from Starting the build–> Start Container -->Enable SSH -->Restore source cache --> Checkout using deploy key xxx till Disable SSH, and then it shows “NO TESTS” Error.

Below is my .circleci/config.yml

version: 2
jobs:
  build:
    working_directory: ~/code
    docker:
      # Android the primary container
      - image: circleci/android:api-26-alpha
    environment:
      JVM_OPTS: -Xmx3200m
    steps:
      - checkout
      - restore_cache:
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" }}
      - run:
          name: Download Dependencies
          command: ./gradlew androidDependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" }}
      - run:
          name: Setup emulator
          command: sdkmanager "system-images;android-27;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-16;default;armeabi-v7a"
      - run:
          name: Launch emulator
          command: export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib && emulator64-arm -avd test -noaudio -no-boot-anim -no-window -accel auto -verbose
          background: true
      - run:
          name: Wait emulator
          command: |
            # wait for it to have booted
            circle-android wait-for-boot
            # unlock the emulator screen
            sleep 30
            adb shell input keyevent 82
      - run:
          name: Run EspressoTests
          command: ./gradlew connectedAndroidTest
      - store_artifacts:
          path: app/build/reports
          destination: reports
      - store_test_results:
          path: app/build/test-results

My App’s SDK details are:

compileSdkVersion 27
minSdkVersion 15
targetSdkVersion 27

I tried changing docker image version to api-25-alfa and api-27-alfa as well .I am new to CircleCI and stuck with this issue.

^ There’s a few cases of code/text getting mixed up here, would you edit? Well-formatted posts are a pre-requisite for me to take a look :slightly_smiling_face:

According to https://stackoverflow.com/questions/52283250/circleci-2-0-android-espresso-no-config-found-and-no-tests-errors/52302067, this issue was resolved.

Yes the issue is resolved. Formatted the question post for future readers :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.