Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Add support for on-device testing with Calabash (or another similar tool) #123

Open
pascalw opened this issue Dec 9, 2016 · 4 comments
Open

Comments

@pascalw
Copy link
Member

pascalw commented Dec 9, 2016

Capybara/Rspec is simple, but running tests on real devices is much better.

The project template should include a Calabash example spec.

@pascalw pascalw added this to the 2.0.0 milestone Dec 9, 2016
@pascalw
Copy link
Member Author

pascalw commented Jan 19, 2017

Having used Calabash I'm not sure Calabash is a great fit for Maji. calabash-ios and calabash-android have very different API's which means cucumber steps need to be implemented twice, once for each platform. Also calabash-android is pretty limited, especially with regards to interacting with webviews.

Appium on the other hand seems to abstracts the platform much better. I was able to write a single spec that directly interacts with the Cordova webview, without having to write any special code for a specific platform.

However there are a couple of cons for Appium as well:

  • Documentations is pretty bad. There's lots of it but very cluttered.
  • Appium Node.js doesn't run on AWS device farm, nor Xamarin test cloud. Source labs does support Appium but seems to run on simulators only.
  • Doesn't seem very stable. Running the same specs a couple of times usually Appium fails to launch the app 1 out of 3 times.

Food for thought.

@pascalw
Copy link
Member Author

pascalw commented Jan 19, 2017

Given what I said above a full comparison between Appium and Calabash.

Calabash:
Pro:

  • Runs on AWS device farm without much effort
  • Cucumber is pretty familiar to us

Con:

  • Android and iOS are not properly abstracted, requires writing test cases separately per platform
  • Integrating into Maji is a pain. For iOS it requires injecting the Calabash instrumentation library which can be done using a Cordova plugin but that plugin should be only be injected in test builds.
  • Android support in Calabash in general is pretty limited and seems to be an afterthought
  • Documentation is very limited

Appium:
Pro:

  • Abstracts away platform differences, only have to write test cases once
  • Tests can be written with mocha, again pretty familiar
  • Easy to integrate in Maji. Couple of npm dependencies and pointing appium to cordova builds.

Con:

  • Doesn't run on AWS device farm
  • Documentation is quite cluttered and not very clear

All in all both have quite severe cons :-(

@pascalw
Copy link
Member Author

pascalw commented Jan 19, 2017

One more thing to consider:

  • AWS device farm does support Appium with Python and Java. Writing tests in these languages would be possible, but obviously doesn't fit very well with the Maji stack.

@pascalw pascalw removed this from the 2.0.0 milestone Feb 1, 2017
@pascalw pascalw changed the title Replace Capybara/Rspec with Calabash Add support for on-device testing with Calabash (or another similar tool) Oct 3, 2017
@pascalw
Copy link
Member Author

pascalw commented Oct 3, 2017

Reworded this issue since with Maji 3 we no longer have capybara and rspec.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant