Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

iOS UI Testing in Xcode

iOS UI Testing in Xcode @ Mozilla Taiwan 2016/02/02

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to comment

iOS UI Testing in Xcode

  1. 1. iOS UI Testing in Xcode Mark Chang markchang@kkbox.com Test Corner
  2. 2. About Me • Mark Chang • Testing Engineer in the KKBOX Inc. • One of contributors in the “Testing with KK” blog.
  3. 3. Overview • Record and Playback • Test script (Swift or Objective-C) • Running UI automation testing in iOS • Code coverage and test reports
  4. 4. Demo 1 UI Recording - Record and Playback YouTube Link
  5. 5. How does UI automation work ?
  6. 6. Locate the element Operate the element Verify the element
  7. 7. Example Testing the Add button // application: let app = XCUIApplication() app.launch() // element and query: let addButton = app.buttons[“Add”] addButton.tap() // assertion: XCTAssertEqual(app.tables.cells.count, 1)
  8. 8. Example Testing the Add button // application: let app = XCUIApplication() app.launch() // element and query: let addButton = app.buttons[“Add”] addButton.tap() // assertion: XCTAssertEqual(app.tables.cells.count, 1)
  9. 9. Example Testing the Add button // application: let app = XCUIApplication() app.launch() // element and query: let addButton = app.buttons[“Add”] addButton.tap() // assertion: XCTAssertEqual(app.tables.cells.count, 1)
  10. 10. Example Testing the Add button // application: let app = XCUIApplication() app.launch() // element and query: let addButton = app.buttons[“Add”] addButton.tap() // assertion: XCTAssertEqual(app.tables.cells.count, 1)
  11. 11. Example // application: let app = XCUIApplication() app.launch() // element and query: let addButton = app.buttons[“Add”] addButton.tap() // assertion: XCTAssertEqual(app.tables.cells.count, 1) Testing the Add button
  12. 12. Example // application: let app = XCUIApplication() app.launch() // element and query: let addButton = app.buttons[“Add”] addButton.tap() // assertion: XCTAssertEqual(app.tables.cells.count, 1) Testing the Add button
  13. 13. Example // application: let app = XCUIApplication() app.launch() // element and query: let addButton = app.buttons[“Add”] addButton.tap() // assertion: XCTAssertEqual(app.tables.cells.count, 1) Testing the Add button
  14. 14. Example // application: let app = XCUIApplication() app.launch() // element and query: let addButton = app.buttons[“Add”] addButton.tap() // assertion: XCTAssertEqual(app.tables.cells.count, 1) Testing the Add button
  15. 15. Example Testing the Add button // application: let app = XCUIApplication() app.launch() // element and query: let addButton = app.buttons[“Add”] addButton.tap() // assertion: XCTAssertEqual(app.tables.cells.count, 1)
  16. 16. Demo 2 Code coverage and test reports YouTube Link
  17. 17. For more information please visit Any Questions ?
  18. 18. Reference • 使⽤ Xcode 執⾏ UI ⾃動化測試 _ 科科和測試 • https://kkboxsqa.wordpress.com/2015/11/09/%E4%BD%BF%E7%94%A8-xcode-%E5%9F%B7%E8%A1%8C-ui-%E8%87%AA%E5%8B%95%E5%8C%96%E6%B8%AC%E8%A9%A6/ • 使⽤ Xcode Server 持續整合建置 _ 科科和測試 • https://kkboxsqa.wordpress.com/2015/12/10/xcode-server-continuous-integration/ • UI Testing in Xcode - WWDC 2015 - Videos - Apple Developer • https://developer.apple.com/videos/play/wwdc2015-406/ • UI Testing in Xcode 7 · masilotti.com • http://masilotti.com/ui-testing-xcode-7/ • Xcode 7 UI testing, a first look • http://www.mokacoding.com/blog/xcode-7-ui-testing/ • How do I test this with UI Testing? • https://github.com/joemasilotti/UI-Testing-Cheat-Sheet


    Be the first to comment

    Login to see the comments

  • yafeih

    Feb. 4, 2016
  • jeffreywang3139

    Feb. 5, 2016
  • ylchern

    Feb. 5, 2016
  • miashopgal

    Feb. 20, 2016
  • SherlockChiang

    Mar. 3, 2016

iOS UI Testing in Xcode @ Mozilla Taiwan 2016/02/02

Views

Total views

1,093

On Slideshare

0

From embeds

0

Number of embeds

6

Actions

Downloads

17

Shares

0

Comments

0

Likes

5

×