Comments (13)
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.
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.
Does this solve you issue?
Can I close this one?
from calabash-android.
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.
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.
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.
Yes we are.
I think we should keep the convention but move the responsibility for uninstalling and installing into the steps.
from calabash-android.
I removed the cucumber folder and cucumber-jruby from the commit history to save us 16MB.
*** Please rebase ***
from calabash-android.
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.
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.
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.
Test server life cycle is now handled by Calabash
from calabash-android.
@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)
- Can't run first test
- Gem::ConflictError HOT 13
- Canβt support Flutter HOT 2
- NullObjectReference in Xamarin.UITest 3.0 HOT 2
- Calabash Instrumentation fail due to UnsatisfiedLinkError HOT 1
- How to run scenario again if it fails? HOT 2
- Android Q Support HOT 11
- Touches on list item in AlertDialog works intermittently
- This path split not support windows
- INJECT_EVENTS permission issue HOT 2
- Unable resign the apk file- Showing the alert as "No such file or directory - "C:/android-sdks/platform-tools/aapt" HOT 2
- Undefined method `feature' for #<Cucumber HOT 2
- META-INF CERT.RSA not detected HOT 9
- Errors attempting to use UiAutomator2 features HOT 1
- Calabash roadmap
- set_selection(-1, -1) unsuccessful on android 10 on some pop up view
- Facing issue in command reinstall_apps, ruby
- Calabash-android resign with signature scheme v2 HOT 1
- GitHub Security Lab (GHSL) Vulnerability Report: GHSL-2022-095
- HTTPClient::KeepAlive Disconnected - Cucumber 8.0.0 & 7.1.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calabash-android.