Menu
AWS Device Farm
Developer Guide (API Version 2015-06-23)

Troubleshooting Calabash Tests in AWS Device Farm

The following topic lists error messages that occur during the upload of Calabash tests and recommends workarounds to resolve each error.

CALABASH_TEST_PACKAGE_UNZIP_FAILED_UNZIP_FAILED

If you see the following message, follow these steps to fix the issue.

Warning

We could not open your test ZIP file. Please verify that the file is valid and try again.

Make sure that you can unzip the test package without errors. In the following example, the package's name is features.zip.

  1. Copy your test package to your working directory, and then run the following command:

    Copy
    $ unzip features.zip
  2. After you successfully unzip the package, you can find the working directory tree structure by running the following command:

    Copy
    $ tree .

    A valid Calabash package should produce output like the following:

    Copy
    . `-- features (directory) |-- my-feature-1-file-name.feature |-- my-feature-2-file-name.feature |-- my-feature-N-file-name.feature |-- step_definitions (directory) | `-- (.rb files) |-- support (directory) | `-- (.rb files) `-- (any other supporting files)

    For more information, see Calabash or Calabash.

CALABASH_TEST_PACKAGE_FEATURES_DIR_MISSING_FEATURES_DIR_MISSING

If you see the following message, follow these steps to fix the issue.

Warning

We could not find the features directory inside your test package tree. Please unzip your test package, verify that the features directory is inside the package, and try again.

In the following example, the package's name is features.zip.

  1. Copy your test package to your working directory, and then run the following command:

    Copy
    $ unzip features.zip
  2. After you successfully unzip the package, you can find the working directory tree structure by running the following command:

    Copy
    $ tree .

    If the Calabash package is valid, you will find the features directory inside the working directory.

    Copy
    . `-- features (directory) |-- my-feature-1-file-name.feature |-- my-feature-2-file-name.feature |-- my-feature-N-file-name.feature |-- step_definitions (directory) | `-- (.rb files) |-- support (directory) | `-- (.rb files) `-- (any other supporting files)

    For more information, see Calabash or Calabash.

CALABASH_TEST_PACKAGE_FEATURE_FILE_MISSING

If you see the following message, follow these steps to fix the issue.

Warning

We could not find a .feature file in the features directory tree. Please unzip your test package and open the features directory, verify that at least one .feature file is in the directory, and try again.

In the following example, the package's name is features.zip.

  1. Copy your test package to your working directory, and then run the following command:

    Copy
    $ unzip features.zip
  2. After you successfully unzip the package, you can find the working directory tree structure by running the following command:

    Copy
    $ tree .

    If the Calabash package is valid, you will find at least one .feature file inside the features directory.

    Copy
    . `-- features (directory) |-- my-feature-1-file-name.feature |-- my-feature-2-file-name.feature |-- my-feature-N-file-name.feature |-- step_definitions (directory) | `-- (.rb files) |-- support (directory) | `-- (.rb files) `-- (any other supporting files)

    For more information, see Calabash or Calabash.

CALABASH_TEST_PACKAGE_STEP_DEFINITIONS_DIR_MISSING

If you see the following message, follow these steps to fix the issue.

Warning

We could not find the step_definitions directory inside your test package. Please unzip your test package and open the features directory, verify that the step_definitions directory is inside the package, and try again.

In the following example, the package's name is features.zip.

  1. Copy your test package to your working directory, and then run the following command:

    Copy
    $ unzip features.zip
  2. After you successfully unzip the package, you can find the working directory tree structure by running the following command:

    Copy
    $ tree .

    If the Calabash package is valid, you will find the step_definitions directory inside the features directory.

    Copy
    . `-- features (directory) |-- my-feature-1-file-name.feature |-- my-feature-2-file-name.feature |-- my-feature-N-file-name.feature |-- step_definitions (directory) | `-- (.rb files) |-- support (directory) | `-- (.rb files) `-- (any other supporting files)

    For more information, see Calabash or Calabash.

CALABASH_TEST_PACKAGE_SUPPORT_DIR_MISSING

If you see the following message, follow these steps to fix the issue.

Warning

We could not find the support directory inside your test package. Please unzip your test package and open the features directory, verify that the support directory is inside the package, and try again.

In the following example, the package's name is features.zip.

  1. Copy your test package to your working directory, and then run the following command:

    Copy
    $ unzip features.zip
  2. After you successfully unzip the package, you can find the working directory tree structure by running the following command:

    Copy
    $ tree .

    If the Calabash package is valid, you will find the support directory inside the features directory.

    Copy
    . `-- features (directory) |-- my-feature-1-file-name.feature |-- my-feature-2-file-name.feature |-- my-feature-N-file-name.feature |-- step_definitions (directory) | `-- (.rb files) |-- support (directory) | `-- (.rb files) `-- (any other supporting files)

    For more information, see Calabash or Calabash.

CALABASH_TEST_PACKAGE_RUBY_FILE_MISSING_IN_STEP_DEFINITIONS_DIR

If you see the following message, follow these steps to fix the issue.

Warning

We could not find a ruby file in the step_definitions directory tree. Please unzip your test package and open the step_definitions directory, verify that at least one ruby file is in the directory, and try again.

In the following example, the package's name is features.zip.

  1. Copy your test package to your working directory, and then run the following command:

    Copy
    $ unzip features.zip
  2. After you successfully unzip the package, you can find the working directory tree structure by running the following command:

    Copy
    $ tree .

    If the Calabash package is valid, you will find at least one ruby file inside the step_definitions directory.

    Copy
    . `-- features (directory) |-- my-feature-1-file-name.feature |-- my-feature-2-file-name.feature |-- my-feature-N-file-name.feature |-- step_definitions (directory) | |-- one-ruby.rb | |-- folder | | `-- another-ruby.rb | `-- (any other supporting files) |-- support (directory) | `-- (.rb files) `-- (any other supporting files)

    For more information, see Calabash or Calabash.

CALABASH_TEST_PACKAGE_RUBY_FILE_MISSING_IN_SUPPORT_DIR

If you see the following message, follow these steps to fix the issue.

Warning

We could not find a ruby file in the support directory tree. Please unzip your test package and open the support directory, verify that at least one ruby file is in the directory, and try again.

In the following example, the package's name is features.zip.

  1. Copy your test package to your working directory, and then run the following command:

    Copy
    $ unzip features.zip
  2. After you successfully unzip the package, you can find the working directory tree structure by running the following command:

    Copy
    $ tree .

    If the Calabash package is valid, you will find at least one ruby file inside the support directory.

    Copy
    . `-- features (directory) |-- my-feature-1-file-name.feature |-- my-feature-2-file-name.feature |-- my-feature-N-file-name.feature |-- step_definitions (directory) | `-- (.rb files) |-- support (directory) | |-- one-ruby.rb | |-- folder | | `-- another-ruby.rb | `-- (any other supporting files) `-- (any other supporting files)

    For more information, see Calabash or Calabash.

CALABASH_TEST_PACKAGE_EMBEDDED_SERVER_MISSING

If you see the following message, follow these steps to fix the issue.

Warning

We could not find the embedded server inside your test package. Please verify that the server is inside the package by running the command "calabash-ios check <path to your test package>", and try again after finding the calabash framework.

Calabash tests contain an embedded web server within the iOS application.

Make sure that the embedded web server is inside your iOS application. In the following example, the iOS application’s name is AWSDeviceFarmiOSReferenceApp.ipa.

  • Copy your iOS application to your working directory, and then run the following command:

    Copy
    $ calabash-ios check AWSDeviceFarmiOSReferenceApp.ipa

    A valid iOS application should produce output like the following:

    Copy
    Ipa: AWSDeviceFarmiOSReferenceApp.ipa *contains* calabash.framework 0.19.0

    For more information, see Calabash or Calabash.

CALABASH_TEST_PACKAGE_DRY_RUN_FAILED

If you see the following message, follow these steps to fix the issue.

Warning

We failed to quickly scan your .feature files. Please unzip your test package, verify that the files are valid by running the command "calabash --dry-run <path to your features directory>", and try again after the command does not print any error.

During the upload validation process, Device Farm quickly scans your features without actually running them.

Make sure that your features are valid. In the following example, the package's name is features.zip.

  1. Copy your test package to your working directory, and then run the following command:

    Copy
    $ unzip features.zip

    After you successfully unzip your package, you will find the features directory inside the working directory.

  2. To scan your features, run the following command:

    Copy
    $ cucumber-ios --dry-run --format json features

    A valid Calabash package should produce output like the following:

    Copy
    [ { "uri": "features/homepage.feature", "id": "home-page", "keyword": "Feature", "name": "Home Page", "description": " As a Device Farm user\n I would like to be able to see examples of testing a static homepage\n So I can apply it to my future tests.", "line": 1, "elements": [ { "id": "home-page;a-valid-homepage", "keyword": "Scenario", "name": "A Valid Homepage", "description": "", "line": 6, "type": "scenario", "steps": [ { "keyword": "Given ", "name": "that I navigate to the \"Home\" menu category", "line": 7, "match": { "location": "/Library/Ruby/Gems/2.0.0/gems/cucumber-2.4.0/lib/cucumber/step_match.rb:98" }, "result": { "status": "skipped", "duration": 16000 } } ] } ] } ]

    For more information, see Calabash or Calabash.