PHP + Capybara を試してみた / PHP with Capybara

PHP + Capybara を試してみた / PHP with Capybara

3da5b00de1285b12a17d730262cc4824?s=128

Yoshiaki Yoshida

April 07, 2016
Tweet

Transcript

  1. ʘ1)1 $BQZCBSBΛࢼͯ͠Έͨʗ දࢀಓSC

  2. • @kakakakakku • Yoshiaki Yoshida • CyberAgent Crowd Funding, Inc.

    • Makuake • DevOps, Ruby, Certified Scrum Master • http://kakakakakku.hatenablog.com/ • https://github.com/kakakakakku
  3. ॕ

  4. ࠷ۙͷϝΠϯݴޠ

  5. ΍ͬͺΓ3VCZ࢖͍͍ͨ 㾎 $IFGΛॻ͍ͨΓ 㾎 4FSWFSTQFDΛॻ͍ͨΓ 㾎 "844%,GPS3VCZͰࣗಈԽͨ͠Γ 㾎 ݸਓ༻πʔϧΛॻ͍ͨΓ

  6. νϟϯε౸དྷ 㾎 &OEUP&OE5FTUJOHϦϓϨΠε 㾎 ༩͑ΒΕͨظؒ͸िؒ 㾎 ࠓ೔ͷ࿩͸͔ͳΓجຊతͳײ͡Ͱ͢

  7. #FGPSF4FMFOJVN

  8. &&ઐ༻؀ڥ ։ൃऀ ϩʔΧϧ؀ڥ

  9. &&ઐ༻؀ڥ ։ൃऀ ϒϥ΢βґଘ 'JSFGPYͰ࣮ߦ $*ෆՄೳ 9.-πϥΠ Ϟνϕʔγϣϯ௿Լ ʢਐ௙μϝͰ͢ʣ ύϥϨϧ࣮ߦෆՄೳ ϏϧτΠϯαʔόͬͯԿʁ

    ϩʔΧϧ؀ڥ
  10. ՝୊ײ 㾎 ৬ਓܳ 㾎 ܧଓతʹ࣮ߦ͢Δश׳͕ࠜ෇͔ͣ 㾎 ೔ʑͷ6*มߋͷӨڹͰಈ͔ͳ͘ͳͬͨγφϦΦଟ਺ 㾎 ςελʔͷෛՙ͕ϦϦʔεલʹूத

  11. None
  12. ιϦϡʔγϣϯ 㾎 34QFD $BQZCBSB 1PMUFSHFJTU 㾎 3BJMTʹґଘͤͣ1)1ΞϓϦέʔγϣϯͰ΋࢖͑Δ 㾎 $BQZCBSB%4-ͷ௚ײతͳॻ͖ຯ 㾎

    1PMUFSHFJTUʹΑΔ)FBEMFTT#SPXTFSͷ࣮ݱ
  13. "GUFS$BQZCBSB

  14. &&ઐ༻؀ڥ ։ൃऀ ϩʔΧϧ؀ڥ $*؀ڥ ύϑΥʔϚϯεվળ γφϦΦύλʔϯ૿ 3VCZͩʂ $*࣮ߦ ϩʔΧϧ؀ڥ

  15. γφϦΦ 㾎 ໿FYBNQMFT 㾎 όϦΤʔγϣϯ 㾎 1$41 㾎 ܾࡁػೳ 㾎

    ϦονΤσΟλػೳ 㾎 $,&EJUPS ʢαϯϓϧʣ
  16. ΩοΫΦϑ 㾎 ࣾ಺ษڧձͰαϯϓϧΛ࣮૷ͯ͠঺հ 㾎 جຊతͳγφϦΦΛઌʹ࣮૷ 㾎 3VCPDPQͰελΠϧΛඪ४Խ 㾎 3VCZ3BJMTܦݧऀ͕๻͚ͩͩͬͨͨΊ

  17. ߴ଎Խ҆ఆԽ 㾎 ϑϩϯτͷڍಈ͕ෆ҆ఆ 㾎 IUUQTHJUIVCDPN/P3FE*OLSTQFDSFUSZ 㾎 ฒߦ࣮ߦ 㾎 IUUQTHJUIVCDPNHSPTTFSQBSBMMFM@UFTUT 㾎

    &&ઐ༻؀ڥͷνϡʔχϯά
  18. ϝϯςφϒϧ 㾎 ڞ௨ॲཧ͸Ͱ͖Δ͚ͩϚΫϩԽ 㾎 91BUIͷॏෳ͸XJUIJOͰ%3:ʹ feature 'xxx' do scenario 'yyy'

    do within(:xpath, '//*[@id="zzz"]') do expect(find(:xpath, './/div[1]')).to have_content 'value_1' expect(find(:xpath, './/div[2]')).to have_content 'value_2' expect(find(:xpath, './/div[3]')).to have_content 'value_3' end end end
  19. ࠔͬͨ͜ͱ 㾎 ࠷৽1IBOUPN+4ͩͱBUUBDI@pMFͰΤϥʔ 㾎 $BQZCBSB1PMUFSHFJTU0CTPMFUF/PEF 㾎 1IBOUPN+4Ͱਖ਼ৗʹಈ࡞ͨ͠ 㾎 1IBOUPN+4Ϗϧυ஗͗͢ ----------------------------------------

    WARNING ---------------------------------------- Building PhantomJS from source takes a very long time, anywhere from 30 minutes to several hours (depending on the machine configuration). We recommend you use the premade binary packages on supported operating systems.
  20. ฉ͖͍ͨ͜ͱ 㾎 Ͳ͏΍ͬͯޮ཰తʹ&&Λॻ͍ͯ·͔͢ʁ 㾎 )FBEMFTTͩͱ֬ೝ͕໘౗ͳͱ͖΋͋Δ 㾎 TBWF@TDSFFOTIPU 㾎 TBWF@BOE@PQFO@QBHF

  21. 'VUVSF$POUBJOFST

  22. %PDLFS؀ڥ ։ൃऀ ϩʔΧϧ؀ڥ %PDLFSͩʂ εέʔϧ ࢖͍ࣺͯ؀ڥ $*؀ڥ

  23. 5IBOLZPV