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

[RMPxQuipper meetup #3]開発のための開発~スマホアプリ向けe2eテストの検証導入事例を通じて~

Naoki Ainoya
September 29, 2016

[RMPxQuipper meetup #3]開発のための開発~スマホアプリ向けe2eテストの検証導入事例を通じて~

【RMP×Quipper】Food&Drink meetup #3 - connpass
http://rmp-quipper.connpass.com/event/39082/

Naoki Ainoya

September 29, 2016
Tweet

More Decks by Naoki Ainoya

Other Decks in Programming

Transcript

  1. ։ൃͷͨΊͷ։ൃ
    ~εϚϗΞϓϦ޲͚e2eςετͷಋೖΛ௨ͯ͠~

    View full-size slide

  2. ࣗݾ঺հ
    • @ainoya
    • ૬໺୩ ௚थʢ͍͋ͷ΍ ͳ͓͖ʣ
    • ~2013/8 mixi: Chef,ϓϥΠϕʔυΫϥ΢υͷߏங౳
    • ~2015 RTC: ϓογϡ௨஌ج൫,ࣾ಺FWͷอक
    • ~2016/3 RMP: ελσΟαϓϦӳ୯ޠɾENGLISHΤϯδχΞ
    • ~ࠓ RMP: ։ൃࢧԉάϧʔϓ

    View full-size slide

  3. ٕज़ྖҬ
    • AWS/docker
    • Perl/Ruby/Java/Go/Scala/Swift
    • ΞϓϦ͔ΒΠϯϑϥ·Ͱઙ͘޿͘…

    View full-size slide

  4. ։ൃࢧԉνʔϜʹ͍ͭͯ
    • ϓϩμΫτ։ൃ෦ͷԣஅ૊৫

    View full-size slide

  5. ϓϩμΫτ։ൃΛՃ଎ͤ͞Δͨ
    Ίͷ։ൃ
    • ࣾ಺herokuͷߏங(deis on GCP)
    • σʔλղੳج൫ߏஙࢧԉ
    • e2eςετͷݕূ(Appium/Selenium)
    • ݕূ୺຤؅ཧͷվળ(OpenSTFͷಋೖ)

    View full-size slide

  6. e2eςετͷݕূɾಋೖ

    View full-size slide

  7. ͳͥεϚϗΞϓϦͷe2eςε
    τΛ΍Δͷ͔

    View full-size slide

  8. ϦϦʔεલͷQA
    • εϓϨουγʔτͷखॱॻΛ΋ͱʹςελʔ
    ͕࿑ಇू໿తʹ࣮ࢪ

    View full-size slide

  9. ςετέʔε͕๲ΒΉͱɺखಈςετʹ͔
    ͔Δίετɾ͕࣌ؒ͹͔ʹͳΒͳ͘ͳΔ
    • ͕͔͔࣌ؒΔͱ͸͍͑ɺεϚϗΞϓϦ͸ɺ
    Ϣʔβʹόάमਖ਼Λಧ͚Δ·Ͱ͕͔͔࣌ؒΔ
    • Ώ͑ʹWebΞϓϦΑΓ΋QA͸͔ͬ͠ΓΊʹ͠
    ͍ͨ

    View full-size slide

  10. ࣗಈԽ͍ͨ͠
    • εϓϨουγʔτʹखॱॻͱ֬ೝ߲໨͕໌هͰ͖
    ΔͳΒɺਓखͰ΍Δඞཁ͸ͳ͍ɻࣗಈԽ͢Δ΂͖
    • QAͰςελʔʹ͓ئ͍͢Δ͜ͱ͸ɺਓͰͳ͍ͱ
    Ͱ͖ͳ͍ςετʢ୳ࡧతςετʣ͚ͩʹ͍ͨ͠
    • ࣗಈԽͰ͖ΔͳΒɺCIʹ૊ΈࠐΊ͹QAஈ֊Ͱؾ
    ͮ͘σάϨΛૣظൃݟͰ͖ΔϝϦοτ΋͋Δ

    View full-size slide

  11. ͳͥͰ͖͍ͯͳ͍ͷ͔
    • εϚϗΞϓϦ޲͚e2eςετͷٕज़͸ൃల్্
    • ֶशίετ͕ͱΜͰ΋ͳ͘ߴ͍ʢςετϑϨʔϜ
    ϫʔΫͷཧղɾ࣮ߦ؀ڥͷཧղɾςετͷॻ͖ํʣ
    • ϓϩμΫτ։ൃΛ͍ͯ͠ΔΤϯδχΞ͕ยखؒͰಋ
    ೖɾӡ༻͢Δͷ͸ݫ͍͠
    • ݁ՌɺʮΈΜͳ΍Γ͍ͨͱࢥͬͯΔ͚Ͳ·ͩͰ͖ͳ
    ͍ʯঢ়ଶ͕ͣͬͱଓ͍͍ͯΔ

    View full-size slide

  12. ಋೖʹ͸ɺͬ͘͡ΓࠊΛਾ͑
    ͯۛຯΛ͢ΔϦιʔε͕ඞཁ
    ։ൃج൫ۀ຿ͱͯ͠ઐ೚ͰऔΓ૊Ή΂͖՝୊

    View full-size slide

  13. ͱ͍͏Θ͚Ͱ͜͜਺ϲ݄e2eς
    ετͷಋೖݕূʹऔΓ૊ΜͰ͖
    ͨ

    View full-size slide

  14. Φʔτϝʔγϣϯ

    ϑϨʔϜϫʔΫ
    ςετ
    ϑϨʔϜϫʔΫ
    e2eςετ؀ڥͷ֓؍(ਤʣ
    34QFD
    BQQJVN@MJC
    BQQJVN
    TFSWFS
    0QFO45'
    4BVDFMBCT
    "OESPJE࣮ػ
    "OESPJE࣮ػ
    "OESPJE࣮ػ
    J04γϛϡϨʔλ
    J04γϛϡϨʔλ
    J04γϛϡϨʔλ
    ςετϑΝʔϜ

    View full-size slide

  15. ΦʔτϝʔγϣϯϑϨʔϜϫʔ
    Ϋ
    • appiumΛར༻
    • seleniumͱಉ͡ΠϯλϑΣʔεͰios/android
    ΞϓϦͷૢ࡞͕Մೳ
    IUUQXXXQJMMBSHMPCBMDPNTJUFTEFGBVMUpMFTBQQJVNQOH

    View full-size slide

  16. ςετϑϨʔϜϫʔΫʢςετ
    ίʔυ෦෼ʣ
    • rspecΛ࠾༻
    • rubyεΫϦϓτͰ୭Ͱ΋ؾܰʹॻ͚Δͱ͍͏఺Λॏࢹ
    • ΞϓϦͱಉ͡ίʔυ(Java΍Swift)Ͱॻ͔ͳ͍ͷͰɺ͏·͍͚͘͹ಉ
    ҰΞϓϦͷҟछϓϥοτϑΥʔϜؒͰςετίʔυΛڞ༗Ͱ͖Δ
    IUUQCQCMPHTQPUDPN*)9V1IZ$XJ5XL%U#4P*""""""""-")9Z4ISWM'TT$MBTT%JBHSBNQOH

    View full-size slide

  17. ςετέʔεྫ
    • UIཁૉͷબ୒΍۩ମతͳૢ࡞ΛPageObjectʹدͤΔ
    • RSpecͷςετέʔε͕ςετγφϦΦͱͯͦ͠ͷ··ಡΊΔΑ͏ʹͳΓɺ෼͔Γ΍͍͢

    View full-size slide

  18. androidςετϑΝʔϜ
    • openstfΛར༻ɻࣾ಺ͷ࣮ػݕূ୺຤্Ͱςε
    τ࣮ߦՄೳ

    View full-size slide

  19. iosςετϑΝʔϜ
    • saucelabsΛར༻ɻiosγϛϡϨʔλΛฒྻىಈͯ͠ςετߴ
    ଎Խ͕Ͱ͖Δ

    View full-size slide

  20. ۩ମతͳςετͷྲྀΕ
    • ςετγφϦΦͷ࡞੒
    • ΞϓϦૢ࡞ͷΩʔʹͳΔUIཁૉ໊ͷநग़
    • arc(appium ruby console)Λ࢖༻
    • ςετίʔυ࡞੒
    • page objectύλʔϯΛϕʔεʹrspecͰ
    • ςετ࣮ߦ
    • openstf/saucelabs্Ͱ࣮ߦ
    • ςετ݁Ռͷू໿
    • εΫϦʔϯγϣοτΛػछʹ·ͱΊͯ

    View full-size slide

  21. ը૾ࠩ෼ൺֱ(ݕূத)
    • Perceptual diffsʹΑΔσάϨͷݕग़཰ڧԽ

    https://github.com/uber/image-diff

    View full-size slide

  22. ΍ͬͯΈͯͷײ૝
    • ͖ͪΜͱӡ༻ΛճͤΕ͹ɺσάϨͷૣظൃݟʹ໾ཱͭιϦϡʔγϣϯ
    ʹͳΔ
    • ͔͠͠ͳ͕ΒɺεϚϗΞϓϦͷe2eςετ͸௥Ճͱϝϯςʹ͔ͳΓͷ
    ίετ͕͔͔Δ (Web/Seleniumͱൺ΂͍ͯΖ͍Ζൃల్্ʣ
    • ϢχοτςετͷΑ͏ʹ։ൃऀ͕ؾܰʹॻ͘ͷ͸·ͩ೉͍͠
    • ·ͱΊͯ࣌ؒΛऔͬͯςετॻ͘ͷΛ͕Μ͹Δ͔ɺઐଐςετΤϯδ
    χΞ͕·ͱΊͯॻ͘ͷ͕ݱ࣮తͱײͨ͡
    • ςετέʔε͸૿΍͗ͣ͢͠࠷௿ݶʹͱͲΊΔͷ͕๬·͍͠ʢϝϯς
    ίετͷ؍఺Ͱʣ

    View full-size slide

  23. ͓ΘΓʹɿ։ൃͷͨΊͷ։ൃ
    • ֤ϓϩμΫτͷٕज़తෛ࠴͸ɺجຊతʹ֤νʔϜͷΤϯδχΞ͕ͨͪ౰ࣄऀ
    ͱͯ͠ฦࡁ͢Δ
    • ͕ɺͲ͏ͯ͠΋͜΅Εٿ͸ൃੜͯ͠͠·͏
    • νʔϜ಺ʹ͍Δͱݟ͍͑ͯͳ͍ࢹ఺΋͋Δ
    • ։ൃج൫άϧʔϓʢ෦ԣஅ૊৫ʣ͕͜΅ΕٿΛर͍ʹߦ͘
    • ϓϩμΫτ։ൃͷڞ௨՝୊Λநग़ͯ͠ղܾʹऔΓ૊Ή
    • ʮΈΜͳ΍Γ͍ͨͱࢥͬͯΔ͚Ͳ·ͩղܾͰ͖͍ͯͳ͍՝୊ʯ͕࢒Γଓ͚Δ
    ঢ়ଶΛແ͘͢
    • e2eςετͷಋೖݕূ͸ͦͷҰ؀

    View full-size slide

  24. We are Hiringʂ
    • ΍Γ͍ͨ͜ͱ͸ଞʹ΋ͨ͘͞Μ͋Δɺๅͷࢁ
    • ϚʔέςΟϯάΦʔτϝʔγϣϯج൫
    • σʔλղੳج൫
    • ηΩϡϦςΟϚωδϝϯτ
    • ಈը࠶ੜج൫
    • R&Dʢػցֶशɾਂ૚ֶशetc..)
    • ্هͷΩʔϫʔυʹͽΜͱདྷͨํɺҰॹʹ՝୊ղܾʹऔΓ૊ΜͰ͘ΕΔ
    ํΛืूத

    View full-size slide

  25. e2eςετ͸͡ΊΔͳΒandroid
    ͔Β͕͓͢͢Ί
    • iOSͷॾʑͷڍಈ͕஗͘ɺςετέʔεΛॻ͘ͷʹ͕͔͔࣌ؒΔ
    • appium͔Βͷૢ࡞͕஗͍ɺpageΦϒδΣΫτ͕औΓͮΒ͍ɺ
    accessiblity identifierΛઃఆͯ͠΋͏·͘ཁૉ͕ͱΕͳ͍ɺetc…
    • Androidͷ΄͏͕ॾʑૢ࡞͠΍͘͢ɺ͘͘͞͞ςετέʔεॻ͚Δ
    • appiumͷ൓Ԡ΋ૣ͍ɻମײͰiOSͷഒҎ্ͷ଎͞Ͱॻ͚Δ
    • ͱ͘ʹAndroid/iOS྆ํల։͍ͯ͠ΔΞϓϦͷ৔߹͸ɺ·ͣAndroid൛
    ͰςετέʔεΛ׬੒ͤ͞ΔˠiOSʹςετέʔεҠ২͕ޮ཰͕ྑ͍ͱ
    ײͨ͡

    View full-size slide