A wrapper for the Calabash testing framework for use with Titanium Mobile
Yes. Calabash for Appcelerator Titanium (vanilla and Alloy) iOS and Android This includes to physical devices as well as Simulators/Emulators
Install the module with:
npm install -g ticalabash
Enter the password you normally enter for
sudo when requested.
sudo npm install yourself, because it is bad practise and will break the installation process. It's better to correctly set the permissions on the
/usr/local directory instead, so you don't have to ever use
sudo again when installing npm packages.
sudo chown -R $USER /usr/local
To test TiCalabash, create a default Alloy application and run:
ti calabash --platform=[android,ios]
After lots of compiling, you should see:
Feature: Home ScreenAs an App DeveloperI want to see an example feature work on a default alloy appSo that I can start using TiCalabash quicklyScenario: See Home Screen # features/home_screen.feature:6Given I am on the Home Screen # features/step_definitions/ticalabash_custom_steps.rb:1Then I should see text containing "Hello, World" # calabash-cucumber-0.11.3/features/step_definitions/calabash_steps.rb:384And take picture # calabash-cucumber-0.11.3/features/step_definitions/calabash_steps.rb:2291 scenario (1 passed)3 steps (3 passed)
The picture/screenshot is named
screenshot_X.png and can be found in:
(The iOS documentation is far superior to the Android documentation and is mostly valid for Android as well).
If you don't have a features directory at the project root level, it will be created.
ti calabash command will rebuild your Android or iOS app every time.
Querying your UI
Recording of touches is currently not supported, for two reasons:
The following slide deck may be of use: TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014
If you want to integrate TiCalabash in Jenkins, use the following configuration:
cd ~/Desktop/ticonf2014testappdemo/alloytest # or actually pull from git.titanium clean titanium build --platform=iphone --test &sleep 30killall "iPhone Simulator"export PATH=“/Users/andrewmcelroy/.rbenv/shims:/Users/andrewmcelroy/bin:/usr/local/bin: /Users/andrewmcelroy/.rbenv/bin:/Users/andrewmcelroy/android/tools:/Users/andrewmcelroy/android/: /Users/andrewmcelroy/android//tools:/Users/andrewmcelroy/android/platform-tools/:/usr/bin:/bin: /usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:"echo | titanium calabash —platform=iphonecd ~/Library/Application Support/iPhone Simulator/7.1/Applications/AppGUID = $(ﬁnd . -name "alloytest" | cut -d "/" -f 2)cp "~/Library/Application Support/iPhone Simulator/7.1/Applications/$AppGUID/Documents/jenkins.xml" $WORKSPACE/jenkins.xml
Make sure you replace the folders with the actual folders on your system.
soon. A strider module that seamlessly integrates with TiCalabash is coming whenever Andrew can finish the module.
Training by Codex Labs for TiCalabash is in the planning stage.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.
1.1.2 - Updated calabash-android to 0.5.5 and calabash-cucumber to 0.12.2 ( iOS 8 compatibility) 1.0.4 - Added Sample features 1.0.0 - TiCalabash wraps calabash
License: MIT (c) 2014 Matt Apperson / Apperson Labs Andrew McElroy / Codex Labs, LLC