I'm setting up a job on Jenkins to run
calabash-ios and return the results in
json but it fails while if I use the
pretty formatter, it works without problems. Cucumber returns
json successfuly if using my main account (r
enato.miguel) but fails on Jenkins (
jenkins account).
#!/bin/bash
source /Users/renato.miguel/.jenkins_profile
security unlock-keychain -p <password> /Users/Shared/Jenkins/Library/Keychains/login.keychain
rvm use 2.1.1@calabash
PROJECT="LPSimpleExample.xcodeproj"
CONFIG="Automated"
SCHEME="LPSimpleExample-cal"
SDK="iphonesimulator"
BUILDDIR="$WORKSPACE/BuildOutputDir"
OUTPUTDIR="$BUILDDIR/$CONFIG-$SDK"
APPNAME="LPSimpleExample"
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" clean build
DEVICE_TARGET=simulator DEVICE=iphone
cucumber -f json -o results.json -f pretty # this fails
Feature: Running a test
As an iOS developer
I want to have a sample feature file
So I can begin testing quickly
Scenario: Example steps # features/my_first.feature:6
Calabash::Cucumber::Launcher::StartError: Time out waiting for UIAutomation run-loop to Start.
Logfile /var/folders/0c/cxcfkb7n2fvc6vmwzn9sz26m000088/T/run_loop20140312-14889-r1qaod/run_loop.out
2014-03-12 15:49:34.008 ScriptAgent[15101:2f07] CLTilesManagerClient: initialize, sSharedTilesManagerClient
2014-03-12 15:49:34.008 ScriptAgent[15101:2f07] CLTilesManagerClient: init
2014-03-12 15:49:34.008 ScriptAgent[15101:2f07] CLTilesManagerClient: reconnecting, 0x10b609c40
2014-03-12 15:49:34.020 ScriptAgent[15101:2f07] AXError: Could not auto-register for pid status change
2014-03-12 15:49:34.023 ScriptAgent[15101:2f07] Failed to enable accessiblity, kAXErrorServerNotFound
(Calabash::Cucumber::Launcher::StartError)
/Users/renato.miguel/.rvm/gems/ruby-2.1.1@calabash/gems/calabash-cucumber-0.9.167/lib/calabash-cucumber/launcher.rb:386:in `new_run_loop'
/Users/renato.miguel/.rvm/gems/ruby-2.1.1@calabash/gems/calabash-cucumber-0.9.167/lib/calabash-cucumber/launcher.rb:313:in `relaunch'
/Users/Shared/Jenkins/Home/jobs/UI-Automation/workspace/features/support/01_launch.rb:29:in `Before'
Given I am on the Welcome Screen # features/step_definitions/my_first_steps.rb:1
Then I swipe left # calabash-cucumber-0.9.167/features/step_definitions/calabash_steps.rb:234
And I wait until I don't see "Please swipe left" # calabash-cucumber-0.9.167/features/step_definitions/calabash_steps.rb:165
And take picture # calabash-cucumber-0.9.167/features/step_definitions/calabash_steps.rb:229
Failing Scenarios:
cucumber features/my_first.feature:6 # Scenario: Example steps
1 scenario (1 failed)
4 steps (4 skipped)While writing this post, I've tried two more times to run this job. The first attempt. it generated successfuly the json. Second one failed as most of the times.