Upgrade to Pro — share decks privately, control downloads, hide ads and more …

fastlane: snapshot

matuyuji
October 29, 2015

fastlane: snapshot

fastlaneの最近の動向の報告と、snapshotがUI Automationに対応したので利用してみました。

matuyuji

October 29, 2015
Tweet

More Decks by matuyuji

Other Decks in Programming

Transcript

  1. ς ε τ snapshot / frameit scan ը ໘ ը

    ૾ ڙ څ ࢿ ֨ sigh ίϯύΠϧ gym ఏ ग़ deliver K01 K02 K03 K04 K05
  2. TOBQTIPUJOJU $ snapshot init Successfully created SnapshotHelper.js './SnapshotHelper.swift' Successfully created

    new Snapfile at './Snapfile' ------------------------------------------------------- Open your Xcode project and make sure to do the following: 1) Add the ./SnapshotHelper.swift to your UI Test target You can move the file anywhere you want 2) Call `setLanguage(app)` when launching your app let app = XCUIApplication() setLanguage(app) app.launch() 3) Add `snapshot("0Launch")` to wherever you want to create the screenshots More information on GitHub: https://github.com/krausefx/ snapshot 6*ςετͷTFU6Qʹ௥Ճ εΫϦʔϯγϣοτΛࡱΓ͍ͨͱ͜Ζʹ௥Ճ 6*ςετͷλʔήοτʹ௥Ճ
  3. class Snapshot: XCTestCase { override func setUp() { super.setUp() continueAfterFailure

    = false let app = XCUIApplication() setLanguage(app) app.launch() } func testExample() { let app = XCUIApplication() snapshot("01-master") let tablesQuery = app.tables tablesQuery.staticTexts["Groceries"].tap() snapshot("02-detail") let groceriesNavigationBarsQuery = app.navigationBars.matchingIdentifier("Groceries") groceriesNavigationBarsQuery.buttons["Edit"].tap() snapshot("03-edit") groceriesNavigationBarsQuery.buttons["Done"].tap() app.navigationBars.matchingIdentifier("Groceries").buttons["Lister"].tap() app.navigationBars["Lister"].buttons["Add"].tap() snapshot("04-add") } }
  4. 4OBQpMF devices([ # "iPhone 6", # "iPhone 6 Plus", "iPhone

    5", "iPhone 4s" ]) languages([ "ja-JP", "en-US" ]) scheme "Lister"