Firebase Test LabのRobo Test いいね👍

E77b6a5f919f7366d94f21eee9a014f5?s=47 operandoOS
December 13, 2018

Firebase Test LabのRobo Test いいね👍

Firebase Test LabのRobo Test いいね👍

書き起こし
https://github.com/operando/Notes/tree/master/Shibuya_apk30

shibuya.apk #30
https://shibuya-apk.connpass.com/event/109729/

E77b6a5f919f7366d94f21eee9a014f5?s=128

operandoOS

December 13, 2018
Tweet

Transcript

  1. Firebase Test Labͷ Robo Test ͍͍Ͷ shibuya.apk #30

  2. Firebase Test Lab “Test your app on devices hosted in

    a Google data center.“
  3. Firebase Test Lab • Ծ૝σόΠεͱ෺ཧσόΠε྆ํ༻ҙ͞ΕͯΔ • ࠓ೥iOS΋αϙʔτ͞Εͨ • AndroidͩͱҎԼͷςετ͕Ͱ͖Δ •

    Instrumentation tests • Robo Test • Game loop test
  4. Robo Test “Robo test analyzes the structure of your app's

    UI and then explores it methodically, automatically simulating user activities.”
  5. Robo Test ެࣜυΩϡϝϯτ https://firebase.google.com/docs/ test-lab/android/robo-ux-test

  6. ͳͥ Robo TestΛ࢖͍࢝Ίͨͷ͔ • ൃ୺͸QAͷํ͕ࢼ͠ʹ࣮ߦͯ͘͠Εͨ • ੲʹ࢖ͬͨ࣌͸͋·Γ໾ʹͨͨͳ͔͚ͬͨ Ͳɺࠓճࢼͯ͠ΈͨΒྑ͘ͳͬͯͨ

  7. ͳͥ Robo TestΛ࢖͍࢝Ίͨͷ͔ • note͸Android 4ܥ·Ͱαϙʔτͯ͠Δ͚Ͳ
 ࣾ಺ʹ·ͱ΋ʹಈ͘4ܥ୺຤͕গͳ͍ • ϦάϨογϣϯςετతʹखಈͰ৭Μͳը໘Λ νΣοΫ͢Δͷ͕໘౗

    • ςετίʔυॻ͍ͯͳ͍ • ͚ͲɺͳΜ͔ࣗಈͰ৭Μͳը໘ݟͯ΄͍͠
  8. Firebase Test Lab͕ରԠͯ͠ΔAPIϨϕϧ • APIϨϕϧ 18 ʙ 28 • Jelly

    Bean MR2 ʙ P·Ͱ • े෼ͦ͏
  9. Robo Testͷ࣮ߦʹඞཁͳ΋ͷ • ςετ͍ͨ͠ΞϓϦͷApk • Firebase Project • ʢίϚϯυϥΠϯ͔Β࣮ߦ͢Δ৔߹͸gcloudʣ

  10. ແྉͰ࢖͑·͢ʂ • Firebaseͷྉۚϓϥϯ͕
 Sparkϓϥϯ or Flameϓϥϯͷ৔߹͸
 ͋Δఔ౓ແྉͰ࢖͑·͢ • ͪΐͬͱࢼ͢෼ʹ͸े෼࢖͑·͢

  11. ͓ۚΛ෷͑͹΋ͬͱ࢖͑·͢ʂ • Firebaseͷྉۚϓϥϯ͕Blazeϓϥϯͷ৔߹
 ͓ۚ͸͔͔Γ·͕͢ແ੍ݶͰ࢖͑·͢ • note͸BlazeϓϥϯͰFirebase test labΛ
 ࢖ͬͯ·͢

  12. Pricing • ྉۚͷৄࡉ͸ҎԼΛࢀর • https://firebase.google.com/docs/test- lab/android/overview#billing

  13. noteͰͷFirebase test labͷ
 ઌ݄ͷ࢖༻ྉ • ෺ཧσόΠεΛ2࣌ؒͪΐͬͱ࢖ͬͯ 534ԁ • Ծ૝σόΠε͸਺े෼࢖ͬͯ 0ԁ

    • ͍҆ʂʂ • Robo Test͔͠࢖ͬͯͳ͍
  14. ࢖͏্Ͱ஌͓ͬͯ͘ͱ͍͍͜ͱ • Robo TestͷλΠϜΞ΢τ • ΧελϜϩάΠϯ

  15. Robo TestͷλΠϜΞ΢τ • Robo ςετΛ࣮ߦ͢Δ࣌ؒ • noteͰ͸5෼ʹઃఆͯ͠Δ • ·ͣ͸୹͘͸͡Ίͯɺ݁ՌΛݟͯঃʑʹ
 ΞϓϦʹ࠷దͳ࣌ؒΛݟ͚ͭΔͷ͕ྑͦ͞͏

  16. ΧελϜϩάΠϯ • ϩάΠϯ͕ඞཁͳը໘΍ػೳ͕͋Δ৔߹ʹ࢖͏ • ϩάΠϯը໘ͷid/passwordʹೖΕΔ஋Λ
 ఆٛ͢Δ • Robo Test͕ϩάΠϯը໘ʹ͖ͨΒɺͦΕͧΕͷ EditTextʹఆٛͨ͠஋ΛೖΕɺϩάΠϯͯ͘͠ΕΔ

  17. ΧελϜϩάΠϯ • ͜Εఆ͓͔ٛͯ͠ͳ͍ͱ
 ʮ͋ΕʁϩάΠϯը໘ શવ ಥഁͰ͖ͯͳ͍ʂ
 μϝ͡ΌΜʂʯ
 ͬͯͳΔͷͰɺఆ͓͖ٛͯ͠·͠ΐ͏

  18. Demo

  19. Test Report

  20. ݁Ռ͕γϯϓϧ

  21. non-SDK interfaces࢖ͬͯΔ
 ͱ͜Ζग़ͯ͘͠ΕΔ • APIϨϕϧ 28Ҏ্Ͱಈ͔͢ͱग़ͯ͘͠ΕΔ

  22. ύϑΥʔϚϯε΋ग़ͯ͘͠ΕΔ

  23. ύϑΥʔϚϯε΋ग़ͯ͘͠ΕΔ

  24. ύϑΥʔϚϯε΋ग़ͯ͘͠ΕΔ • Roboͷૢ࡞ಈըͱSyncͯͦ͠ΕͧΕͷάϥϑ ͕Ͳ͏ͳͬͯΔͷ͔ݟΕΔͷΑ͍

  25. None
  26. Robo TestͰΫϥογϡͨ͠Β StackTraceग़ͯ͘͠ΕΔ

  27. Robo TestͰΫϥογϡͨ͠Β StackTraceग़ͯ͘͠ΕΔ • StackTraceݟΔͱRobo Test͸espressoΛ࢖ ͬͯΞϓϦͷૢ࡞Λͯ͠Δ͜ͱ͕Θ͔Δ

  28. ςετͷ݁Ռ͕GCSʹอଘ͞ΕΔ • ૢ࡞ϩάͷJSON • Robo script • ͜ͷϩάΛ࢖͑͹ɺಉ͡ૢ࡞ͷRobo Test͕Ͱ͖Δ •

    Logcat • Robo Test࣮ߦ࣌ͷ୺຤ͷLogcat
  29. ςετͷ݁Ռ͕GCSʹอଘ͞ΕΔ • Robo͕ૢ࡞ͨ͠ಈը • εΫϦʔϯγϣοτ • Ϋϩʔϧάϥϑ • Robo Testͷૢ࡞͔Β࡞੒͞ΕΔը໘ભҠ

    • ͜Εͳ͔ͳ͔͍͢͝
  30. Ϋϩʔϧάϥϑ

  31. Robo TestΛ͍࣮ͭߦͯ͠Δͷ͔ • noteͰ͸ϦϦʔεલͷQAΛ࢝ΊΔ࣌ʹ
 ෳ਺όʔδϣϯɺෳ਺୺຤Ͱ࣮ߦͯ͠Δ • ͲΕͰ࣮ߦ͢Δ͔Ͳ͔ͷςϯϓϨʔτΛ࡞ΕΔͷͰ
 ͦͷςϯϓϨʔτΛ࢖ͬͯຖճ࣮ߦ͢Δͱָ • Robo

    script͸·ͩ࢖ͬͯͳ͍ͷͰ
 ૢ࡞͸ຖճϥϯμϜૢ࡞
  32. ࠓ౓Ͳ͏͍͔ͨ͠ • ReleaseϒϥϯνΛ࡞ͬͨΒɺCI্͔ΒࣗಈͰRobo Test࣮ߦ • ࠓ͸gcloud͔Firebase ProjectϙνϙνͰ࣮ߦͯ͠Δ • Robo scriptΛ࢖ͬͯɺܾΊΒΕͨૢ࡞Λ࣮ߦͰ͖ΔΑ͏ʹ͢Δ

    • ৽͍͠ػೳͱ͔࡞ͬͨΒRobo scriptϝϯς͢Δ
 ඞཁ͋Γͦ͏ͳͷͰͲ͏͠Α͏ • ӡ༻ͯ͠Δํ͍ͨΒ஌ݟ͍ͩ͘͞
  33. ͓·͚

  34. apk͑͋͞Ε͹… • ࣗ෼͕ͨͪ࡞ͬͯΔΞϓϦ͡Όͳͯ͘΋
 Robo Test૸ΒͤΒΕΔ • ΍Βͳ͍ͰͶ

  35. gcloudͰRobo TestΛ࣮ߦ • gcloudΛΠϯετʔϧ͢Δ • https://cloud.google.com/sdk/docs/ downloads-interactive

  36. gcloud͔ΒRobo TestΛ࣮ߦ gcloud firebase test android run \ --type robo

    \ --app <apk file path> \ --device model=Pixel2,version=28,locale=ja_JP,orientation=portrait \ --timeout 90s • ͜Μͳײ͡ͷίϚϯυͰ࣮ߦ
  37. ·ͱΊ • Robo Test͸Α͍ • ؆୯ʹ࢖͍࢝ΊΒΕΔ • Test Report͕ॆ࣮ͯ͠Δͷ΋خ͍͠ •

    CIͱ͔ʹ΋૊ΈࠐΊΔͷΑ͍
  38. Thanksʂʂ