E2Eテストに向き合う/PHPerKaigi2020

 E2Eテストに向き合う/PHPerKaigi2020

E2Eテストは"遅い"や"不安定"という理由で実施を諦めていませんか?
また、E2Eテストは大変すぎる、と思っていませんか?
おおくの現場でE2Eテストの範囲や実施内容に対する理解は、単体テストや結合テストと比べて曖昧になっているような気がします。
このセッションでは、Testing Pyramidと、その中でもE2Eテストの範囲や実施内容に対する理解を深め、どのようなツールを使うと良いのか?
といったプラクティスを解説していきます。

C4c161ae9eeeed8f161197410f7a228a?s=128

Kenichiro Kishida

February 10, 2020
Tweet

Transcript

  1. 1)1FS,BJHJ ,FOJDIJSP,JTIJEB !TJ[VIJLP &&ςετʹ޲͖߹͏

  2. ,FOJDIJSP,JTIJEB 5PLZP +"1"/ TJ[VIJLP!HNBJMDPN !TJ[VIJLP IUUQTHJUIVCDPNTJ[VIJLP IUUQCMPHPQFOUPLZPKQ

  3. w5FTUJOH1ZSBNJE w1SBDUJDBM5FTU1ZSBNJE w5PPMT 5PEBZT

  4. 5PEBZT w5FTUJOH1ZSBNJE w1SBDUJDBM5FTU1ZSBNJE w5PPMT

  5. w(PPHMFʹΑΔͱ wˋΤϯυπʔΤϯυςετ wˋ݁߹ςετ wˋ୯ମςετ https://testing.googleblog.com/2015/04/just-say-no-to-more-end-to-end-tests.html 5FTUJOH1ZSBNJE

  6. &&ςετ ιϑτ΢ΣΞશମΛ࠷ॳ͔Β࠷ޙ·Ͱςετ͠ ͯɺΞϓϦέʔγϣϯ͕ظ଴Ͳ͓Γʹಈ࡞͢Δ ͜ͱΛ֬ೝ͢Δख๏

  7. Θ͔ΔΑ͏ͰΘ͔ΒΜ

  8. https://docs.google.com/presentation/d/15gNk21rjer3xo- b1ZqyQVGebOp_aPvHU3YH7YnOMxtE/edit#slide=id.g437663ce1_53_98 Quote: Google Test Automation Conference 2014 Opening Keynote

  9. https://watirmelon.blog/tag/testing-pyramid/ A Software Testing Blog
 By Alister Scott.

  10. https://watirmelon.blog/tag/testing-pyramid/

  11. 5PEBZT w5FTUJOH1ZSBNJE w1SBDUJDBM5FTU1ZSBNJE w5PPMT

  12. &&ςετ͕ࣦഊ͢Δͱ w ͳΜͰࣦഊͨ͠ͷ͔Θ͔Βͳ͍ͨΊɺ
 ࣌ؒΛ͔͚ͯݪҼΛಥ͖ࢭΊΔඞཁ͕͋Δ w αʔόʔ͸Ͳ͏ʁ w σϓϩΠ͸੒ޭ͍ͯͨ͠ʁ w σʔλ͸͋ͬͯΔʁ

    w ςετίʔυ͸Ͳ͏ʁ w ϒϥ΢βͷΞοϓσʔτ͕ݪҼʁ w ςετ͕յΕ΍͍͢ͷʁ https://watirmelon.blog/tag/testing-pyramid/
  13. https://speakerdeck.com/tsuemura/kurosuburauzatesutofalsean-toan-toan

  14. https://martinfowler.com/articles/practical-test-pyramid.html 26 February 2018

  15. 6*ςετWT&&ςετ w 6*ςετͱ&&ςετ͸ಉ͡΋ͷͱݴΘΕΔ͜ͱ͕͋Γ ·͢ɻ w ΞϓϦέʔγϣϯΛ&&Ͱςετ͢Δ͜ͱ͸ɺଟ͘ͷ৔ ߹ɺ6*Λհͯ͠ςετΛ࣮ߦ͢Δ͜ͱΛҙຯ͠·͢ɻͨͩ ͠ɺͦͷٯ͸౰ͯ͸·Γ·ͤΜɻ w 6*ͷςετ͸ɺ&&Ͱߦ͏ඞཁ͸͋Γ·ͤΜɻ࢖༻͢Δ

    ςΫϊϩδʔʹԠͯ͡ɺ6*͸ɺόοΫΤϯυΛελϒΞ΢ τͨ͠ϑϩϯτΤϯυίʔυͷϢχοτςετΛ࡞੒͢Δ ͷͱಉ͘͡Β͍؆୯Ͱ͢ɻ https://martinfowler.com/articles/practical-test-pyramid.html
  16. &&ςετͰ͸ w ϝϯςφϯείετ͕ߴ͍ͨΊɺ&&ςετͷ਺Λ࠷খݶʹ཈ ͑Δͱྑ͍ɻ w Ϣʔβʔ͕ΞϓϦέʔγϣϯͰߦ͏Ձ஋ͷߴ͍ΠϯλϥΫγϣ ϯɺ੡඼ͷ֩ͱͳΔՁ஋Λఆٛ͢ΔϢʔβʔδϟʔχʔΛߟ ͑ɺ࠷΋ॏཁͳεςοϓΛࣗಈԽ͞Εͨ&&ςετͰදݱ͢Δ ͱྑ͍ɻ w

    ςετϐϥϛουʹ͸ɺ͋ΒΏΔछྨͷԼҐϨϕϧͷςετ͕ ͨ͘͞Μ͋Γ·͢ɻ͜ΕΒͷςετΛΑΓߴ͍ϨϕϧͰ܁Γฦ ͢ඞཁ͸͋Γ·ͤΜɻϝϯςφϯεʹଟେͳ࿑ྗΛඅ΍͠ɺଟ ͘ͷޡݕग़Λߦ͏ͱɺ஗͘ͳΓɺςετͷ৴པΛࣦ͍·͢ https://martinfowler.com/articles/practical-test-pyramid.html
  17. &&ͰධՁ͢Δ͜ͱΛఆٛ͢Δ w ॏཁͳγφϦΦͱεςοϓ w γεςϜؒ࿈ܞ w ύϑΥʔϚϯε w ʜʜʜ

  18. 5PEBZT w5FTUJOH1ZSBNJE w1SBDUJDBM5FTU1ZSBNJE w5PPMT

  19. None
  20. wϒϥ΢βࣗಈԽιϦϡʔγϣϯͰ͢ɻ w/PEFKT͔Β$ISPNFΛૢ࡞
 ૢΓਓܗQVQQFUFFS ͢ΔͨΊͷ"1* Λఏڙ͍ͯ͠Δɻ wOQNͰϒϥ΢β͕Πϯετʔϧ͞ΕΔͷ Ͱɺ؀ڥઃఆ΍ߏஙͷඞཁ͕ͳ͍ɻ wϝϞϦϦʔΫ΍ύϑΥʔϚϯεΦʔόʔ ϔουΛؾʹ͢Δඞཁ͕ͳ͍ 1VQQFUFFS

    https://pptr.dev/
  21. w8FCςετ͸஗͍ͱ͍͏౎ࢢ఻આ w#SPXTFS$POUFYU"1*Ͱղܾ wςετ͕'MBLZͱ͍͏౎ࢢ఻આ wXBJU'PS9"1*Ͱղܾ wͲ͜Ͱςετ͕ࣦഊ͔ͨ͠Θ͔Βͳ͍ wDPOTPMFMPHʹԿ͔Τϥʔ͕ग़͍ͯͳ ͍͔νΣοΫͰ͖Δ ͜Ε·Ͱͷ՝୊Λղܾ͢Δ

  22. 6*ςετΛআ͘&&ςε τͷ՝୊ ϥετϐʔε  ΛຒΊΔͷͰ͸ʁ

  23. w.PCJMFσόΠεΤϛϡϨʔγϣϯ w0GqJOFαϙʔτ wαʔϏεϫʔΧʔͷݕূ w(FP-PDBUJPO w/FUXPSL.POJUPSJOH w,FZCPBSE.PVTF w1FSGPSNBODF5FTU w$PEF$PWFSBHF w"DDFTTJCJMJUZ ͦͷ΄͔ͷಛ௃

  24. https://chromedevtools.github.io/devtools-protocol/

  25. w+FTU͔Β1VQQFUFFSΛΑΓ؆୯ʹ࢖͑ ΔΑ͏ʹ͢ΔϥΠϒϥϦ
 
 KFTUQVQQFUFFS https://github.com/smooth-code/jest-puppeteer

  26. 1VQQFUSZ https://puppetry.app/ 4FMFOJVN*%&ϥΠΫͳ+FTU1VQQFUFFSͷίʔυΛੜ੒͢Δ(6*πʔϧ

  27. wެࣜ&YBNQMF͕ࢀߟʹͳΓ·͢
 IUUQTHJUIVCDPNQVQQFUFFSFYBNQMFT 6*ςετͰ࢖͍͍ͨ৔߹

  28. w͜Ε·Ͱ$ISPNF͚͚ͩͩͬͨͲɺ 'JSFGPY΋࢖͑ΔΑ͏ʹͳΔΑʂ wݱࡏͷ"1*Λαϙʔτ 1VQQFUFFSpSFGPY https://github.com/puppeteer/puppeteer/tree/master/experimental/puppeteer- firefox

  29. https://docs.microsoft.com/ja-jp/microsoft-edge/puppeteer

  30. https://github.com/nesk/puphpeteer 1V1)1FUFFS w1)1͔Β1VQQFUFFSΛಈ͔͢ϥΠϒϥϦ

  31. 1MBZXSJHIU https://github.com/microsoft/playwright

  32. https://github.com/microsoft/playwright

  33. We recognize WebDriver as a universal standard for the web

    automation and testing. At the same time we were excited to see Puppeteer affect the WebDriver agenda, steer it towards the bi-directional communication channel, etc. We hope that Playwright can take it further and pioneer support for numerous PWA features across the browsers as they emerge:
 by Playwright
  34. WJTJUNZCMPHHJUIVC https://github.com/sizuhiko http://blog.open.tokyo.jp