GDG Android - 좀 더 쉬운 UI 테스트하기 위한 작업을 해보았다.

7589a5a8fec022e8af4e46525150a291?s=47 TaeHwan
August 31, 2019

GDG Android - 좀 더 쉬운 UI 테스트하기 위한 작업을 해보았다.

GDG Android 8월 밋업에서 발표한 : 좀 더 쉬운 UI 테스트하기 위한 작업을 해보았다.

참고자료
googlesamples/UIAutomator BasicSample : https://github.com/googlesamples/android-testing/tree/master/ui/uiautomator/BasicSample
googlesamples/android-testing : https://github.com/googlesamples/android-testing
EspressoExamples : https://github.com/vgrec/EspressoExamples

7589a5a8fec022e8af4e46525150a291?s=128

TaeHwan

August 31, 2019
Tweet

Transcript

  1. ࣻ੿ ખ ؊ ए਍ UI పझ౟ೞӝ ਤ ೠ ੘সਸ ೧ࠁও׮.

    thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 1
  2. ݢ੷ 4 അ ഥࢎ੄ ղਊਸ ׮ܖ૑ ঋח׮. 4 ߓ҃ ࢸݺਸ

    ನೣೠ׮. 4 ੌࠗ ௏٘ܳ ನೣೞա ݽٚ ா੉झܳ ݅઒ೞ૑ח ޅೠ׮. thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 2
  3. QA ౱੄ ਃҳ ࢎ೦ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 3

  4. ਃҳ ࢎ೦ 4 పझ౟ ߧਤ ߆੄ ா੉झܳ ࠁ৮ 4 ݒߣ

    ־ۅೞח ா੉झо ߊࢤ 4 ੗زചܳ ాೠ ࠁ৮੉ оמೡө? thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 4
  5. ੗زച Ѩషח? 4 ੗زചܳ ਤೠ झ௼݀౟ ഋక੄ ੗زച оמ 4

    ਋ܻ জীࢲ ੸ਊೞӝ औ૑ ঋ׮. 4 ۽Ӓੋب ೙ਃೞҊ 4 ੋૐب ೙ਃೞҊ 4 ࠺ਊ ߊࢤ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 5
  6. ࢎ੹ ઑࢎ 4 Python झఠ٣ ૓೯ਵ۽ Python ঱য ഝਊ оמ

    4 iOS పझ౟ ੌࠗ ૓೯ ҃೷ 4 উ٘۽੉٘ ҙ۲(Java ௏٘ܳ ࠁח Ѥ য۵׮) thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 6
  7. Ӓېࢲ оמೡө? 4 ೣࣻഋ ঱যী ؀ೠ ੽Ӕ оמ 4 ղࠗ

    ௏٘੄ ࢸݺ਷ য۵׮. 4 ۄ੉࠳۞ܻ ా೧ ୭ࣗೠਵ۽ ੽Ӕ ೧ࠁ੗ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 7
  8. Tools 4 Language : kotlin 4 UI Test : Android

    Espresso 4 UI Test : UiAutomator 4 Best : Espresso Recorder thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 8
  9. Espresso Recorder 4 Android Studioীࢲ ઁҕೞח Espresso Recorder 4 ֣ചೞ٠

    పझ౟ ா੉झܳ ٜ݅ ࣻ ੓׮. thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 9
  10. Espresso Recorder thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 10

  11. Espresso Recorder thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 11

  12. Espresso Recorder ޙઁ੼ 4 ؘ੉ఠܳ ׮ ࠛ۞য়૑ ޅೠ ҃਋ ૊द

    য়ܨ ߊࢤ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 12
  13. Espresso Recorder ޙઁ੼ I/TestRunner: run finished: 1 tests, 1 failed,

    0 ignored (with id: tech.thdev.flickr.example.debug:id/recycler_view and Child at position 0 in parent with class name: is "android.support.constraint.ConstraintLayout")'. thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 13
  14. Espresso Recorder ޙઁ੼ 4 ؘ੉ఠܳ ׮ ࠛ۞য়૑ ޅೠ ҃਋ ૊द

    য়ܨ ߊࢤ 4 ೧Ѿೞ۰ݶ Sleepਸ ъઁ۽ ୶о೧ঠ ೠ׮. thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 14
  15. Espresso Record ޙઁ੼ 4 ؘ੉ఠܳ ׮ ࠛ۞য়૑ ޅೠ ҃਋ ૊द

    য়ܨ ߊࢤ 4 ೧Ѿೞ۰ݶ Sleepਸ ъઁ۽ ୶о೧ঠ ೠ׮. 4 ѐߊ੗о ૒੽ పझ౟ೠ׮ݶ ೧Ѿ оמ ೞ૑݅ Ӓ ৻ীח য۵׮ 4 ӝӝо ׳ۄ૑ݶ ૊द য়ܨо ߊࢤ оמ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 15
  16. Ӓۢ যڌѱ ੽Ӕೞחѱ જਸө? thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 16

  17. Kotlinਸ ࢶఖ ૒੽ ௏٘ ۄ੉࠳۞ܻ ઁ੘ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test

    17
  18. Kotlin 4 ୭ࣗೠ੄ ௏٬ਸ ਤೠ Kotlin ഝਊ 4 ۄ੉࠳۞ܻܳ ٜ݅য

    QA ౱ীࢲ ੽Ӕೡ ࣻ ੓ח ݒ׏঴ ઁҕ 4 Button click 4 അ੤ ചݶ ؀ӝ ࢚క ୊ܻ 4 чਸ ੑ۱ೡ ࣻ ੓ח పझ౟ ா੉झ ઁҕ 4 ҅ࣘ ୶оೠ׮ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 18
  19. ۄ੉࠳۞ܻܳ ٜ݅যࠁ੗ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 19

  20. ۄ੉࠳۞ܻ ٜ݅ӝ 4 ݫੋ : UiAutomator 4 ࠁઑ : Espresso

    4 ঱য : Kotlin 4 lambdas + Higher-Order function ഝਊ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 20
  21. UiAutomator ࢶఖ ੉ਬ 4 ചݶীࢲ ࠁ੉ח ఫझ౟ܳ ଺ӝ оמ 4

    ௿ܼೡ ࣻ ੓ח ഋకܳ ٜ݅ ࣻ ੓׮. 4 दझమ ঌܿب ײਸ ࣻ ੓׮.(ӂೠ ୓௼) 4 दझమب ஶ౟܀ оמ 4 കਵ۽ щ׮о, جইৡ׮Ѣա thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 21
  22. জীࢲ੄ ઑѤ 4 ୭ୡ জ प೯ীࢲ ݅ ೙ਃೠ ӝמ੉ ੓׮.

    4 ୭ୡ ডҙ ز੄ 4 ୭ୡ ӂೠ ࢸ੿ -> ੉ٜਸ ೧Ѿೞӝ ਤ೧ ৘৻ ୊ܻ ா੉झо ೙ਃೞ׮. thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 22
  23. ௏٘ ࠁӝ ੹ী ҡଳ਷ ࢠ೒ٜ googlesamples/UIAutomator BasicSample googlesamples/android-testing EspressoExamples thdev.tech

    / ߊ಴੗ܐ http://bit.ly/android-ui-test 23
  24. UIܳ ־ܰҊ, ഛੋೞח рױೠ ࢠ೒ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 24

  25. పझ౟ೡ ചݶਸ ޷ܻ ੿੄೧ك׮. 4 ࠁా IntroActivityࠗఠ द੘ thdev.tech /

    ߊ಴੗ܐ http://bit.ly/android-ui-test 25
  26. UiAutomator ੿੄ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 26

  27. ചݶਸ ֢୹ೞ੗ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 27

  28. ߡౡਸ ׂ۞ࠁ੗ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 28

  29. ചݶ ֢୹ਸ ഛੋ೧ࠁ੗ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 29

  30. ޙઁо ੓׮! thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 30

  31. ޙઁ੼ - ؀਽ 4 ୭ࣗೠ੄ ௏٘۽ పझ౟ оמ 4 ਃҳࢎ೦ী

    ٮܲ ઱ӝ੸ সؘ੉౟ ೙ਃ 4 ఫझ౟о হਵݶ పझ౟ ா੉झ ୶оо য۵׮ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 31
  32. ޙઁ੼ - ѐߊ੸ 4 Espresso ੉ਊ೧ ಽযঠ ೠ׮. 4 ௏٘۽

    ౵ঈೞӝ औ૑ ঋ׮. -> Espresso Recorderܳ ੉ਊ ೡ ࣻ ੓ਵա ࠁઑ੸ 4 పझ౟ ா੉झ ୶о ઁҕ ೙ਃ -> ই੉௑ ഋక੄ ߡౡী ؀ೠ ா੉झ ୶о 4 Thread.sleep ੉ਊਵ۽ ੿ഛೞ૑ ঋ਺ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 32
  33. Thread.sleep ѐࢶೞӝ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 33

  34. Thread.sleepਸ ѐࢶೞ۰ݶ? 4 sleep਷ दрਸ ୶ஏೡ ࡺ ੿ഛೞ૑ ঋ׮. 4

    ࠺زӝ ਽׹ਸ ѐࢶೞৈ పझ౟ ೡ ࣻ ੓ب۾ ೠ׮. 4 RxJava/LiveData/Coroutines ഝਊ оמ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 34
  35. Coroutines channel ੉ਊ Coroutines Channels thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 35

  36. Coroutines channel ࢎਊೠ ѐࢶ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 36

  37. Coroutines channel ࢎਊೠ ѐࢶ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 37

  38. Ӓېࢲ? ੜ ز੘ೞח Ѫ ೠߣ ࠁҊ UI ߸҃ ݽٚ ா੉झܳ

    ݅઒ೞ૑ח ޅ೮׮. thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 38
  39. ࢿҕ੸੉૑ח ঋ׮. 4 ఫझ౟о ইצ ߡౡী ؀ೠ ୊ܻח ߹ب۽ ѐߊਸ

    ೙ਃ۽ ೠ׮. 4 झ௼܀ী ؀ೠ ୊ܻب ೙ਃೞ׮. 4 ޻੽ೞѱ పझ౟ ா੉झ ೙ਃೠ чٜਸ ୊ܻ೧઻ঠ ೠ׮. 4 ѐߊب ঌইঠ ೠ׮. thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 39
  40. ࢿҕ੸੉૑ח ঋ׮. 4 ੉ ੿ب ੗زച۽ח ݆ࣻ਷ ৘৻ ா੉झܳ ٜ݅Ҋ,

    ؀਽੉ য۵׮. 4 పझ౟ ா੉झী ನೣೞח ৮߷ೠ ா੉झ ݅ ઓ੤ UI పझ౟о ইצ Unit పझ౟о ׹੉׮. thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 40
  41. хࢎ೤פ׮. taehwan taehwan@thdev.net https://thdev.tech thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 41