{"id":6454,"date":"2014-02-07T17:33:31","date_gmt":"2014-02-07T14:33:31","guid":{"rendered":"http:\/\/railsware.com\/blog\/?p=6454"},"modified":"2021-08-16T13:51:30","modified_gmt":"2021-08-16T10:51:30","slug":"ios-acceptance-testing-with-calabash-and-rspec","status":"publish","type":"post","link":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/","title":{"rendered":"iOS acceptance testing with Calabash and Rspec"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">While investigating existing automated tools for mobile TDD, we have run into a well-documented and supported library by Xamarin. It&#8217;s called calabash, comes with iOS and Android support and has a wide scope of supported user actions, gestures and expectations.<br>The only drawback we found significant is lack of native Rspec support (cucumber only for now).<br>This post provides a simple tutorial for using calabash with Rspec to test your iOS applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Overview<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Calabash library including \u0441ucumber step definitions is aggregated within single gem <a title=\"calabash-cucumber\" href=\"https:\/\/rubygems.org\/gems\/calabash-cucumber\" target=\"_blank\" rel=\"noopener\">calabash-cucumber<\/a>.<br>Basic tutorial for integrating your project with Calabash testing tool is well described <a href=\"https:\/\/github.com\/calabash\/calabash-ios\" target=\"_blank\" rel=\"noopener\">here<\/a>.<br>We use mixed approach for initial setup by adding <a href=\"http:\/\/cocoapods.org\/?q=on%3Aios%20calabash\" target=\"_blank\" rel=\"noreferrer noopener nofollow\" title=\"Calabash pod\">Calabash pod<\/a> and manually copying main project target in Xcode.<br>As cucumber is a primary framework coming out of the box, some additional steps are required to use it with Rspec.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setting up Rspec environment<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First of all install rspec gem and initialize your project:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gem install rspec \/\/or use Gemfile\nrspec --init\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will generate the following file structure:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>.\/spec folder for all your test examples.<\/li><li>.\/spec\/spec_helper.rb file for all configuration and initial setup stuff.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Using predefined cucumber setup and a bit of source investigation, we came up with the following definitions within spec_helper.rb:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">require 'sim_launcher'\nrequire 'calabash-cucumber\/operations'\n\ninclude Calabash::Cucumber::Core\ninclude Calabash::Cucumber::TestsHelpers\ninclude Calabash::Cucumber::WaitHelpers\ninclude Calabash::Cucumber::KeyboardHelpers\n\nRSpec.configure do |config|\n  config.treat_symbols_as_metadata_keys_with_true_values = true\n  config.run_all_when_everything_filtered = true\n  config.filter_run :focus\n  config.order = 'random'\n\n  config.before do\n    @calabash_launcher = Calabash::Cucumber::Launcher.new\n    unless @calabash_launcher.calabash_no_launch?\n      @calabash_launcher.relaunch\n      @calabash_launcher.calabash_notify(self)\n    end\n  end\n\n  config.before(:each) do\n    element_exists('view')\n  end\n\n  config.after do\n    unless @calabash_launcher.calabash_no_stop?\n      calabash_exit\n      @calabash_launcher.stop if @calabash_launcher.active?\n    end\n  end\nend\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A before hook was set up to wait for any view to appear &#8211; such trick is required to avoid stupid failures because of initial simulator startup delay.<br>There are a few additional method definitions required to make this setup work:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">def escape_quotes(str)\n  str.gsub(\"'\", \"\\\\\\\\'\")\nend\n  \n#### emulate cucumber reports\ndef embed(path, type, label)\n  p \"storing report: #{path} (type: #{type}, label:#{label})\"\nend\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can add them to your spec_helper.rb.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Sugarize it<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Basic ruby modules included in calabash-cucumber gem have predefined steps for<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>querying elements<\/li><li>performing actions\/gestures<\/li><li>matching expectations<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We have added simple wrapper methods to make test examples readable and DRY.<br>Here are some examples that are used in our test scenarios:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><b>Step definitions<\/b><\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">module StepHelper\n  WAIT_TIMEOUT = (ENV['WAIT_TIMEOUT'] || 30).to_f\n  STEP_PAUSE = (ENV['STEP_PAUSE'] || 0.5).to_f\n\n  def wait_to_see_view(expected_mark)\n    wait_for_elements_exist([marked_view_query_string(expected_mark)], :timeout =&gt; WAIT_TIMEOUT)\n  end\n\n  #Touches\n  def touch_the_button(name)\n    touch(\"button marked:'#{name}'\")\n    sleep(STEP_PAUSE)\n  end\n\n  def touch_view(expected_mark)\n    touch(marked_view_query_string(expected_mark))\n    sleep(STEP_PAUSE)\n  end\n\n  def go_back\n    touch(\"navigationItemButtonView first\")\n    sleep(STEP_PAUSE)\n  end\n\n  #Waiting\n  def wait_for_seconds(seconds)\n    sleep seconds.to_f\n  end\n\n  #Inputs\n  def enter_text_into_textfield_by_placeholder(text_to_type, placeholder)\n    touch(\"textField placeholder:'#{placeholder}'\")\n    keyboard_enter_text(text_to_type)\n    sleep(STEP_PAUSE)\n  end\n\n  def enter_text_into_textfield_by_label(text_to_type, label)\n    touch(\"textField marked:'#{label}'\")\n    keyboard_enter_text(text_to_type)\n    sleep(STEP_PAUSE)\n  end\n\n  def marked_view_query_string(expected_mark)\n    \"view marked:'#{expected_mark}'\"\n  end\n\n  ...\n\nend\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em><b>Custom matchers<\/b><\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">RSpec::Matchers.define :show_view do |expected_mark|\n  match do\n    (element_exists( \"view marked:'#{expected_mark}'\" ) or\n     element_exists( \"view text:'#{expected_mark}'\"))\n  end\n\n  failure_message_for_should do\n    \"No visible view marked '#{expected_mark}' found\"\n  end\n\n  failure_message_for_should_not do\n    \"Found visible view marked '#{expected_mark}'\"\n  end\nend\n\nRSpec::Matchers.define :show_error_alert do |expected_error_message|\n  match do\n    error_message = query(\"view className:'UIAlertView' label className:'UILabel'\", :text).first\n    error_message == expected_error_message\n  end\n\n  failure_message_for_should do\n    \"No alert with text '#{expected_error_message}' found\"\n  end\n\n  failure_message_for_should_not do\n    \"Found visible alert with text '#{expected_error_message}'\"\n  end\nend\n\n...\n\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Adding Rspec support for your acceptance testing using calabash library is really simple.<br>Approach described above helped us to build and support application test coverage for wide variety of flows and interactions.<br>Here is a short example on login flow test scenario:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">...\n\nshared_examples_for \"login error\" do\n  it do\n    should show_error_alert(alert_error_message)\n    should_not show_view('Asset list zero case')\n  end\nend\n\n...\n\ndescribe \"login error\" do\n  before do\n    navigate_to_login_screen\n    stub_api_request_with_error(\"POST\", \"\/users\/sign_in\", error_message);\n    submit_login_form\n  end\n\n  context \"wrong credentials\" do\n    let(:error_message) {'login_failed'}\n    let(:alert_error_message) {wrong_email_or_password_error_message}\n\n    it_should_behave_like \"login error\"\n  end\n\n  context \"server exception\/unavailable\" do\n    let(:error_message) {'some_error_message'}\n    let(:alert_error_message) {server_unavailable_error_message}\n\n    it_should_behave_like \"login error\"\n  end\nend\n\n...\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Using Rspec instead of cucumber gives you a better opportunity to setup context of test examples.<br>It&#8217;s also very important to use any CI server you prefer as it takes some time for full test coverage to run.<br>Do not hesitate to add your own step definitions and matchers to keep your test examples readable, DRY and clean.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While investigating existing automated tools for mobile TDD, we have run into a well-documented and supported library by Xamarin. It&#8217;s called calabash, comes with iOS and Android support and has a wide scope of supported user actions, gestures and expectations.The only drawback we found significant is lack of native Rspec support (cucumber only for now).This&#8230;<\/p>\n","protected":false},"author":50,"featured_media":7447,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[3],"tags":[],"coauthors":["Roman Bilous"],"class_list":["post-6454","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"While investigating existing automated tools for mobile TDD, we have run into a well-documented and supported library by Xamarin. It&#039;s called calabash, comes with iOS and Android support and has a wide scope of supported user actions, gestures and expectations.The only drawback we found significant is lack of native Rspec support (cucumber only for now).This\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"Roman Bilous\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"| Blog on Engineering, Product Management, Transparency, Culture and many more...\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"iOS acceptance testing with Calabash and Rspec | Railsware Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"While investigating existing automated tools for mobile TDD, we have run into a well-documented and supported library by Xamarin. It&#039;s called calabash, comes with iOS and Android support and has a wide scope of supported user actions, gestures and expectations.The only drawback we found significant is lack of native Rspec support (cucumber only for now).This\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2014\/02\/Roma-1.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2014\/02\/Roma-1.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2014-02-07T14:33:31+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-08-16T10:51:30+00:00\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#article\",\"name\":\"iOS acceptance testing with Calabash and Rspec | Railsware Blog\",\"headline\":\"iOS acceptance testing with Calabash and Rspec\",\"author\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/author\\\/roman-bilous\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/02\\\/Roma-1.png\",\"width\":150,\"height\":150},\"datePublished\":\"2014-02-07T17:33:31+03:00\",\"dateModified\":\"2021-08-16T13:51:30+03:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#webpage\"},\"articleSection\":\"Engineering\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/railsware.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/category\\\/development\\\/#listItem\",\"name\":\"Engineering\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/category\\\/development\\\/#listItem\",\"position\":2,\"name\":\"Engineering\",\"item\":\"https:\\\/\\\/railsware.com\\\/blog\\\/category\\\/development\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#listItem\",\"name\":\"iOS acceptance testing with Calabash and Rspec\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#listItem\",\"position\":3,\"name\":\"iOS acceptance testing with Calabash and Rspec\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/category\\\/development\\\/#listItem\",\"name\":\"Engineering\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/#organization\",\"description\":\"Blog on Engineering, Product Management, Transparency, Culture and many more...\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/Logo-circle.png\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#organizationLogo\",\"width\":3137,\"height\":1054,\"caption\":\"Railsware logo\"},\"image\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/author\\\/roman-bilous\\\/#author\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/author\\\/roman-bilous\\\/\",\"name\":\"Roman Bilous\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#authorImage\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/author-image-default-96x96.jpg\",\"width\":96,\"height\":96,\"caption\":\"Roman Bilous\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#webpage\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/\",\"name\":\"iOS acceptance testing with Calabash and Rspec | Railsware Blog\",\"description\":\"While investigating existing automated tools for mobile TDD, we have run into a well-documented and supported library by Xamarin. It's called calabash, comes with iOS and Android support and has a wide scope of supported user actions, gestures and expectations.The only drawback we found significant is lack of native Rspec support (cucumber only for now).This\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/author\\\/roman-bilous\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/author\\\/roman-bilous\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/02\\\/Roma-1.png\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#mainImage\",\"width\":150,\"height\":150},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ios-acceptance-testing-with-calabash-and-rspec\\\/#mainImage\"},\"datePublished\":\"2014-02-07T17:33:31+03:00\",\"dateModified\":\"2021-08-16T13:51:30+03:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/\",\"description\":\"Blog on Engineering, Product Management, Transparency, Culture and many more...\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"iOS acceptance testing with Calabash and Rspec | Railsware Blog","description":"While investigating existing automated tools for mobile TDD, we have run into a well-documented and supported library by Xamarin. It's called calabash, comes with iOS and Android support and has a wide scope of supported user actions, gestures and expectations.The only drawback we found significant is lack of native Rspec support (cucumber only for now).This","canonical_url":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#article","name":"iOS acceptance testing with Calabash and Rspec | Railsware Blog","headline":"iOS acceptance testing with Calabash and Rspec","author":{"@id":"https:\/\/railsware.com\/blog\/author\/roman-bilous\/#author"},"publisher":{"@id":"https:\/\/railsware.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2014\/02\/Roma-1.png","width":150,"height":150},"datePublished":"2014-02-07T17:33:31+03:00","dateModified":"2021-08-16T13:51:30+03:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#webpage"},"isPartOf":{"@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#webpage"},"articleSection":"Engineering"},{"@type":"BreadcrumbList","@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/railsware.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog\/category\/development\/#listItem","name":"Engineering"}},{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog\/category\/development\/#listItem","position":2,"name":"Engineering","item":"https:\/\/railsware.com\/blog\/category\/development\/","nextItem":{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#listItem","name":"iOS acceptance testing with Calabash and Rspec"},"previousItem":{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#listItem","position":3,"name":"iOS acceptance testing with Calabash and Rspec","previousItem":{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog\/category\/development\/#listItem","name":"Engineering"}}]},{"@type":"Organization","@id":"https:\/\/railsware.com\/blog\/#organization","description":"Blog on Engineering, Product Management, Transparency, Culture and many more...","url":"https:\/\/railsware.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2020\/11\/Logo-circle.png","@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#organizationLogo","width":3137,"height":1054,"caption":"Railsware logo"},"image":{"@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/railsware.com\/blog\/author\/roman-bilous\/#author","url":"https:\/\/railsware.com\/blog\/author\/roman-bilous\/","name":"Roman Bilous","image":{"@type":"ImageObject","@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#authorImage","url":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2021\/06\/author-image-default-96x96.jpg","width":96,"height":96,"caption":"Roman Bilous"}},{"@type":"WebPage","@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#webpage","url":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/","name":"iOS acceptance testing with Calabash and Rspec | Railsware Blog","description":"While investigating existing automated tools for mobile TDD, we have run into a well-documented and supported library by Xamarin. It's called calabash, comes with iOS and Android support and has a wide scope of supported user actions, gestures and expectations.The only drawback we found significant is lack of native Rspec support (cucumber only for now).This","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/railsware.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#breadcrumblist"},"author":{"@id":"https:\/\/railsware.com\/blog\/author\/roman-bilous\/#author"},"creator":{"@id":"https:\/\/railsware.com\/blog\/author\/roman-bilous\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2014\/02\/Roma-1.png","@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#mainImage","width":150,"height":150},"primaryImageOfPage":{"@id":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/#mainImage"},"datePublished":"2014-02-07T17:33:31+03:00","dateModified":"2021-08-16T13:51:30+03:00"},{"@type":"WebSite","@id":"https:\/\/railsware.com\/blog\/#website","url":"https:\/\/railsware.com\/blog\/","description":"Blog on Engineering, Product Management, Transparency, Culture and many more...","inLanguage":"en-US","publisher":{"@id":"https:\/\/railsware.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"| Blog on Engineering, Product Management, Transparency, Culture and many more...","og:type":"article","og:title":"iOS acceptance testing with Calabash and Rspec | Railsware Blog","og:description":"While investigating existing automated tools for mobile TDD, we have run into a well-documented and supported library by Xamarin. It's called calabash, comes with iOS and Android support and has a wide scope of supported user actions, gestures and expectations.The only drawback we found significant is lack of native Rspec support (cucumber only for now).This","og:url":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/","og:image":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2014\/02\/Roma-1.png","og:image:secure_url":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2014\/02\/Roma-1.png","og:image:width":150,"og:image:height":150,"article:published_time":"2014-02-07T14:33:31+00:00","article:modified_time":"2021-08-16T10:51:30+00:00"},"aioseo_meta_data":{"post_id":"6454","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"aioseo-article-6385f5b1aa0f7","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":{"locations":{"business":{"name":"","businessType":"","image":"","areaServed":"","urls":{"website":"","aboutPage":"","contactPage":""},"address":{"streetLine1":"","streetLine2":"","zipCode":"","city":"","state":"","country":"","addressFormat":"#streetLineOne\n#streetLineTwo\n#city, #state #zipCode"},"contact":{"email":"","phone":"","phoneFormatted":"","fax":"","faxFormatted":""},"ids":{"vat":"","tax":"","chamberOfCommerce":""},"payment":{"priceRange":"","currenciesAccepted":"","methods":""}}},"openingHours":{"useDefaults":true,"show":true,"alwaysOpen":false,"use24hFormat":false,"timezone":"","labels":{"closed":"","alwaysOpen":""},"days":{"monday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"tuesday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"wednesday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"thursday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"friday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"saturday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"sunday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"}}}},"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-01-04 12:44:29","updated":"2025-09-26 11:20:39","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/railsware.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/railsware.com\/blog\/category\/development\/\" title=\"Engineering\">Engineering<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tiOS acceptance testing with Calabash and Rspec\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/railsware.com\/blog"},{"label":"Engineering","link":"https:\/\/railsware.com\/blog\/category\/development\/"},{"label":"iOS acceptance testing with Calabash and Rspec","link":"https:\/\/railsware.com\/blog\/ios-acceptance-testing-with-calabash-and-rspec\/"}],"reading_time":"4 min read","categories_data":[{"name":"Engineering","link":"https:\/\/railsware.com\/blog?category=development"}],"post_thumbnails":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2014\/02\/Roma-1.png","article_background":"","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/6454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/users\/50"}],"replies":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/comments?post=6454"}],"version-history":[{"count":55,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/6454\/revisions"}],"predecessor-version":[{"id":14115,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/6454\/revisions\/14115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/media\/7447"}],"wp:attachment":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/media?parent=6454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/categories?post=6454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/tags?post=6454"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/coauthors?post=6454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}