testing ios10 apps with appium and its new xcuitest backend

13
Testing iOS10 Apps with Appium and its new XCUITest backend Andreas Lüdeke

Upload: testplus-gmbh

Post on 16-Apr-2017

163 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Testing iOS10 Apps with Appium and its new XCUITest backend

Mobile App Testing

Test more. Worry less.TestingiOS10AppswithAppium anditsnewXCUITest backend

AndreasLüdeke

Page 2: Testing iOS10 Apps with Appium and its new XCUITest backend

Zu den FarbenAppleUITesting akaXCUITEST

XCUITest:

- AnnouncedatWWDC15

- RequiresXcode 7/8

- SupportsiOS9/10

- BasedonXCTest

- Objetive C/Swift

Page 3: Testing iOS10 Apps with Appium and its new XCUITest backend

Zu den FarbenAppleUIAutomation

Page 4: Testing iOS10 Apps with Appium and its new XCUITest backend

Zu den FarbenYour thoughts?

Page 5: Testing iOS10 Apps with Appium and its new XCUITest backend

Zu den FarbenMy thoughts?

Page 6: Testing iOS10 Apps with Appium and its new XCUITest backend

Zu den FarbenXCUITest TestCase

class UITests: XCTestCase { let app = XCUIApplication()

override func setUp() { super.setUp()

continueAfterFailure = falseapp.launch()

} }

Page 7: Testing iOS10 Apps with Appium and its new XCUITest backend

Zu den FarbenXCUITest Asserts

let nextGame = self.app.staticTexts["Game4- Tomorrow"]

let exists = NSPredicate(format:"exists==true")expectationForPredicate(exists,evaluatedWithObject:nextGame,handler:nil)app.buttons["LoadMoreGames"].tap()

waitForExpectationsWithTimeout(5,handler:nil)XCTAssert(nextGameLabel.exists)

Page 8: Testing iOS10 Apps with Appium and its new XCUITest backend

Zu den FarbenXCUITest SystemAlerts

addUIInterruptionMonitorWithDescription("LocationDialog"){

(alert)-> Bool in alert.buttons["Allow"].tap()return true

}

app.buttons["FindGamesNearby?"].tap()app.tap()//needtointeractwiththeappforthehandlertofireXCTAssert(app.staticTexts["Authorized"].exists)

Page 9: Testing iOS10 Apps with Appium and its new XCUITest backend

Zu den FarbenXCUITest Summary

Pros:

- Easytolearn

- ObjectiveC/Swift

- Recorderavailable

- Fullsystemaccess

- Relativelyfast

- Flexible

Cons:

- Terrible

Documentation

- OnlyiOS9and10

- SigningHell

Page 10: Testing iOS10 Apps with Appium and its new XCUITest backend

Zu den FarbenAppium and the rocky road to iOS10

- 1.5completerewrite

withpluginsupport

- WebdriverAgent

- FBSimulatorControl

- 1.6.beta-3

- FocusonSimulators

Page 11: Testing iOS10 Apps with Appium and its new XCUITest backend

Appium Demo

Page 12: Testing iOS10 Apps with Appium and its new XCUITest backend

Zu den FarbenReferences

- https://developer.apple.com/videos/play/wwdc2015/406/

- https://github.com/facebook/WebDriverAgent

- https://github.com/facebook/FBSimulatorControl

- https://github.com/appium/appium/releases/tag/v1.6.0-

beta3

Page 13: Testing iOS10 Apps with Appium and its new XCUITest backend

www.testobject.com

AndreasLü[email protected]