Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12306

Unit tests are failing for cordova-android

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-android
    • Labels:
    • Environment:

      Android Studio 2.3

      Description

      The following repo has unit tests defined: https://github.com/apache/cordova-android. However, running `./gradlew connectedAndroidTest` will show these failing unit tests:

      Starting 16 tests on Pixel_XL_API_25(AVD) - 7.1
      Starting 16 tests on Nexus 5X - 7.1.1
      Starting 16 tests on Z667G - 4.3

      org.apache.cordova.test.CordovaResourceApiTest > testJavaApis[Pixel_XL_API_25(AVD) - 7.1] FAILED
      java.lang.NullPointerException: uriString
      at android.net.Uri$StringUri.<init>(Uri.java:475)

      org.apache.cordova.test.CordovaResourceApiTest > testJavaApis[Nexus 5X - 7.1.1] FAILED
      java.lang.NullPointerException: uriString
      at android.net.Uri$StringUri.<init>(Uri.java:475)
      Starting 16 tests on Nexus 7 - 6.0.1

      org.apache.cordova.test.CordovaResourceApiTest > testJavaApis[Nexus 7 - 6.0.1] FAILED
      java.lang.NullPointerException: uriString
      at android.net.Uri$StringUri.<init>(Uri.java:475)

      org.apache.cordova.test.CordovaResourceApiTest > testJavaApis[Z667G - 4.3] FAILED
      java.lang.NoClassDefFoundError: java.nio.charset.StandardCharsets
      at org.apache.cordova.test.CordovaResourceApiTest$1.handleOpenForRead(CordovaResourceApiTest.java:71)

      org.apache.cordova.test.HtmlNotFoundTest > testUrl[Z667G - 4.3] FAILED
      junit.framework.AssertionFailedError
      at org.apache.cordova.test.HtmlNotFoundTest.testUrl(HtmlNotFoundTest.java:43)
      :connectedDebugAndroidTest FAILED

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              IgorGanapolsky Igor Ganapolsky
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: