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

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

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

TaeHwan

August 31, 2019
Tweet

More Decks by TaeHwan

Other Decks in Programming

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. ਃҳ ࢎ೦ 4 పझ౟ ߧਤ ߆੄ ா੉झܳ ࠁ৮ 4 ݒߣ

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

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

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

    ௏٘੄ ࢸݺ਷ য۵׮. 4 ۄ੉࠳۞ܻ ా೧ ୭ࣗೠਵ۽ ੽Ӕ ೧ࠁ੗ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 7
  7. 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
  8. Espresso Recorder 4 Android Studioীࢲ ઁҕೞח Espresso Recorder 4 ֣ചೞ٠

    పझ౟ ா੉झܳ ٜ݅ ࣻ ੓׮. thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 9
  9. Espresso Recorder ޙઁ੼ 4 ؘ੉ఠܳ ׮ ࠛ۞য়૑ ޅೠ ҃਋ ૊द

    য়ܨ ߊࢤ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 12
  10. 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
  11. Espresso Recorder ޙઁ੼ 4 ؘ੉ఠܳ ׮ ࠛ۞য়૑ ޅೠ ҃਋ ૊द

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

    য়ܨ ߊࢤ 4 ೧Ѿೞ۰ݶ Sleepਸ ъઁ۽ ୶о೧ঠ ೠ׮. 4 ѐߊ੗о ૒੽ పझ౟ೠ׮ݶ ೧Ѿ оמ ೞ૑݅ Ӓ ৻ীח য۵׮ 4 ӝӝо ׳ۄ૑ݶ ૊द য়ܨо ߊࢤ оמ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 15
  13. Kotlin 4 ୭ࣗೠ੄ ௏٬ਸ ਤೠ Kotlin ഝਊ 4 ۄ੉࠳۞ܻܳ ٜ݅য

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

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

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

    4 ୭ୡ ডҙ ز੄ 4 ୭ୡ ӂೠ ࢸ੿ -> ੉ٜਸ ೧Ѿೞӝ ਤ೧ ৘৻ ୊ܻ ா੉झо ೙ਃೞ׮. thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 22
  17. ޙઁ੼ - ؀਽ 4 ୭ࣗೠ੄ ௏٘۽ పझ౟ оמ 4 ਃҳࢎ೦ী

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

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

    ࠺زӝ ਽׹ਸ ѐࢶೞৈ పझ౟ ೡ ࣻ ੓ب۾ ೠ׮. 4 RxJava/LiveData/Coroutines ഝਊ оמ thdev.tech / ߊ಴੗ܐ http://bit.ly/android-ui-test 34
  20. Ӓېࢲ? ੜ ز੘ೞח Ѫ ೠߣ ࠁҊ UI ߸҃ ݽٚ ா੉झܳ

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

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

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