iOSシミュレータでのUIテストの様子を録画してみよう

9bcd328daf60fe29dc9970f6cfc26730?s=47 Kenta Kase
December 05, 2017

 iOSシミュレータでのUIテストの様子を録画してみよう

iOS Test Night #6のLT発表資料です

9bcd328daf60fe29dc9970f6cfc26730?s=128

Kenta Kase

December 05, 2017
Tweet

Transcript

  1. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. iOS Test Night

    #6
 2017/12/05(Tue) Ճ੉݈ଠ@DeNA iOSγϛϡϨʔλͰͷ
 UIςετͷ༷ࢠΛ࿥ըͯ͠ΈΑ͏ 1
  2. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ࣗݾ঺հ w Ճ੉݈ଠʢ!,FTJOʣ

    ⁃ ॴଐ • %F/"48&5άϧʔϓςετج൫νʔϜ ⁃ ܦྺ • ϞόΠϧήʔϜ։ൃʢαʔόʔαΠυʣ • ೥݄͔Β48&5άϧʔϓ 2
  3. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. "QQJVNΛ࢖ͬͨ
 6*ςετʹ৮ΕͯΈͨײ૝ 3

  4. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ͕͔͔࣌ؒΔ 4

  5. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ςετམͪͨͱ͖ʹεΫγϣݟͯ΋Α͘෼͔Βͳ͍ 5 w

    ݁ہςετ͕࣮ߦ͞ΕΔ༷ࢠΛ؍࡯͢Δඞཁ͕͋Δ ࣮ࡍ ຊདྷظ଴͢Δ΋ͷ ͳ͔ͥϑΥʔϜ͕දࣔ͞Ε͍ͯͳ͍
  6. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. Կͱ͔࿥ը͍ͨ͠ 6

  7. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. 2VJDL5JNFͰ࿥ը 7 w

    ҰԠՄೳͰ͸͋Δ͕ w $6*͔Β࢖͑ͳ͍ͷͰෆศ
  8. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. γϛϡϨʔλͷը໘Λ࿥ը͢Δ ίϚϯυ͕͋ΔΒ͍͠ 8

  9. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. recordVideo w xcrun

    simctl io booted recordVideo ./test.mov w ىಈ͍ͯ͠ΔγϛϡϨʔλͷը໘Λ࿥ըͯ͘͠ΕΔ w $USM DͰ࿥ըऴྃ w ෳࡶͳ͜ͱ͸Ͱ͖ͳ͍
 w ςετͷ։࢝ͱऴྃʹ߹ΘͤͯίϚϯυΛ࣮ߦ͢Ε͹
 ࣗಈԽͰ͖ͦ͏ 9 ಈ࡞֬ೝ͸Xcode 9.1 XcodeͷϦϦʔεϊʔτʹΑΔͱ8.2͔Β௥Ճ͞ΕͨΑ͏Ͱ͢ h-ps://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/IntroducDon.html#//apple_ref/doc/uid/ TP40001051-CH1-SW9
  10. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ॻ͍ͯΈ·ͨ͠ w ςετ։࢝લʹrecordVideoΛόοΫάϥ΢ϯυͰ࣮ߦ

    w ϓϩηε*%Λอଘ͓ͯ͘͠ w ςετऴྃޙʹ4*(*/5ʢDUSM DʣΛ࣮ߦͯ͠࿥ըऴྃ 10 # recordVideoΛόοΫάϥ΢ϯυͰ࣮ߦ xcrun simctl io booted recordVideo screenshots/test.mov & # ϓϩηεIDΛอଘ PID=`echo $!` # ςετ࣮ߦ bundle exec rspec spec/scenario_test.rb # όοΫάϥ΢ϯυͷrecordVideoʹSIGINTγάφϧΛૹ৴ kill -2 $PID
  11. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. Ͱ͖ͨ 11

  12. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ΋ͬͱศརʹ͍ͨ͠ w γϛϡϨʔλͷσόΠε΍J04ͷόʔδϣϯΛࢦఆ͍ͨ͠

    ⁃ xcrun simctl io booted recordVideo ./test.mov ⁃ booted͸ىಈ͍ͯ͠ΔγϛϡϨʔλͱ͍͏ҙຯ ⁃ ෳ਺ͷγϛϡϨʔλ͕ىಈ͍ͯ͠Δ৔߹ʹ࿥ը͢ΔγϛϡϨʔλΛࢦ ఆ͍ͨ͠ w ςετέʔεຖʹಈըΛ෼ׂ͍ͨ͠ w ࣦഊͨ͠ςετέʔε͚ͩಈըΛ࢒͍ͨ͠ 12
  13. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ॻ͍ͯΈ·ͨ͠WFS̎ w HJTU

    ⁃ HPPHM;6W/4 ⁃ "QQJVN SVCZ STQFDΛ૝ఆ
 w ࿥ը͢ΔγϛϡϨʔλΛ୺຤ɺJ04όʔδϣϯͰࢦఆ ⁃ capabilityͷdeviceName, platformVersion ⁃ xcrun simctl listͰγϛϡϨʔλͷ6%*%Λಛఆ w before(:each) after(:each)Ͱ࿥ըͷ։࢝ɺऴྃ w ࣦഊͨ͠৔߹͚ͩಈըΛ࢒͢ 13
  14. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. σϞ 14 εΫγϣ

    ಈը
  15. Copyright (C) DeNA Co.,Ltd. All Rights Reserved. ·ͱΊ w γϛϡϨʔλͰͷ6*ςετͷ༷ࢠΛ࿥ը͢Δํ๏Λ঺հ

    ⁃ xcrun simctl io booted recordVideoศར ⁃ recordVideoࣗମ͸Appium΍rubyʹґଘ͍ͯ͠ͳ͍ͷͰɺ
 ৭ʑͳ࢖͍ํ͕Ͱ͖ͦ͏ w HJTU ⁃ HPPHM;6W/4 15