Not starting Sim

83 views
Skip to first unread message

Cory R.

unread,
Aug 30, 2010, 7:01:55 PM8/30/10
to iCuke

Hi Gang-

I'm trying to start up my application, and its just timing out similar
to Tim's. I tried what he did and to no avail.

First of all, I'm cool with debugging on my own, just wondering if
there was a way to turn on a higher level of debugging than what it
includes. I figured if it was trying to do something that was illegal
or couldn't find something that was needed, that might help me but it
just seems to time out.

Here's the steps I've tried:

Install the gems
run "icuke ." in my project file.
make sure my project is built
edit the features/example.feature is pointed to my project file.

run "cucumber" in my app folder.

30 seconds....

Feature: User posts to their blog
In order post to my blog while I'm travelling
As an author
I want to publish posts from my iPhone

Background: #
features/example.feature:6
2010-08-30 16:00:19.890 xcodebuild[26634:80f] GTMXcodePlugin loaded
(10.0.6.0)
Given "xxxx.xcodeproj" is loaded in the iphone simulator #
iCuke-0.6.3/lib/icuke/cucumber.rb:197
execution expired (Timeout::Error)

I'm assuming that it doesn't matter what my app is and what the steps
are, this should at least start up the sim, right?

Help? This looksto be EXTREMELY promising as a test tool

Cory R.

unread,
Aug 31, 2010, 10:33:27 PM8/31/10
to iCuke

Turns out it was just not finding the right file and not complaining.

Next questions:

- Can I pause and let the application do its thing? For example, it
may take a moment for my application to finish loading something from
the network, can I tell cucumber to wait?

- Is there an equivalent of XPath in Cucumber/ICuke? If I have 2
things marked "Ok" which do I click?

Again, very cool

dloft

unread,
Sep 1, 2010, 1:00:33 PM9/1/10
to iCuke
On Aug 31, 7:33 pm, "Cory R." <penguin...@gmail.com> wrote:
> - Can I pause and let the application do its thing? For example, it
> may take a moment for my application to finish loading something from
> the network, can I tell cucumber to wait?

Here are a couple step definitions that might help. Put these into a
file such as ./features/step_definitions/wait_steps.rb:

Given "a short wait" do
sleep 2
end

Given /^a (.*) second wait$/ do |sec|
sleep sec.to_i
end

You can then write tests like:

When I tap "Load"
Given a short wait
Then I should see "Done"

or

When I tap "Load large file"
Given a 10 second wait
Then I should see "File loaded"

Dave

Cory Radcliff

unread,
Sep 1, 2010, 1:55:40 PM9/1/10
to ic...@googlegroups.com

Thanks Dave-

I had already added to the Cucumber install that I have, but I figure its better in the wait steps file.

Any plans (to the group) to do loops or anything? I can see this being valuable:

While I do not see "bananas" in 5 seconds
Then wait 1 second

This would check the screen every second for 5 seconds for the element "bananas"
Reply all
Reply to author
Forward
0 new messages