Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I have an iPad application which sends some data to our web application. With this data, you should be able to do different kind of things.

We have cucumber tests for the web application (Using cucumber, capybara and selenium) and few others for the ipad application (Using Frank).

I'm not sure how to approach testing both things at the same time. The ideal thing would be to put them both together as a cucumber test, but it doesn't seem trivial to me.

On the other hand, simulating the data sent from iPad would be easier, but not as reliable.

How do you test applications that mix both web and ios application?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

I didn't think what Kate purposed was a solution (IMO it's just a workaround), that's why I didn't accept it. After working more with Frank and cucumber, I just realized that you can actually mix Cucumber, Frank and Capybara (or some other replacement for Capybara).

require 'frank-cucumber'

require 'rspec/expectations'
require 'capybara'
require 'capybara/dsl'
require 'capybara/cucumber'
require File.dirname(__FILE__) + '/configuration'


# UIQuery is deprecated. Please use the shelley selector engine. 
Frank::Cucumber::FrankHelper.use_shelley_from_now_on
Frank::Cucumber::WaitHelper.const_set("TIMEOUT", 7)

# This constant must be set to the full, absolute path for your Frankified     target's app bundle.
# See the "Given I launch the app" step definition in launch_steps.rb for more details
APP_BUNDLE_PATH = File.expand_path(  .... )


Capybara.default_driver = :selenium

Capybara.app_host = "#{Configuration['server_url']}"
Capybara.current_session.driver.browser.manage.window.resize_to(2000, 2000)

World(Capybara)

Just requiring both works out of the box. So you can use visit from Capybara and launch the simulator from Frank in the same scenario.

share|improve this answer
add comment

This is the kind of scenario where I'd use a mix of automated and manual testing - manual testing using the iPad, because one thing GUI automation always does is simulate the human inputs. I've found that simulation often has crucial differences from actual input.

For automation, the crucial question here is where the data sent from the ios app is stored. If you're using a database - or any other kind of external data store - you don't need to do unified testing if these circumstances apply:

  1. You're starting your web and ios tests with a known database state, and;
  2. You're checking the data in your database after the test (or tests) are complete.

With database validation as part of your tests, you know that the Frank tests have successfully sent data, and you can then use a database with that data as the baseline for your web application tests.

This is the method I use to deal with testing across multiple applications regardless of what they're running on or what automation framework I'm using.

If your applications don't use a database or external data store but rely on live communication things get much more complex - I wouldn't try to offer suggestions on that without more information about how your application architecture is configured.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.