Slide 1

Slide 1 text

E2Eςετ͔Βෛՙࢼݧγφ ϦΦΛ࡞ͬͯΈͨ @mackee_w a.k.a macopy PR TIMES x ໘ന๏ਓΧϠοΫ߹ಉษڧձ 2022-11-11 19:00

Slide 2

Slide 2 text

@macopy • ໘ന๏ਓΧϠοΫ eεϙʔπࣄۀ෦ TonamelαʔόαΠυςοΫϦʔυ • Perlେ޷͖ Go΋޷͖ • ISUCON11 ༏উ • ISUCON12 ༧બ ग़୊ • ࠷ۙϋϚ͍ͬͯΔϒΩ͸ιΠνϡʔόʔ

Slide 3

Slide 3 text

Tonamelͷ࿩

Slide 4

Slide 4 text

ߏ੒

Slide 5

Slide 5 text

Client(Nuxt)͕GraphQLΛൃߦͯ͠

Slide 6

Slide 6 text

֤ϚΠΫϩαʔϏε͕GraphQLΛड͚Δ

Slide 7

Slide 7 text

ൃ୺ ෛՙࢼݧΛ͍ͨ͠

Slide 8

Slide 8 text

ͦͷଞ۩ମతͳ໨త

Slide 9

Slide 9 text

ෛՙࢼݧΛ΍ΔͨΊʹ άοζΛ࡞ͬͯ΋Β͏

Slide 10

Slide 10 text

εςʔδϯά؀ڥͷߏங

Slide 11

Slide 11 text

ຊ൪DB͔Βͷίϐʔ https://techblog.kayac.com/automate-initializing-databases-for-staging

Slide 12

Slide 12 text

k6ಋೖ

Slide 13

Slide 13 text

thanks! @ebi-yade

Slide 14

Slide 14 text

ͯ͞ɺͲ͏΍ͬͯγφϦΦΛॻ͜͏͔

Slide 15

Slide 15 text

՝୊: Tonamel͸SPA(ͳϖʔδ͕ଟ͍)

Slide 16

Slide 16 text

୯७ʹϖʔδΛfetch͢Δͱ NuxtͷΤϯτϦʔϙΠϯτͷHTML͕ ฦͬͯ͘Δ͚ͩ

Slide 17

Slide 17 text

“ٖࣅతʹຊ൪ΞΫηεʹ͍ۙ"

Slide 18

Slide 18 text

஫ҙ: ࠷ॳ͔Β͜ΕΛ໨ࢦ͞ͳ͍Ͱʂ • ͜Ε is ʮٖࣅతʹຊ൪ΞΫηεʹ͍ۙʙʯ • ·ͣ͸ `/` ͱ͔ΛF5࿈ଧ͢ΔΑ͏ͳ୯७ͳγφϦΦΛ࡞Γ·͠ΐ͏ • Ͱͳ͍ͱ͍ͭ·Ͱܦͬͯ΋ϕϯνϚʔΧʔࣗମͷڍಈ֬ೝ͕Ͱ͖ͳ͍ • ͜ͷ࣌఺Ͱ `/` ΍SPAͰ͸ͳ͍ϖʔδͷෛՙࢼݧ͸΍ͬͯΈ͍ͯΔ • ͦͯ͠”ऑ఺”͸ݟ͚͍ͭͯΔ…͕͜Ε͸·ͨผͷ࿩

Slide 19

Slide 19 text

࡞ઓ1: ۪௚ʹGraphQLΫΤϦΛॻ͍͍ͯ͘

Slide 20

Slide 20 text

ײ૝: େม • ʮ͜Εɺ΋͔ͯ͠͠ΫϥΠΞϯτଆͷίʔυΛ࠶࣮૷ͯ͠ͳ͍ʁʁʯ • ΫΤϦ͸͋Δఔ౓ྲྀ༻ग़དྷΔ΋ͷͷ(k6΋JSͳͷͰ)ɺॲཧͱ͔͸ίϐ ϖ͕೉͍͠ͷͰΫϥΠΞϯτͷڍಈΛಡΈͳ͕Βॻ͍͍͔ͯ͘͠ແ͍ • ͋Δఔ౓ॲཧΛؙΊΔ(ఘΊΔʁ)ʹͯ͠΋ɺՃݮ͕೉͍͠

Slide 21

Slide 21 text

࡞ઓ2: xk6-browser https://k6.io/docs/javascript-api/xk6-browser/

Slide 22

Slide 22 text

ʮϒϥ΢βΛ͍ͬͺ͍ฒ΂ͯΞΫηε ͠·͘Ε͹͍͍͡ΌΜʯ

Slide 23

Slide 23 text

݁Ռ: εέʔϧ͠ͳ͍, ҆ఆͤͣ • ͦ΋ͦ΋Chromium͔ͩΒͶ • xk6-browserͷ࢖͍ํ͕ѱ͍ͷ͔ɺ҆ఆ͍ͯ͠ͳ͍ͷ͔ɺΤϥʔ͕ग़ ·͘Δ

Slide 24

Slide 24 text

͸ʔͲ͏ͨ͠΋ͷ͔

Slide 25

Slide 25 text

har-to-k6 https://github.com/grafana/har-to-k6

Slide 26

Slide 26 text

ϒϥ΢βͷϩά͔Βk6ͷγφϦΦʹม׵͢Δ܅ • ൃ૝ʮϒϥ΢β͕ॏ͍ ͳΒϒϥ΢βͰϖʔδ ݟͨͱ͖ͷڍಈ͔Βγ φϦΦʹ͢Ε͹͍͍Μ ͡Όͳ͍ʁʯ • .HARϑΝΠϧ͔Βk6γ φϦΦ(JavaScript)΁ม ׵͢Δެࣜπʔϧ

Slide 27

Slide 27 text

͜ΕͰ΋՝୊ײ • ϑϩϯτΤϯυଆͷڍಈ͸೔ʑΊ·͙Δ͘͠มΘͬͯ͠·͏ • ෛՙࢼݧͱͯ͠͸ɺಛఆͷύε(=ػೳ)ʹΞΫηεͨ͠ͱ͖ͷϒϥ΢β͔Βͷ ϦΫΤετͷڍಈΛ࠶ݱ͍ͨ͠ • HARΛੜ੒͢ΔͨΊʹ࠷৽ͷϑϩϯτΤϯυͷڍಈΛ௥͔͚ͬΔͨΊʹ ChromeͰϙνϙν͢Δͷ͔ʁ • ਓྗͷਖ਼֬ੑɾਓྗͷखؒ => ໘౗͔͘͞͞Β͘Δෛՙࢼݧ཭Ε

Slide 28

Slide 28 text

.HARΛ࡞Δͷ΋ࣗಈԽ͠·͠ΐ͏

Slide 29

Slide 29 text

࢓૊Έ

Slide 30

Slide 30 text

PlaywrightͰHARΛు͘ίʔυ

Slide 31

Slide 31 text

݁Ռ: ͍͍ײ͡ͷෛՙΛ͔͚ΒΕͨ

Slide 32

Slide 32 text

׬

Slide 33

Slide 33 text

ͦͷଞͷ࿩୊ • HARϕʔεγφϦΦͰଞͷυϝΠϯ΍ը૾ʹ͸fetch͠ͳ͍Α͏ʹ͢ΔϑΟϧλ • εςʔδϯά؀ڥ΁ͷೝূΛϕϯνϚʔΧʔ͚ͩճආ͢Δํ๏ • AuroraͷPerformance Insights͕ศར, ClusterͷҰ࣌ఀࢭ΋ศར • OGPͰmeta tagʹେձ৘ใΛຒΊࠐΜͰ͍Δ͕ͦΕ͕ॏͯ͘໘ന͍ʢ໘ന͘ͳ͍ʣ • SPA͔ͩΒΤϯτϦʔϙΠϯτ͚ͩݟͯ΋ҙຯ͕ͳ͍ͱ͸ͳΜͩͬͨͷ͔ • ΫΤϦΩϟογϡ͞Μɺࠓ·Ͱ͋Γ͕ͱ͏