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

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

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

Android Test Night #4で発表

Victor Lee

June 21, 2018
Tweet

More Decks by Victor Lee

Other Decks in Programming

Transcript

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

    NJO4EL7FSTJPO ‣ ֤ϑϨʔϜϫʔΫͷϓϥάΠϯ ‣ 6OJUZ$PDPTEY$PSEPWB.POBDB ‣ جຊతʹ͸ϒϦοδίʔυ͚ͩ ‣ ͲΜͲΜ૿͑Δʂ
  2. 4%,։ൃͰ࣮ࢪ͍ͯ͠Δςετ ‣ ୯ମςετ ‣ 3PCPMFDUSJDϕʔεͷ6OJU5FTU ‣ $*Ͱճ͍ͯ͠Δ ‣ ͔ͬ͠ΓͰ͖͍ͯΔ ‣

    ։ൃऀʹΑΔखಈςετ ‣ ໢ཏੑ͸ෆे෼ ‣ 2"νʔϜʹΑΔखಈςετ ‣ ఆৗతʹ΍Δ͜ͱ͸೉͍͠ ‣ BEIPDͳࣗಈςετ ‣ ࢖͍ࣺͯ
  3. 6*ςετͷઃܭ ‣ 3FQSP4%,Λ૊ΈࠐΜͩɺԿ΋͠ͳ͍ςετΞϓϦ ‣ ೖྗ ‣ ௨৴ϞοΫͰαʔόϨεϙϯεΛ࢓ࠐΉ ‣ 4%,"1*ͷݺͼग़͠ςετέʔεͰͦͷ··ॻ͚Δ ‣

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

    ‣ 63-TFU63-4USFBN)BOEMFS'BDUPSZ ‣ શ෦ͷίωΫγϣϯΛϋϯυϦϯά͠ͳ͍ͱ͍͚ͳ͍ ‣ Ұճ͔͠Ͱ͖ͳ͍
  5. ςετέʔεͷྫ @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(); } ‣