rcbop / ios-ci-demo

iOS example app ready for Jenkins Continuous Integration with Calabash E2E tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ios-ci-demo

iOS example app ready for Continuous Integration with Calabash E2E tests Some Jenkins job configuration examples bellow

##Running Unit tests from Jenkins

TARGET = { MyCIDemoTests } BUILD_CONFIGURATION = { Debug-BR, Debug-AG, Debug-US }

echo ">> RUNNING AUTOMATED TESTS"
/usr/local/bin/xctool \
 -scheme MyCIDemoUnitTestBR \
 -sdk iphonesimulator \
 -configuration ${BUILD_CONFIGURATION} \
 -reporter pretty \
 -reporter junit:test-results.xml \
 -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' \
 test -only "${TARGET}" || echo '>> TEST EXECUTION FAILED'

Packaging Calabash features for AWS Device Farm upload

if [[ $RUN_CALABASH == "true" ]]; then
    echo ">> PACKING CALABASH TESTS"
    /usr/bin/zip -r "tests.zip" features
    SCHEME="MyCIDemoBR-calabash"
fi

##Archiving and packaging IPA Use Calabash scheme SCHEME = "MyCIDemoBR-calabash"

xcodebuild -scheme ${SCHEME} archive \
 -archivePath ${WORKSPACE}/MyCiDemo.xcarchive 
 
# erase old generated builds
rm -rf *.ipa

PROJECT_NAME=MyCIDemo

/usr/bin/xcrun -sdk iphoneos PackageApplication \
	-v "${WORKSPACE}/MyCiDemo.xcarchive/Products/Applications/${PROJECT_NAME}.app" \
    -o "${WORKSPACE}/${PROJECT_NAME}-${BUILD_NUMBER}.ipa" \

##Running Calabash features locally

 # install calabash sandbox
 curl -sSL https://raw.githubusercontent.com/calabash/install/master/install-osx.sh | bash
 # enters calabahs sandbox
 calabash-sandbox 
 # runs sample feature
 bundle exec cucumber

About

iOS example app ready for Jenkins Continuous Integration with Calabash E2E tests

License:MIT License


Languages

Language:Objective-C 58.4%Language:Swift 30.4%Language:Ruby 10.5%Language:Gherkin 0.8%