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

RailsのSystem specから 🎭Playwrightを使う

RailsのSystem specから 🎭Playwrightを使う

2021/06/18 銀座Rails#34の発表スライド(一部省略)

Yusuke Iwaki

June 18, 2021
Tweet

More Decks by Yusuke Iwaki

Other Decks in Technology

Transcript

  1. 8IZTZTUFNTQFD GPSN@GPSʜSFNPUFUSVF w "KBY௨৴ͰύʔγϟϧϏϡʔΛ΋Β͖ͬͯͯɺK2VFSZͰBQQFOEVQEBUF 
 ˠύʔγϟϧϏϡʔͷςετΛॻ͍ͨͱ͜ΖͰɺ 
 ɹύʔγϟϧϏϡʔ͕͸Ίࠐ·Εͨશମ͕ಈ͘ͱ͸ݶΒͳ͍ 8FCQBDLFS w

    3FBDU΍7VFίϯϙʔωϯτΛz෦෼తʹz࢖༻͢Δύλʔϯ 
 ˠίϯϙʔωϯτͷ୯ମࢼݧ͕ॻ͚ͨͱͯ͠΋ɺ 
 ɹϖʔδશମ͕յΕ͍ͯͳ͍͔͸Θ͔Βͳ͍ɻ
  2. $BQZCBSB%4- ϒϥ΢βυΩϡϝϯτશମ $BQZCBSB4FTTJPO  %0.ཁૉ $BQZCBSB/PEF&MFNFOU BMM fi STUBUUBDI@ fi

    MFUFYUDIFDLDIPPTFTDSPMM@UPTDSPMM@CZ DMJDL@MJOL@PS@CVUUPODMJDL@CVUUPODMJDL@MJOL fi MM@JO fi OE fi OE@BMM fi OE@CVUUPO fi OE@CZ fi fi fi OE@MJOL UJUMFCPEZIUNMTPVSDF DVSSFOU@VSMDVSSFOU@IPTUD FYFDVUF@TDSJQUFWBMVBUF@TDSJQU WJTJUSFGSFTI HP@CBDLHP@GPSXBSE TFOE@LFZTXJUIJOXJUIJO@FMFNFOUXJUIJO@ fi FMETFUXJUIJO@UBCMFXJUIJO@GSBNF TXJUDI@UP@GSBNFDVSSFOU@XJOEPXXJOEPXTPQFO@OFX@XJOEPXTXJUD XJUIJO@XJOEPXXJOEPX@PQFOFE@CZTBWF@QBHFTBWF@BOE@PQFO@QBHF TBWF@TDSFFOTIPUTBWF@BOE@PQFO@TDSFFOTIPUSFTFU@TFTTJPOSFTQP TUBUVT@DPEFDVSSFOU@TDPQF <>BMMPX@SFMPBEDIFDLFE  DMJDLEJTBCMFE EPVCMF@DMJDL ESBH@UPESPQFWBMVBUF@BTZOD@TDSJQUFWBMVBUF@TDSJQU FYFDVUF@TDSJQU fl BTI IPWFSJOJUJBM@DBDIFJOTQFDUNVMUJQMF OBUJWF PCTDVSFE QBUISFBEPOMZ SFDUSFMPBESJHIU@DMJDLTDSPMM@UP TFMFDU@PQUJPOTFMFDUFE  TFOE@LFZTTFUTUZMFUBH@OBNFUFYU USJHHFSVOTFMFDU@PQUJPOWBMVF WJTJCMF
  3. $BQZCBSB͸%0.มߋݕ஌͕ෆ׬શʁ w $BQZCBSBࣗମͷػೳෆ଍ w ʮϖʔδભҠ͢Δ·Ͱ଴ͭʯ 
 ʮಛఆͷཁૉ͕ݱΕΔ·Ͱফ͑Δ·Ͱ଴ͭʯ 
 ˢ$BQZCBSB%4-Ͱ͸ॻ͚ͳ͍ɻ 


    w ಺෦తʹϛϦඵͷϙʔϦϯά 
 ˠ%0.มߋݕ஌͕ෆ׬શɻ λΠϚʔΛ࢓ֻ͚ͯ ݺͼݩ͔Βࢦఆ͞Ε͓ͨ࢓ࣄΛ͢Δ ཁૉ͕ݟ͔ͭΒͳ͍৔߹ʹ͸ ɹλΠϚʔ͕੾Ε͍ͯͳ͔ͬͨΒ ɹඵ଴͔ͬͯΒ ࠶౓ɺཁૉͷऔಘΛࢼΈͯ ϦτϥΠ͢Δ
  4. 8IZ1MBZXSJHIU w ͋ΒΏΔγʔϯΛαϙʔτ w ௥ՃͷυϥΠόʔͳͲෆཁͰɺ 
 $ISPNF .4&EHF 'JSFGPY 4BGBSJΛࣗಈૢ࡞Ͱ͖Δ

    w 8JOEPXT NBD04 -JOVYશରԠ w ϞόΠϧσόΠεͷΤϛϡϨʔγϣϯ w ϔουϨεʢը໘ͳ͠ʣϔουϑϧʢը໘͋Γʣ 👍 IUUQTQMBZXSJHIUEFWEPDTXIZQMBZXSJHIU͔ΒҾ༻ˍҰ෦ิ଍
  5. 8IZ1MBZXSJHIU w ଎ͯ͘ߴਫ਼౓ w "VUPXBJUJOHʹΑΓɺ 
 ɾ૝ఆͷ%0.ཁૉ͕ͨ·ͨ·ݱΕͳͯ͘΋ɺগ͠଴ͬͯ͘ΕΔ 
 ɾXBJU'PS4FMFDUPSΛ͍͍ͪͪॻ͔ͳͯ͘΋͍͍ w

    ωΠςΟϒͷϒϥ΢βΠϕϯτۦಈͰಈ࡞͢ΔͷͰɺ 
 ɾTMFFQͳͲ͕ෆཁ 
 ɹˠෆ҆ఆͳςετ͕ݮΒͤΔ w ϒϥ΢βࣗಈૢ࡞Λฒྻಈ࡞Մೳ 👍 👍 IUUQTQMBZXSJHIUEFWEPDTXIZQMBZXSJHIU͔ΒҾ༻ˍҰ෦ิ଍
  6. ͓Ͷ͕͍ w ͪΌΜͱಈ͔͘͸Θ͔Γ·ͤΜ͕ɺͨͿΜಈ͘ͷͰɺ 
 TZTUFNTQFDΛӡ༻͞Ε͍ͯΔํ͸ͥͻ࢖ͬͯΈ͍ͯͩ͘͞ɻ w ʮ4FMFOJVNͩͱಈ͘ͷʹɺ1MBZXSJHIUͩͱಈ͔ͳ͍Αʯ 
 Έ͍ͨͳ࣮ӡ༻ϑΟʔυόοΫɺͥͻ͍ͩ͘͞ɻ w

    ʮ1MBZXSJHIUͷ˓˓ػೳ͕3BJMTͰ࢖͑ͨΒ࠷ߴ͡Όͳ͍ʁʯ 
 Έ͍ͨͳఏҊ΋ɺͥͻ͍ͩ͘͞ υΩϡϝϯτIUUQTQMBZXSJHIUSVCZDMJFOUWFSDFMBQQ *TTVFIUUQTHJUIVCDPN:VTVLF*XBLJQMBZXSJHIUSVCZDMJFOUJTTVFT