Monolith13 / beam_xcuitest_demo

Demo XCUITest for Beam app https://beamreddit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

This project contain iOS native UI-test for Beam app. Test based on XCUITest framework (engine) + XCfit (BDD) + Allure report (report).

Requirements

  • macOS ≥ 10.13.4
  • Xcode ≥ 9.4
  • Homebrew
  • Ruby ≥ 2.3
  • JDK ≥ 8

Preparation

  • Install xcfit with this command:

    sudo gem install xcfit

  • Install carthage from homebrew

    brew install carthage

  • Install allure-commandline from homebrew

    brew install allure

  • Install bundler gem and gems from bundle

    gem install bundler cd ~/beam_xcuitest_demo bundle install

  • Install swift dependencies via carthage

    cd ~/beam_xcuitest_demo carthage update

  • Edit SampleConfig.swift with the required values and rename it to Config.swift (API doc of reddit)

Run tests

Local run tests

> # First - manually boot iOS simulator e.g. iPhone 8 Plus 11.4
> cd ~/beam_xcuitest_demo
> xcodebuild -scheme "Xcode9-XCTest" -destination 'platform=iOS Simulator,name=iPhone 8 Plus,OS=11.4' build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
> allure serve ~/Library/Developer/Xcode/DerivedData/Beam**/Logs/Test

Run tests from CI

> cd ~/beam_xcuitest_demo
> bash ./ci/update.sh ${UPD_HOMEBREW} ${UPD_CARTHAGE} ${UPD_PODS} ${UPD_ALLURE} ${UPD_GEM}
> bash ./ci/start,sh ${DEVICE} ${HEADLESS}

About

Demo XCUITest for Beam app https://beamreddit.com

License:The Unlicense


Languages

Language:Swift 63.1%Language:Objective-C 32.3%Language:HTML 3.6%Language:CSS 0.5%Language:Ruby 0.4%Language:Shell 0.1%Language:JavaScript 0.0%