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

Spoonを使わずにテストケースでスクショを撮りたい

 Spoonを使わずにテストケースでスクショを撮りたい

B6721fa2b0c10af071878ad23d190291?s=128

Victor Lee

June 28, 2018
Tweet

Transcript

  1. 4QPPOΛ࢖Θͣʹ ςετέʔεͰεΫγϣΛࡱΓ͍ͨ 4IJOKVLVBBS !LPOZBWJD

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

  3. ‣ ΞϓϦ಺ϝοηʔδ ‣ Ϣʔβʔૢ࡞ͰτϦΨʔ ‣ μΠΞϩάɾ
 ΦʔόʔϨΠɾόφʔ ‣ ηάϝϯτ ‣

    "#ςετ ‣ ίϯόʔδϣϯܭଌ ‣ ɾɾɾ
  4. ςετέʔεͰΞϓϦ಺ϝοηʔδͷදࣔΛ֬ೝ͍ͨ͠ ‣ όϦΤʔγϣϯ͕ଟ͗͢Δ ‣ ΞϓϦ಺ϝοηʔδͷछྨ ‣ ղ૾౓ ‣ ը૾ͷΞεϖΫτൺ ‣

    จࣈ਺ ‣ ɾɾɾ ‣ 6*ςετͰΞαʔγϣϯॻ͘ͷ͸ඇݱ࣮త ‣ ςετέʔεͰࣗಈͰεΫγϣࡱΓ͍ͨ
  5. 4QPPO

  6. ‣ ࣗಈͰεΫγϣΛࡱΔ ‣ ෳ਺୺຤ฒྻ࣮ߦ ‣ ௒ศར Spoon

  7. ͱ͜ΖͰʜ

  8. ৺഑͋Γ ‣ ΞϓϦ಺ϝοηʔδ͸දࣔͷ࢓ํͪΐͬͱҧ͏͚Ͳ͏·͘ࡱΕΔ͔ʁ ‣ 4%,ͷ6*ςετ͸"OESPJE5FTU0SDIFTUSBUPS͕΄΅ඞਢ ‣ ͜Ε͸4QPPOͷSVOOFSͱ͏·͘ڞଘͰ͖ΔͩΖ͏͔ʁ ‣ 6*ςετͰ࢖͏ΞϓϦ͸͋·Γґଘ૿΍ͨ͘͠ͳ͍ ‣

    ͦ΋ͦ΋εΫγϣࡱΔ͘Β͍ͳΒ؆୯ʹͰ͖ΔͷͰ͸ͳ͍͔ʁ
  9. ‣ 9$6*4DSFFOͰ
 ௒؆୯ʹͰ͖Δ XCUITestͷ৔߹

  10. 4QPPOͷ࣮૷ΛݟͯΈΔ

  11. ‣ #JUNBQͰ$BOWBTॳظԽ ‣ BDUJWJUZ
 HFU8JOEPX 
 HFU%FDPS7JFX 
 ESBX DBOWBT

     ‣ ͜Ε͚ͩʂ
  12. ͜ͷ··΍ͬͯΈΔ

  13. None
  14. None
  15. ΍ͬͺΓϝοηʔδ͕ඳը͞Εͳ͍

  16. -BZPVU*OTQFDUPS

  17. 4FMFDU8JOEPXͰ .BJO"DUJWJUZ͕ݸฒΜͰΔ

  18. None
  19. ΞϓϦ಺ϝοηʔδʢμΠΞϩάʣ ‣ %JBMPH'SBHNFOUͰ࣮૷͞Ε͍ͯΔ ‣ "DUJWJUZͱ͸ผͷ7JFXπϦʔʹͳΔ ‣ ΍ͬͺΓͩΊʁ

  20. ‣ #JUNBQͰ$BOWBTॳظԽ ‣ BDUJWJUZ
 HFU8JOEPX 
 HFU%FDPS7JFX 
 ESBX DBOWBT

     ‣ ͜Ε͚ͩʂ
  21. 7JFX͑͋͞Ε͹ESBX͢Δ͚ͩ

  22. 7JFX͑͋͞Ε͹Ͱ͖Δ ‣ 'SBHNFOU5BHΛ஌͍ͬͯΔ Fragment fragment = activityRule.getActivity() .getFragmentManager() .findFragmentByTag(fragmentTag); if

    (fragment != null) { View view = ((DialogFragment) fragment).getDialog() .getWindow() .getDecorView() .getRootView(); view.draw(canvas); }
  23. None
  24. ͣΕΔͷͰௐ੔ Fragment fragment = activityRule.getActivity() .getFragmentManager() .findFragmentByTag(fragmentTag); if (fragment !=

    null) { View view = ((DialogFragment) fragment).getDialog() .getWindow() .getDecorView() .getRootView(); int[] loc = new int[2]; view.getLocationOnScreen(loc); canvas.translate(loc[0], loc[1]); view.draw(canvas);
  25. None
  26. ΍ͬͨʂ

  27. ͱ͜ΖͰʜ

  28. όφʔλΠϓ͸%JBMPH'SBHNFOUͰ͸ͳ͍ ‣ 1PQVQ8JOEPXΛ࢖͍ͬͯΔ ‣ TFU$POUFOU7JFX ‣ 5BHͰऔΓग़ͤͳ͍ ‣ ΍ͬͺΓͩΊʁ

  29. 7JFXͷࢀরΛ ΞϓϦ͔Βςετέʔεʹ౉ͤ͹͍͍

  30. None
  31. ·ͱΊ ‣ ςετέʔεͰεΫγϣΛࡱΔʹ͸ɺ7JFXͷࢀর͕͋Ε͹Α͍ ‣ %JBMPH'SBHNFOUͷεΫγϣΛࡱΔʹ͸ɺ5BHͰ'SBHNFOUͷࢀরΛऔ Γग़ͦ͏ ‣ 1PQVQ8JOEPXͰग़ͨ͠7JFXͷεΫγϣΛࡱΔʹ͸ɺ༧Ί7JFXͷࢀ রΛ͍࣋ͬͯͳ͍ͱ͍͚ͳ͍ʢςετέʔε͕ϗϫΠτϘοΫεతʹ ͳΔʣ