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

Android Testing Bootcamp #2: OpenSTF

Android Testing Bootcamp #2: OpenSTF

OpenSTFを紹介します

Gunther Brunner

June 09, 2016
Tweet

More Decks by Gunther Brunner

Other Decks in Programming

Transcript

  1. Gunther Brunnerʢάϯλɾϒϧϯφʔʣ
    @gunta85

    View full-size slide

  2. εϚʔτϑΥϯɾςετɾϑΝʔϜ

    View full-size slide

  3. ࣮ػϦϞʔτૢ࡞ ϒϥ΢β͔ΒϥΫϥΫૢ࡞

    View full-size slide

  4. ࣮ػϦϞʔτૢ࡞ ϒϥ΢β͔ΒϥΫϥΫૢ࡞

    View full-size slide

  5. URLϒϥ΢δϯά
    • Ͳͷϒϥ΢βͰ΋URLΛ

    ೖྗ͠ͳ͕ΒαΠτ֬ೝ

    • Πϯετʔϧ͞Ε͍ͯΔϒϥ΢
    βҰͷϦετϦΞϧλΠϜऔಘ

    View full-size slide

  6. Ωϟϓνϟ
    • ੩ࢭըͷΩϟϓνϟ

    • ϦΞϧλΠϜϦαΠζ

    • ΩϟϓνϟͷURLγΣΞ

    View full-size slide

  7. ΞϓϦΞοϓϩʔυ
    • APKϑΝΠϧΛ؆୯ʹ

    υϥοάˍυϩοϓ

    • ଈ࣌ΞοϓϩʔυˍΠϯετʔϧ

    • ىಈ͍ͨ͠ΞΫςΟϏςΟͷબ୒

    View full-size slide

  8. ίϐʔˍϖʔετ
    • ࣮ػ㲗ύιίϯͷ

    ίϐʔˍϖʔετ

    • ϚϧνݴޠରԠ

    View full-size slide

  9. ΞϓϦγϣʔτΧοτ
    • Α͘࢖ΘΕ͍ͯΔ

    γϣʔτΧοτ

    View full-size slide

  10. ϦϞʔτσόοά
    • ࣗ෼ͷύιίϯʹܨ͕͍ͬͯΔ͔
    ͷΑ͏ʹϦϞʔτσόοά͕Մೳ

    • Android StudioɺEclipseରԠ

    • Chrome DevTools΍Firefoxɺ

    ADBͱ઀ଓՄೳͳ΋ͷ͸શͯରԠ

    View full-size slide

  11. ࣮ػࣸਅ
    • ࣮ػͷ࣮෺ࣸਅͷ֬ೝ

    View full-size slide

  12. ϚφʔϞʔυ
    • ϚφʔϞʔυઃఆͷมߋ

    View full-size slide

  13. ετΞϩάΠϯࣗಈԽ
    • άʔάϧϓϨΠ౳ʹϩάΠϯ 

    <։ൃதػೳ>

    View full-size slide

  14. ϦΞϧλΠϜϩά
    • Logcatͷϩάදࣔ

    • ϦΞϧλΠϜϑΟϧλϦϯά

    View full-size slide

  15. ୺຤ݕࡧ
    • ϝʔΧʔɺOSόʔδϣϯɺ

    ൃച೔ͳͲͷ࣮ػݕࡧ͕Մೳ

    View full-size slide

  16. ߴ౓ͳೖྗ
    • ϋʔυΩʔͷԕִૢ࡞

    • ిݯϘλϯɺԻྔɺ

    ϝσΟΞΩʔɺD-PadΩʔ౳

    View full-size slide

  17. ϋʔυ΢ΣΞৄࡉ
    • ϋʔυ΢ΣΞͷεϖοΫৄࡉ

    • όοςϦʔ݈߁ঢ়ଶɺԹ౓ɺి
    ѹɺΩϟϦΞɺి࿩൪߸ɺσΟε
    ϓϨΠɺωοτϫʔΫɺOSৄࡉ

    View full-size slide

  18. ࣮ػ࠶ىಈ
    • ϦϞʔτ࠶ىಈ

    View full-size slide

  19. Ϧόʔεϙʔτ
    ϑΥϫʔσΟϯά
    • ϩʔΧϧαʔόʔͷαΠτ֬ೝ

    View full-size slide

  20. ϚϧνݴޠରԠUI
    • ೔ຊޠ

    • ӳޠ

    • ϑϥϯεޠ

    • εϖΠϯޠ

    • ϙʔϥϯυޠ

    • தࠃޠ

    • ؖࠃޠ

    • ϩγΞޠ

    View full-size slide

  21. ϚϧνσόΠεૢ࡞

    View full-size slide

  22. εϚϗ͔ΒͰ΋
    ԕִૢ࡞
    • AndroidΛผͷεϚϗ͔Βૢ࡞

    • ϚϧνλονରԠ

    View full-size slide

  23. 100% Apache 2.0 ϥΠηϯε
    https://openstf.io

    View full-size slide

  24. ಋೖࣄྫ
    ίϛοτߩݙ

    View full-size slide

  25. ಋೖࣄྫ
    ΦϯϓϨϛεͰ΋ಈͨ͘Ί
    ڞ࢈ओٛࠃՈͰ͸ಛʹਓؾ

    View full-size slide

  26. ΦϯϓϨϛε൛ͷ૊ཱ
    • USBϋϒΛߪೖ
    • ख࣋ͪͷAndroid࣮ػΛܨ͙

    View full-size slide

  27. αʔόʔ૊Έཱͯ
    Android 28୆ରԠ
    PCαʔόʔ 1୆
    USBϋϒ 4୆
    USBέʔϒϧ 28ຊ

    View full-size slide

  28. RaspberryͷΑ͏ͳখܕPC
    Android 3୆ରԠ
    খܕPC 1୆
    USBϋϒ ແ͠
    USBέʔϒϧ 3ຊ

    View full-size slide

  29. STF σόΠεϥοΫ

    View full-size slide

  30. • Android 2.3.3 ~ 6.0.1
    • Android N Preview 3
    • Android Wear ~5.1
    • FireOSɺMIUIɺCyanogenMod౳
    • ୺຤ROOT͸ෆཁ
    ରԠOSʢ࣮ػʣ

    View full-size slide

  31. ରԠϒϥ΢βʢΫϥΠΞϯτʣ
    • Google Chrome (σεΫτοϓ൛ɾϞόΠϧ൛)
    • Safari (σεΫτοϓ൛ɾϞόΠϧ൛)
    • Mozilla Firefox
    • Internet Explorer
    • Opera

    View full-size slide

  32. ରԠOSʢαʔόʔʣ
    • CoreOSʢਪ঑ʣ
    • BSDɺLinux
    • Mac OS X

    View full-size slide

  33. STFͷΠϯετʔϧ
    Ϣʔβ͸Πϯετʔϧෆཁ

    View full-size slide

  34. ϩʔΧϧͰΠϯετʔϧ (Mac OS X)
    • ADBΛΠϯετʔϧ
    • ґଘؔ܎ΛΠϯετʔϧ
    • STFΛΠϯετʔϧ
    brew install node rethinkdb graphicsmagick zeromq protobuf
    npm install -g stf
    Android SDK Tools / Android Studioʹؚ·Ε͍ͯΔ

    View full-size slide

  35. ϩʔΧϧͰ࣮ߦ
    • σʔλϕʔεΛ࣮ߦ
    • STFΛ࣮ߦ
    stf local
    rethinkdb

    View full-size slide

  36. LANͰ࣮ߦ (؆қ൛)
    • σʔλϕʔεΛ࣮ߦ
    • STFΛ࣮ߦ
    • ྫɿPCͷIP͸192.168.0.1ͷ৔߹ɺ

    ଞͷPC͸http://192.168.0.1:7100 ͔ΒΞΫηεՄೳ
    stf local —-public-ip 192.168.0.1
    rethinkdb

    View full-size slide

  37. STF V2 ۙ೔ϦϦʔε
    • STFͷ৽ػೳɹϒϥϯν2.0.0
    • ࣗಈςετͰͷར༻ɿREST APIΛ௥Ճ
    • ୺຤ͷεςʔλεʢར༻தɾΦϑϥΠϯʣ͕औಘɾมߋՄೳ
    • ୺຤ͷ৘ใʢOSɾϞσϧʣ͕औಘՄೳ

    View full-size slide

  38. STF V2 ۙ೔ϦϦʔε

    View full-size slide

  39. STF V2 ۙ೔ϦϦʔε

    View full-size slide

  40. ࣗಈԽ
    • جຊతʹ͸OpenSTF + Jenkins + Appium + Docker
    • JUnit4ɺRoboelectricɺEspressoɺUI Automatorɺ
    RobotiumɺeggPlant΋OK

    View full-size slide

  41. ଞͷπʔϧΑΓ༏Ε͍ͯΔϙΠϯτ
    • ࢖͍΍͍͢UI / UX
    • ը໘సૹ͕ૣ͍ʢ30fpsʙ60fpsʣ
    • Ϩεϙϯεૢ࡞͕ૣ͍
    • ศརͳػೳ͕ͨ͘͞Μ౥ࡌ͞Ε͍ͯΔ
    • Φʔϓϯιʔεɾແঈ
    • ϓϥΠϕʔτΫϥ΢υɾΦϯϓϨϛεͰ΋ར༻Մೳ

    View full-size slide

  42. ଞͷπʔϧΑΓ༏Ε͍ͯΔϙΠϯτ
    • ׬શΦʔϓϯιʔε
    • ৴པੑɿ੬ऑੑ΍όάͷमਖ਼͸୭Ͱ΋֬ೝ͕Ͱ͖ɺ͍ͪૣ͘मਖ਼͕Մೳɻ
    • ҆ఆੑɿ੡଄ݩͷ౎߹ʢ౗࢈ɺଧͪ੾Γ౳ʣʹΑΔফ໓͕ଘࡏ͠ͳ͍ɻ

    ϝϯςφϯεͷܧଓ͕Մೳɻ௕ظతͷ҆ఆͯ͠ར༻ɻ
    • ؂ࢹೳྗɿୈࡾऀػؔʹ؂ࠪΛґཔ͢Δࣄ͕Մೳɻ
    • ॊೈੑͱࣗ༝ɿطଘγεςϜͱͷ࿈ܞ΍৽͍͠ػೳͷ௥ՃͳͲɺ

    ॾʑมԽ͢Δࣄ৘ʹରͯ͠ॊೈରԠɻ
    • ίετɿແঈɻγεςϜಋೖ΍ϥΠηϯεͷ૯߹తͳίετ࡟ݮɻ
    • αϙʔτɿGitHub Issuesͱϝʔϧʹͯɻ

    View full-size slide

  43. αϙʔτʢ೔ຊޠɾӳޠʣ
    • GitHub Issues

    https://github.com/openstf/stf/issues
    ίϛϡχςΟαϙʔτ
    ๏ਓ޲͚αϙʔτ
    • ϝʔϧ

    [email protected]

    View full-size slide

  44. https://openstf.io

    View full-size slide