Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Pococha UIテストの運用をみすえた対応についての話

tarappo
October 14, 2020

Pococha UIテストの運用をみすえた対応についての話

2020年 10/14(水)のiOS Test TeaTime #1の発表資料です。
https://testonline.connpass.com/event/186146/

tarappo

October 14, 2020
Tweet

More Decks by tarappo

Other Decks in Technology

Transcript

  1. ར༻͍ͯ͠Δςετͷछྨ w Ϣχοτςετ w εφοϓγϣοτςετ w 7JTVBM3FHSFTTJPO5FTU w ΧλϩάԽ w

    6*ςετʢࠓճ࿩͢ͱ͜Ζʣ w ύϑΥʔϚϯεܭଌ w IUUQTTQFBLFSEFDLDPNLBSJBEBQVSJGBMTFQBIVPNBOTVXPKJTPLEFOJKJDFTVSV ʢJ04%$ʣ w खಈςετ $*$%αʔϏεͰܧଓతʹಈ͍͍ͯΔ 4
  2. ಋೖ͢Δࡍʹ͓͜ͳͬͨ͜ͱ ʢ̎ʣςετίʔυͷ࣮૷ w ςετίʔυଆ w ར༻͢ΔςεςΟϯάϑϨʔϜϫʔΫɺϥΠϒϥϦͷબఆ w ϓϩμΫτίʔυଆͰར༻͍ͯ͠Δ΋ͷΛར༻ w 9$5FTUʢ9$6*5FTUʣ

    w 2VJDLɺ/JNCMF w ςετίʔυͷॻ͖ํ w 1BHF0CKFDU1BUUFSOΛ࠾༻ w ԦಓͰ͕͢Ϣʔβͷঢ়ଶ͕ଟ͍1PDPDIBͩͱେมʹͳΔ͜ͱ΋͋Γ͑ΔͷͰʮ·ͣʯ͸࠾༻ w ϓϩμΫτίʔυଆ w ૢ࡞ର৅ͷ6*ཁૉʹ"DDFTTJCJMJUZ*EFOUJ fi FSΛઃఆ 8
  3. ಋೖ͢Δࡍʹ͓͜ͳͬͨ͜ͱ ʢ̑ʣςετࣦഊ࣌ͷτϦΞʔδͷ͠΍͢͞ରԠ w 6*ςετͰͷ੒Ռ෺Λ׆༻ w σόΠεϑΝʔϜͷػೳɿಛʹରԠΛ͠ͳͯ͘0, w ಈըɺϩάʢ#JUSJTFͰ͸5FTU3FQPSUTͱ͍͏Օॴ͔ΒݟΔ͜ͱ͕Ͱ͖Δʣ w ςετίʔυଆͷରԠ

    w 9$5"UUBDINFOUΛ࢖ͬͯςετʹؔ͢ΔσʔλΛอଘ w ࠓճ͸ը૾ͱϩάΛར༻ w ৘ใ͸3FTVMU#VOEMFʹอଘ͞ΕΔ w 3FTVMU#VOEMFɿϏϧυͱςετͷ݁ՌΛؚΉ৽͍͠ϑΝΠϧܗࣜʢYDSFTVMUʣ9DPEFʙ w ࢀߟɿIUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPOYDUFTUYDUBUUBDINFOU 16 YDSFTVMUϑΝΠϧͷαϯϓϧ
  4. ରԠࡦ ʢ̍ʣ$*$%αʔϏεʹͷͤͯܧଓ࣮ߦ w ςετίʔυଆͰ࣮૷ɿ w ؀ڥ৘ใ͸KTPOϑΝΠϧͰ؅ཧ w ͜ͷϑΝΠϧΛಡΈࠐΜͰςετίʔυ಺Ͱར༻ w #JUSJTF࣮ߦ࣌ʹKTPOϑΝΠϧΛ্ॻ͖͢Δ

    w #JUSJTFͷ؀ڥม਺Λ࢖্ͬͯॻ͖ w ϫʔΫϑϩʔ୯ҐͰઃఆՄೳ 20 ͜ΕʹΑΓฒྻ࣮ߦ࣌ͷʮϢʔβʯ͕Ϳ͔ͭΔ໰୊΋ճආͰ͖Δ
  5. ݟ͑ͨ՝୊ ʢ̎ʣ҆ఆੑɺ࣮ߦ࣌ؒͷ֬ೝͱରԠ w ࣮ߦ؀ڥͷαʔόબ୒ w ʣ"1*αʔόબ୒ w ʣ઀ଓ͍ͨ͠αʔόબ୒ w ʣબ୒͞Ε͍ͯΔ͔֬ೝ

    ࣮ߦ࣌ؒɿʣˠʣ·Ͱ͋Δఔ౓͕͔͔࣌ؒΔ ҆ఆੑɿݟ͍͑ͯͳ͍ൣғͰ΋উखʹ4DSPMMΛͯ͘͠ΕΔ͕ͨ·ʹࣦഊ͢Δ͜ͱ͕͋Δ ˠ҆ఆੑΛ͋͛ΔͨΊʹ̏ʣΛ༻ҙ࣮ߦ͕࣌ؒ૿͑Δ 24
  6. ݟ͑ͨ՝୊ ʢ̎ʣ҆ఆੑɺ࣮ߦ࣌ؒͷ֬ೝͱରԠ w ιʔγϟϧϩάΠϯ w ̍ʣΞϓϦͰͷιʔγϟϧϩάΠϯ w ̎ʣ4'4BGBSJ7JFX$POUSPMMFSͰදࣔ͞Εͨ8FCϖʔδͰͷϩάΠϯ w ̍ʣΞϓϦͰͷιʔγϟϧϩάΠϯ

    w ର৅ͷΞϓϦҎ֎΋ૢ࡞͸Մೳ w 9$6*"QQMJDBUJPO  w JOJU CVOEMF*EFOUJ fi FS4USJOH w ͔࣮͠͠ߦ؀ڥʹΑͬͯ͸ΞϓϦΛΠϯετʔϧ͢Δ͜ͱ͸ࠔ೉ w खݩʹ͋Δʮ୺຤ʯͰ͋Ε͹໰୊ͳ͍͕ɺσόΠεϑΝʔϜΛར༻͢Δ৔߹͸ࠔ೉ w ̎ʣ4'4BGBSJ7JFX$POUSPMMFSͰදࣔ͞Εͨ8FCϖʔδͰͷϩάΠϯʢࠓճ͸ͪ͜ΒΛબ୒ʣ 25
  7. ݟ͑ͨ՝୊ ʢ̎ʣ҆ఆੑɺ࣮ߦ࣌ؒͷ֬ೝͱରԠ w ιʔγϟϧϩάΠϯ w ࣮ߦ͕͔͔࣌ؒΔ w ʮϩάΠϯςετϩάΞ΢τʯͱ·Ͱ͍ͯ͠ΔͨΊ༨ܭʹ͔͔Δ w ҆ఆੑ͕Α͘ͳ͍

    w σόΠεϑΝʔϜͰ࣮ߦ͠ଓ͚Δෳ਺୺຤ͰϩάΠϯ͠ଓ͚Δˠ ΞΧ΢ϯτΛϩοΫ͞ΕΔ͜ͱ͕͋Δ w ͜ΕΒΛߟྀͨ͠ૢ࡞Λ૿΍͢ͷ͸େม 26
  8. ରԠࡦ ʢ̎ʣ҆ఆੑɺ࣮ߦ࣌ؒͷ֬ೝͱରԠ w ؀ڥม਺ͷར༻ w ର৅ͱͳΔ΋ͷ w ઀ଓઌʢ࣮ߦ؀ڥʣ w ϩάΠϯ͢ΔϢʔβʔ

    w ࢀߟɿ8SJUFUFTUTUPGBJM w IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED ϓϩμΫτίʔυଆͷվम 29
  9. ରԠࡦ ʢ̎ʣ҆ఆੑɺ࣮ߦ࣌ؒͷ֬ೝͱରԠ • ϓϩμΫτίʔυଆͰɺ؀ڥม਺ʹΑͬͯڍಈΛมߋ͢Δ let env = ProcessInfo.processInfo.environment guard let

    name = env["SERVER_NAME"], let host = env["SERVER_HOST"] else { return nil } ίʔυྫ ϓϩμΫτίʔυଆͷվम 30
  10. ରԠࡦ ʢ̎ʣ҆ఆੑɺ࣮ߦ࣌ؒͷ֬ೝͱରԠ • ςετίʔυଆͰ؀ڥม਺Λ౉͢ • ؀ڥ৘ใ͸jsonϑΝΠϧͰ؅ཧΛ͍ͯ͠ΔͷͰɺͦͷ஋Λ౉͚ͩ͢ ίʔυྫ self.launchEnvironment = ["SERVER_NAME":

    env.serverName, "SERVER_HOST": env.serverHost, "LOGIN_ID": env.loginID] ςετίʔυଆͷվम 31 ࢀߟɿIUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPOYDUFTUYDVJBQQMJDBUJPOMBVODIFOWJSPONFOU
  11. ରԠࡦ ʢ̏ʣςετࣦഊ࣌ͷτϦΞʔδͷ͠΍͢͞ରԠ w ̍ʣ2VJDLͰͷ9$5"UUBDINFOUରԠ extension QuickSpec { func takeScreenshot(name: String)

    { let screenshot = XCUIScreen.main.screenshot() let attachment = XCTAttachment(screenshot: screenshot) attachment.lifetime = .keepAlways attachment.name = name QuickSpec.current.add(attachment) } } ίʔυྫ 34
  12. վमʹ൐͏վળ಺༰ ҆ఆੑɾ࣮ߦ࣌ؒ w ҆ఆੑ޲্ w ֘౰ՕॴͰͷࣦഊ཰ڧˠ w ΞΧ΢ϯτϩοΫʹΑΔࣦഊؚΉ w σόΠεϑΝʔϜͰλΠϜΞ΢τʹͳͬͨճ਺ɿճ

    w ࣮ߦ࣌ؒͷ୹ॖ w ໿NJOˠ໿NJOʢ໿Ҏ্࡟ݮʣ w ͦͷଞ w ಈ࡞֬ೝͷ༰қ͞޲্ ҆ఆੑ޲্ɺ࣮ߦ࣌ؒͷ୹ॖʹΑΓ ࣮ߦλΠϛϯάΛ૿΍͢͜ͱ͕ग़དྷͨ 42