WebDriverAgentってなに?

Db5cf21a75ebe2484b95ea9dec5f573b?s=47 Shingo Tamaki
January 19, 2017

 WebDriverAgentってなに?

WebDriverAgentってなに?
Appium1.6.xの気になるところを調べてみた

Db5cf21a75ebe2484b95ea9dec5f573b?s=128

Shingo Tamaki

January 19, 2017
Tweet

Transcript

  1. WebDriverAgentͬͯͳʹʁ Appium1.6.xͷؾʹͳΔͱ͜ΖΛௐ΂ͯΈͨ

  2. ࣗݾ঺հ ۄ৓৴ޛ • גࣜձࣾ Origami • iOS Engineer • Favorite

    iOS framework • HomeKit/XCUITest/XCTest/Core Bluetooth
  3. ిࢠ޻࡞ͷษڧձ΍ͬͯ·͢ iOSΤϯδχΞͷͨΊͷిࢠ޻࡞ษڧձ h"ps:/ /www.facebook.com/groups/1698775433676484/

  4. ͸͡Ίʹ

  5. UIςετࣗಈԽͯ͠·͔͢ʁ

  6. XCUITestΛ࢖ͬͨࣄ͕͋Δ or ࢖͍ͬͯΔ

  7. AppiumΛ࢖͍ͬͯΔ or ࢼͨ͜͠ͱ͕͋Δ

  8. ͦͷଞͷUIςεςΠϯάϑϨʔϜϫʔΫΛ ࢖ͬͨࣄ͕͋Δʁ • KIF • Carabash • EarlGray • etc

  9. Appium is Կʁ • ϚϧνϓϥοτϑΥʔϜ(iOS/Android/WindowsPhone) • UIςεςΟϯάϑϨʔϜϫʔΫ • ༷ʑͳςεςΟϯάϑϨʔϜϫʔΫ͕બ୒Մೳ •

    ϓϩμΫτίʔυʹมߋͳ͘ಋೖՄೳ • SeleniumϥΠΫͳ࢓༷ͷͨΊɺ਌͠Έ΍͍͢
  10. None
  11. ಋೖ࣮੷΋ଟ͘ݟ͔͚·͢

  12. ಋೖ࣮੷΋ଟ͘ݟ͔͚·͢

  13. ಋೖ࣮੷΋ଟ͘ݟ͔͚·͢

  14. ಋೖ࣮੷΋ଟ͘ݟ͔͚·͢

  15. ಋೖ࣮੷΋ଟ͘ݟ͔͚·͢

  16. ࠓ೔࿩͞ͳ͍ࣄ • Appiumͷ۩ମతͳಋೖํ๏ʹ͍ͭͯ • UIςετͷಋೖίετ΍ӡ༻ʹ͍ͭͯ

  17. ࠷ۙͷAppiumͷมԽʹ͍ͭͯ

  18. ͦͷલʹiOSͷมԽͷ͓͞Β͍

  19. UIAutoma)on • Xcode6·Ͱͷඪ४UIςεςΟϯάϑϨʔϜϫʔΫ • instrumentsͷςϯϓϨʔτͷҰͭ • ςετίʔυ͸javascriptͰهड़

  20. XCUITest • Xcode7͔Β৽ͨʹ௥Ճ͞ΕͨUITestͷϑϨʔϜϫʔΫ • XCTestಉ༷ʹTest BundleΛϓϩδΣΫτʹ௥Ճ͢Δ • Objec6ve-C or Swi=ͰUIςετॻ͘͜ͱ͕Մೳ

    • XCTRunner͕ςετର৅ͷΞϓϦͷUIૢ࡞Λߦ͏
  21. XCUITest • XCTRunner͕ςετର৅ͷΞϓϦͷUI ૢ࡞Λߦ͏ fbsimctl 3435BE60-1111-2222-333-6C1E2B4C 4A77 list_apps | grep

    bundle_id "bundleid" = "com.apple.test.XCUITestSampleUITests- Runner"; ... "bundleid" = "com.apple.mobilesafari"; "bundle_id" = "com.hoge.XCUITestSample";
  22. Architecture (Before 1.6.0) UIAutoma)onʹΑΔ࣮ߦ 1. ޷͖ͳςεςΠϯάϑϨʔϜϫʔΫ 2. ֤ݴޠͰ༻ҙ͞ΕͨAppiumClient࣮૷ͰJSON Wire Protocolੜ

    ੒͠ૹ৴ 3. AppiumServer͕υϥΠόʔܦ༝ͰUIAutoma)on࣮ߦ
  23. None
  24. Architecture (a,er 1.6.0) XCUITestʹΑΔ࣮ߦ 1. ޷͖ͳςεςΠϯάϑϨʔϜϫʔΫ 2. ֤ݴޠͰ༻ҙ͞ΕͨAppiumClient࣮૷ͰJSON Wire Protocolੜ

    ੒͠ૹ৴ 3. AppiumServer͕υϥΠόʔܦ༝ͰXCUITest࣮ߦ
  25. None
  26. !

  27. !ͳΔ΄Ͳ

  28. !Θ͔ΒΜ

  29. Θ͔ΒΜϙΠϯτ ͦ΋ͦ΋ͷUIAutoma)on͸jsͰίʔυॻ͍࣮ͯߦ ͭ·Γ֎෦͔ΒiOS SimulatorΛૢ࡞͸ͦ΋ͦ΋ग़དྷΔ࡞Γ → Θ͔Δ (appium-ios-driver͸࣮ࡍ΋͏ͪΐͬͱෳࡶͳ࡞Γʹͳͬ ͯ·͢)

  30. None
  31. Θ͔ΒΜϙΠϯτ XCUITestΛ֎෦͔Βૢ࡞͢Δʁ → Θ͔ΒΜ XCUITestͬͯϓϩδΣΫτʹTestόϯυϧೖΕͯςετίʔυ࣮ ߦͤ͞Δײ͡Ͱ͢ΑͶʁ Appiumͷྑ͞ͷҰͭ͸ϓϩμΫτίʔυʹखΛՃ͑ͣʹUIςετ ͕ग़དྷΔࣄͷ͸ͣʁ΍ΊͪΌͬͨʁ XCUITestͬͯϓϩδΣΫτͷ֎͔Βίϯτϩʔϧग़དྷΔͷʁ!

  32. ௐ΂ͯΈͨɻ

  33. 1.6.0͔ΒXCUITestαϙʔτͨ͠Αͱɻ h"ps:/ /github.com/appium/appium/releases

  34. ৽ͨʹ௥Ճ͞ΕͨDriver appium-xcuitest-driver h"ps:/ /github.com/appium/appium-xcuitest-driver#appium- xcuitest-driver

  35. ߋʹͦͷதͰ࢖༻͞Ε͍ͯΔWebDriverAgent h"ps:/ /github.com/facebook/WebDriverAgent h"ps:/ /www.youtube.com/watch?v=Ea6YGFxBxY

  36. WebDriverAgent • WebDriverαʔόʔ࣮૷ • ىಈ͢ΔͱΞϓϦ͸WebDriverͱͯ͠APIΛίʔϧग़དྷΔαʔό ͱͯ͠ىಈ͠·͢ • WebDriverAgentΛ࢖͏ࣄͰ֎෦͔Βୟ͚ΔUI Test RunnerΛ࣮

    ݱ͍ͯ͠Δ • UIͷૢ࡞ʹ͍ͭͯ͸PrivateAPIΛ࢖༻͍ͯ͠Δͱͷࣄ
  37. None
  38. ΋Ұ౓XCUITestΛࢥ͍ग़ͯ͠ΈΔɻ

  39. !

  40. !ͳΔ΄Ͳ

  41. !ೲಘ

  42. ·ͱΊ • WebDriverAgent͸WebDriverαʔό࣮૷ • WebDriverAgent͸UI Test Runnerͷ୅ΘΓͱͯ͠ΞϓϦΛૢ࡞ ͢ΔࣄͰ͜Ε·ͰͷAppiumͱ(΄΅)มΘΒ͵ڍಈΛ࣮ݱ͍ͯ͠ Δ •

    ςετίʔυॻ͘෼ʹ͸UIAutoma:on/XCUITestͷͲͪΒ͕ಈ ͍ͯΔ͔͸ҙࣝ͢Δඞཁ͸ͳ͍ɻ
  43. Ҏ্