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

SDK開発にUIテストを導入してみた

 SDK開発にUIテストを導入してみた

Android Test Night #4で発表

B6721fa2b0c10af071878ad23d190291?s=128

Victor Lee

June 21, 2018
Tweet

Transcript

  1. 4%,։ൃʹ6*ςετΛಋೖͯ͠Έͨ "OESPJE5FTU/JHIU !LPOZBWJD

  2. αʔϏεͷ͝঺հ

  3. ‣ ΞϓϦϚʔέςΟϯάࢧԉ ‣ ࢪࡦ ‣ ϓογϡ௨஌ ‣ ΞϓϦ಺ϝοηʔδ ‣ ෼ੳ

    ‣ ఆྔ෼ੳ ‣ Ϣʔβʔૢ࡞ͷ࿥ը
  4. ‣ ϓογϡ௨஌ ‣ ηάϝϯτ ‣ Ϧον௨஌ ‣ σΟʔϓϦϯΫ ‣ ֆจࣈ

    ‣ "#ςετ ‣ ίϯόʔδϣϯܭଌ ‣ ɾɾɾ
  5. ‣ ΞϓϦ಺ϝοηʔδ ‣ Ϣʔβʔૢ࡞ͰτϦΨʔ ‣ μΠΞϩάɾ
 ΦʔόʔϨΠɾόφʔ ‣ ηάϝϯτ ‣

    "#ςετ ‣ ίϯόʔδϣϯܭଌ ‣ ɾɾɾ
  6. ࿥ըͱϢʔβʔૢ࡞ه࿥ͷ࠶ੜ

  7. !LPOZBWJD ཥঝӹʢΓͪ͐Μ͍ʣɾ୆࿷ग़਎ɾ೔ຊ೥໨ ࡶ৯ܥΤϯδχΞ d૊ࠐΈ04ݚڀ⾣dήʔϜ։ൃ⾣d4%,։ൃ

  8. 6*ςετಋೖͷഎܠ

  9. ΞϓϦ։ൃऀ͔Β͢Δͱɺ Α͘Θ͔ΒΜ4%,͸ݏΘΕऀʹͳΓ͕ͪ

  10. ͓٬͞Μ͕҆৺ͯ͠ɺ ؆୯ʹ4%,ΛಋೖͰ͖ͯ΄͍͠ʂ

  11. 4%,ͷߏ੒ ‣ ωΠςΟϒ4%,ʢJ04"OESPJEʣ ‣ 0CKFDUJWF$+BWB ‣ +BWB͚ͩݟΔͱϑΝΠϧɾ,ߦͷن໛ײ ‣ ֎෦ϥΠϒϥϦʔ͸Ұ੾࢖Θͳ͍ ‣

    NJO4EL7FSTJPO ‣ ֤ϑϨʔϜϫʔΫͷϓϥάΠϯ ‣ 6OJUZ$PDPTEY$PSEPWB.POBDB ‣ جຊతʹ͸ϒϦοδίʔυ͚ͩ ‣ ͲΜͲΜ૿͑Δʂ
  12. 4%,νʔϜ ‣ ਓͰ࡞ۀ෼୲ ‣ ϓϩμΫτ͸҆ఆظʹೖ͚ͬͨͲɺͦΕͰ΋ѹ౗తਓखෆ଍ ‣ ෆ۩߹ͷௐࠪˍमਖ਼ɺ࢓༷มߋɺ04ΞοϓάϨʔυରԠɺ
 ςΫχΧϧαϙʔτɾɾɾ ‣ ͔ͳΓେ͖͍ΫϥΠΞϯτ΋͍Δ͔Β৻ॏʹ΍Βͳ͍ͱ͍͚ͳ͍

    ‣ ͪΌΜͱ͔͚࣌ؒͯϨϏϡʔɾςετ͢Δ ‣ ҆ఆظʹೖ͔ͬͨΒͦ͜΍Γ͍ͨ͜ͱ͕૿͑Δ ‣ ςΫχΧϧɾσοτͷฦࡁ ‣ ςετͷࣗಈԽ
  13. 4%,։ൃͰ࣮ࢪ͍ͯ͠Δςετ ‣ ୯ମςετ ‣ 3PCPMFDUSJDϕʔεͷ6OJU5FTU ‣ $*Ͱճ͍ͯ͠Δ ‣ ͔ͬ͠ΓͰ͖͍ͯΔ ‣

    ։ൃऀʹΑΔखಈςετ ‣ ໢ཏੑ͸ෆे෼ ‣ 2"νʔϜʹΑΔखಈςετ ‣ ఆৗతʹ΍Δ͜ͱ͸೉͍͠ ‣ BEIPDͳࣗಈςετ ‣ ࢖͍ࣺͯ
  14. 4%,ςετͷ೉͠Έ

  15. ೉͠ΈͦͷҰ ‣ 4%,ʹ։ൃऀ͕৮Δ΋ͷ ‣ ςετͷ࠶ݱखॱʹɺίʔυΛॻ͘͜ͱؚ͕·Εͯ͠·͏ ‣ جຊతʹɺඇΤϯδχΞʹςετΛ೚ͤΒΕͳ͍ ‣ ςετΞϓϦΛ࡞Δ͜ͱ͸Ͱ͖Δɺ͕

  16. ೉͠Έͦͷೋ ‣ ͓٬͞ΜͷΞϓϦߏ੒͸͞·͟· ‣ UBSHFU4EL7FSTJPO ‣ 4VQQPSU-JCSBSZͷόʔδϣϯ ‣ ςετΞϓϦͰ͸͍ΖΜͳঢ়گΛΧόʔ͖͠Εͳ͍

  17. ೉͠Έͦͷࡾ ‣ ରԠ୺຤͕޿͍ ‣ "OESPJEd ‣ ϥΠϑαΠΫϧ͕௕͍ ‣ աڈόʔδϣϯͷ4%,͕ੜ͖Ԇͼଓ͚Δ

  18. 6OJU5FTU͸͔ͬ͠Γ͍ͯ͠Δɺ͕ ‣ ີ݁߹ ‣ େྔͷ4IBEPXΦϒδΣΫτͱϦϑϨΫγϣϯ ‣ ϦϑΝΫλʔ͢ΔͨͼʹյΕΔ ‣ ଍৔͕଍ᐫʹͳΔ

  19. ࣗಈςετͷϝϯςίετΛԼ͍͛ͨʜ खಈςετΛ؆୯ʹ৭Μͳ୺຤Ͱ࠶ݱ͍ͨ͠ʜ BEIPDͳςετΛҰͭʹ·ͱΊ͍ͨʜ

  20. ͦ͏ͩɺ6*ςετΛಋೖ͠Α͏ʂ

  21. 6*ςετʹର͢Δظ଴ ‣ *OTUSVNFOUFE5FTU ‣ ϒϥοΫϘοΫε ‣ ϦϑΝΫλϦϯάͰΫϥε໊͕มΘͬͯ΋मਖ਼͕ཁΒͳ͍ ‣ ࣗಈԽ ‣

    αʔόΛ༻ҙ͢Δඞཁ͕ͳ͍ʢ௨৴पΓΛϞοΫԽʣ
  22. ςετέʔεͷྫ ‣ ΞϓϦىಈ ‣ ΞϓϦ಺ϝοηʔδͷը૾ϩʔυ͕࢝·Δ ‣ Πϯδέʔλ͕දࣔ͞ΕΔ ‣ λΠϜΞ΢τ·Ͱʹը૾ϩʔυ͕׬ྃ͢Ε͹ɺ
 ͦΕΛදࣔ͢Δ

  23. 6*ςετͷઃܭ ‣ 3FQSP4%,Λ૊ΈࠐΜͩɺԿ΋͠ͳ͍ςετΞϓϦ ‣ ೖྗ ‣ ௨৴ϞοΫͰαʔόϨεϙϯεΛ࢓ࠐΉ ‣ 4%,"1*ͷݺͼग़͠ςετέʔεͰͦͷ··ॻ͚Δ ‣

    ΞϓϦͷϥΠϑαΠΫϧมԽ͍ΖΜͳखஈͰ؆୯ʹͰ͖Δ ‣ ग़ྗ ‣ ௨৴ϞοΫͰαʔόϦΫΤετΛݕূ ‣ 6*FTQSFTTPͰݕূ ‣ ϑΝΠϧॻ͖ग़͠
  24. ϋϚͬͨͱ͜Ζ

  25. ϋϚͬͨͱ͜ΖͦͷҰ ‣ ௨৴ͷϞοΫԽ ‣ ϞοΫϥΠϒϥϦʔ ‣ QPXFSNPDL NPDLJUP ‣ ϏϧυΤϥʔ

    ‣ 63-TFU63-4USFBN)BOEMFS'BDUPSZ ‣ શ෦ͷίωΫγϣϯΛϋϯυϦϯά͠ͳ͍ͱ͍͚ͳ͍ ‣ Ұճ͔͠Ͱ͖ͳ͍
  26. ϋϚͬͨͱ͜Ζͦͷೋ ‣ "OESPJE5FTU0SDIFTUSBUPS ‣ ςετέʔεؒ͸ͪΌΜͱϓϩηεΛ࠶౓্ཱͪ͛ͯ͘ΕΔ ‣ ΩϟογϡͷΫϦʔϯΞοϓͳͲ΋ઃఆͰ͖Δ ‣ "OESPJE5FTU0SDIFTUSBUPS͕ͳ͍ͱ ‣

    λΠϛϯά͕ͣΕͯɺλΠϛϯάґଘͷςετ͕ۃ୺ʹෆ҆ఆ
  27. ςετέʔεͷྫ @Test public void test_whenDownloadCompletedWithinTimeout_showMessageAfterAppLaunch() throws Throwable { setup(new JSONArray(Arrays.asList(createDialogMessage(""))));

    mConnectionMockFactory.setTimeout(2900); mActivityRule.launchActivity(new Intent()); sleep(4000); check_messageIsShown(); } @Test public void test_whenDownloadExceededTimeout_dismissMessageAfterAppLaunch() throws Throwable { setup(new JSONArray(Arrays.asList(createDialogMessage("")))); mConnectionMockFactory.setTimeout(3100); mActivityRule.launchActivity(new Intent()); sleep(4000); check_messageIsDismissed(); } ‣
  28. 6*ςετಋೖޙ ‣ œߦͷϦϑΝΫλϦϯάͰ׆༂ʂ ‣ ϦϑΝΫλʔ͠ͳ͍ͱͭΒ͍αϒγεςϜ͕͋ͬͨ ‣ ৽نػೳͷ࣮૷ͱಉ࣌ʹϦϑΝΫλϦϯά͢Δͷ͸ϋʔυϧ͕ߴ ͔ͬͨ ‣ ಺෦*'Λม͑ͣʹಥ؏޻ࣄ

    ‣ 6*ςετͰڍಈΛอূ͢Δ ‣ ಺෦*'ΛϦϑΝΫλϦϯά
  29. ͜Ε͔Βͷల๬ͱ՝୊ ‣ ల๬ ‣ ৽نͷػೳ௥Ճɾվमͷ͍ͭͰʹςετέʔεΛ௥Ճ͍ͯ͘͠ ‣ ͍ΖΜͳύϥϝʔλͰࣗಈεΫϦʔϯγϣοτ ‣ ՝୊ ‣

    ςετϓϩδΣΫτͷߏ੒͕๲େԽͦ͠͏ ‣ ͔͔࣌ؒΔͷͰ·ͩ$*Ͱճͤͳ͍