Giter Club home page Giter Club logo

Comments (13)

jonasmaturana avatar jonasmaturana commented on June 19, 2024

I'm doing something similar right now for the same reasons.

I'll make a commit later today

For the same reasons you describe I have been running cucumber by hand - no more JRuby.

from calabash-android.

jonasmaturana avatar jonasmaturana commented on June 19, 2024

Actually it is already on master.

Now Before scenario will start the instrumentation. And you can run:

TEST_PACKAGE_NAME=com.lesspainful.foo.test cucumber

from calabash-android.

jonasmaturana avatar jonasmaturana commented on June 19, 2024

Does this solve you issue?

Can I close this one?

from calabash-android.

scompt avatar scompt commented on June 19, 2024

That gets me part of the way. The other half is handled by a step definition that looks like this:

Given /^my app is running for the first time$/ do
    close_connection_to_test_server
    uninstallApp
    installApp
    startInstrumentation
end

I still need to integrate the master HEAD with my code. It looks like there won't be too many changes though.

Is there any reason to keep cucumber-jruby-1.0.0-SNAPSHOT-full.jar in the repo anymore? Is the ant test target used anymore?

from calabash-android.

jonasmaturana avatar jonasmaturana commented on June 19, 2024

At LessPainful we have been using the following convention:

  • Apps are reinstalled between features
  • Apps are restarted between scenarios

It has been working well for people but it would make sense to be reinstall it multiple times in a feature.

We added cucumber-jruby to make cucumber to people without Ruby installed but since we are not using it anymore I think we should remove it for now.

the test target still make sense for those who like using ant.

from calabash-android.

scompt avatar scompt commented on June 19, 2024

Are you doing the reinstalling/restarting outside of cucumber/ant? My goal is to get those functions into the step definitions so they can be easily used.

from calabash-android.

jonasmaturana avatar jonasmaturana commented on June 19, 2024

Yes we are.

I think we should keep the convention but move the responsibility for uninstalling and installing into the steps.

from calabash-android.

jonasmaturana avatar jonasmaturana commented on June 19, 2024

I removed the cucumber folder and cucumber-jruby from the commit history to save us 16MB.
*** Please rebase ***

from calabash-android.

scompt avatar scompt commented on June 19, 2024

That's great about getting rid of the cucumber folder. The repo is much smaller now.

I agree with your convention and having it in the steps. My fork has this right now, but I'm not too happy with the implementation. It starts the instrumentation in the Before hook and then reinstalls the app and restarts the instrumentation in the first step. It's very time consuming.

If starting the app becomes just another step, then the Before hook basically disappears. Instead of starting the instrumentation in the hook, it'll need to be done as part of the step, which necessitates some refactoring of hooks.rb.

from calabash-android.

jonasmaturana avatar jonasmaturana commented on June 19, 2024

I see your point.

How much time do you think you could save by changing this? (I just measured uninstall + install + launch to 8 seconds)
Do you reinstall the instrumentation as well?

Also, wouldn't this make your features dependent of each other?

from calabash-android.

jonasmaturana avatar jonasmaturana commented on June 19, 2024

I'll move the parts that installs, start and uninstalls the app into another support file.

That way you can just delete this file if you want to handle it from a step.

from calabash-android.

jonasmaturana avatar jonasmaturana commented on June 19, 2024

Test server life cycle is now handled by Calabash

from calabash-android.

jonasmaturana avatar jonasmaturana commented on June 19, 2024

@scompt You might want to look at implemented a "clear data"-step using something like

`#{adb_command} shell pm clear #{ENV["PACKAGE_NAME"]}`

Disclaimer: the snippet is 100% untested :P

from calabash-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.