Sending arguments for a calabash package through the ruby VM...

Discussion in 'Ruby' started by kris.ring, Jun 19, 2013.

  1. kris.ring

    kris.ring Guest

    Hi all,

    So this question may not seem specific to Ruby - but I believe it is.

    I have set up RubyMine so that it can call Cucumber tests for Android apps with test written in calabash-cucumber.

    When I start the test, I am able to get the android emulator started, and the problem I am running in to is that in the calabash-android/helpers.rb file - there is a method that needs to receive the name of the package I am to send to calabash (to then load on to the device and start running the suite).

    In RubyMine I have tried to do this two ways so far:

    1 - In the Environment Variables for the test configuration in RubyMind adding a variable called package_name with value of the path to my android apkfile (no luck)

    2 - In the Ruby arguments I entered: 'package_name('/full/path/to/package.apk') which also did not give me any different results.

    Here is my stack trace that I get back, to me it is saying that there was not a package given to install and run tests on - so my question is given this information can anyone in this group tell me how to specify the package name for the method that is specified in the stack trace?

    Stack trace:

    /Users/kris/.rvm/rubies/ruby-1.9.3-p385/bin/ruby -EUTF-8 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift); /Users/kris/.rvm/gems/ruby-1.9.3-p385/bin/cucumber /Users/kris/sandbox/svn/m3d/calabash-common/features/announcements.feature --format Teamcity::Cucumber::Formatter --expand --color -r features
    Testing started at 3:47 PM ...
    Killing emulators forcefully
    Restarting adb
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    Waiting 600 seconds for emulator to be ready.
    Waiting for device to connect to adb
    Waiting for dev.bootcomplete property to be 1
    Waiting for sys.boot_completed to be 1
    Waiting for init.svc.bootanim to be stopped
    Waiting for package manager to start
    Exception in thread "main" java.io.FileNotFoundException: (No such file ordirectory)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:214)
    at java.util.zip.ZipFile.<init>(ZipFile.java:144)
    at java.util.jar.JarFile.<init>(JarFile.java:153)
    at java.util.jar.JarFile.<init>(JarFile.java:90)
    at ManifestExtractor.main(ManifestExtractor.java:19)
    Killing emulators
    undefined method `attributes' for nil:NilClass (NoMethodError)
    /Users/kris/.rvm/gems/ruby-1.9.3-p385/gems/calabash-android-0.4.6/lib/calabash-android/helpers.rb:13:in `package_name'
    /Users/kris/sandbox/svn/m3d/calabash-android/features/support/pearson_framework.rb:138:in `AfterConfiguration'


    Thank you for any help you can provide
     
    kris.ring, Jun 19, 2013
    #1
    1. Advertisements

  2. Why is a method with a parameter a problem?

    Cheers

    robert
     
    Robert Klemme, Jun 20, 2013
    #2
    1. Advertisements

  3. kris.ring

    krisring Guest

    I was able to solve this issue, chalk it up to being a rookie. However - I do have an instrumentation issue with the namespace of the calabash test server if anyone wants to help with that!
     
    krisring, Jan 9, 2014
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.