amazon-web-servicescalabashcalabash-androidaws-device-farm

Why am I getting this error in AWS Device farm? Tests skipped due to test package parsing error. Please check Parsing result for more details


In AWS Device Farm, I created a new run. I chose native application. I uploaded my APK. I chose Calabash as the tests. I got this error message:

Tests skipped due to test package parsing error. Please check Parsing result for more details.

I downloaded the Parsing result. Here's what it said:

Failed to run cucumber dry-run command. See the information below for more details.

Here are the contents for the Parsing result:

'cucumber --dry-run --format json --out /tmp/scratchvxnAeX.scratch/tmpF6f5Xx' failed.    
Could not find proper version of cucumber (2.99.0) in any of the sources    
Run `bundle install` to install missing gems.

Solution

  • Solution

    I have some .rb page objects. I added require 'calabash-android' to the top of those files. Then I made a new run and ran it. It worked.

    How I got to the solution

    Through Google I came across CALABASH_TEST_PACKAGE_DRY_RUN_FAILED here.

    Running this command failed: cucumber-ios --dry-run --format json features

    I figured that was for ios. So I tried this: bundle exec calabash-android run .\app-releaseStaging.apk --dry-run. I got this error:

    uninitialized constant Calabash::ABase (NameError)
    

    I wasn't getting that error when running locally.

    According to this:

    -d, --dry-run Invokes formatters without executing the steps. This also omits the loading of your support/env.rb file if it exists.

    I had require 'calabash-android' inside env.rb. So I moved it to my page objects. Then it worked.

    You may find the aws-device-farm-calabash-tests-for-sample-app useful.