Failure-Detection-With-Karate-And-Zipkin

 Failure-Detection-With-Karate-And-Zipkin

2019/11/30に開催されたシステムテスト自動化カンファレンス 2019
での登壇資料です
https://testautomationresearch.connpass.com/event/144768/

53850955f15249a1a9dc49df6113e400?s=128

LINE Developers

November 30, 2019
Tweet

Transcript

  1. ,BSBUFʹΑΔ։ൃϓϩηεվળͷࣄྫ ͱ ;JQLJOͱ࿈ܞͨ͠ ϚΠΫϩαʔϏεͷো֐఺ݕ஌ͷ࢓૊Έ -*/&גࣜձࣾ ߴڮ ܄ γεςϜςετࣗಈԽΧϯϑΝϨϯε 

  2. ࣗݾ঺հ

  3. *TBP5BLBIBTIJ !SJDUP@)%*5 4&5 4PGUXBSF&OHJOFFSJO5FTU

  4. ͓Θͼ

  5. None
  6. ൃද ͕࣌ؒͨΓ·ͤΜͰͨ͠!

  7. https://speakerdeck.com/line_developers/build-self-organized-team-through-test-automation-with-karate

  8. https://speakerdeck.com/line_devday2019/failure-detection-of-microservices-with-test-and-zipkin λΠτϧ͸ࣅͯΔ͚Ͳ த਎ ओ୊ ͸ҧ͍·͢

  9. ຊ೔ͷ ,FZ.FTTBHF

  10. ,FZ.FTTBHF ςετͷ໾ׂ͸඼࣭อূʜ ͚ͩ͡Όͳ͍ʂ

  11. ,FZ.FTTBHF ςετΛॻ͘ΈΜͳ͕ϋοϐʔ ͳঢ়ଶʹ͠Α͏ 2" 1SPEVDU0XOFS %FWFMPQFS

  12. "HFOEB  "1*ςετͯ͠΋Β͑ͳ͍໰୊  "1*ςετͷϝϯςେม໰୊  ,BSBUF΍Ζ͏ͥ -JWF$PEJOH  ςετϨϙʔτΛ΋ͬͱ࢖͍΍͘͢͠Α͏ͥ

  13. "1*ςετͯ͠΋Β͑ͳ͍໰୊

  14. -*/&ͷ 2"ͷ؅׋ൣғ͸lը໘ͷ͋Δ΋ͷz šը໘͕͋ΔϢʔβͷૢ࡞ΛγϛϡϨʔτ š.PCJMF"QQ š%FTLUPQ"QQ š#SPXTFS 8FC1BHF š"1*͸ɺը໘͕͋ΔϓϩμΫτͷ2"Ͱ ؒ઀తʹςετ͞ΕΔ

  15. Կ͕໰୊ʁ API API API API API DB DB

  16. Կ͕໰୊ʁ API API API API API DB DB

  17. Կ͕໰୊ʁ API API API API API DB DB ը໘ʹର͢Δ ςετ

    ؒ઀తʹ ςετ͞ΕΔ γφϦΦ࣍ୈ
  18. Կ͕໰୊ʁ š"1*ʹରͯ͠े෼ͳύλʔϯͷςετ͕ ࣮ߦ͞Εͳ͍Մೳੑ͕ߴ͍

  19. Կ͕໰୊ʁ š"1* ಉ࢜ ͷ*OUFHSBUJPO5FTUϨϕϧͷόά͕ɺ 6*5FTU·Ͱݕग़͞Εͳ͍

  20. Կ͕໰୊ʁ API API API API API DB DB 1VCMJD"1* 4%,

  21. Կ͕໰୊ʁ š"1*͕Ϣʔβʹର͢Δ௚઀ͷ*OUFSGBDFͰ͋Δ৔߹ɺ &&5FTU͕࣮ࢪ͞Εͳ͍

  22. %FWFMPQFS͕ಈ࡞֬ೝ

  23. ࣗಈԽͨ͠΄͏͕ྑ͘ͳ͍ʁ

  24. ͱ͸ݴ͑ɺ

  25. "1*ςετͷϝϯςେม໰୊

  26. Ͳ͏΍ͬͯ"1*Λςετ͢Δ͔ šͰ͖Δ 㱠 ࢖͍΍͍͢ š1PTUNBOͳͲͷ(6*πʔϧ š+6OJUͳͲͷ 6OJU5FTUJOH'SBNFXPSL š3FTU"TTVSFEͳͲͷ3&45"1*ಛԽܕ5FTUJOH'SBNFXPSL šDVSM

  27. Ͳ͏΍ͬͯ"1*Λςετ͢Δ͔ šͰ͖Δ 㱠 ࢖͍΍͍͢ š1PTUNBOͳͲͷ(6*πʔϧ š+6OJUͳͲͷ 6OJU5FTUJOH'SBNFXPSL š3FTU"TTVSFEͳͲͷ3&45"1*ಛԽܕ5FTUJOH'SBNFXPSL šDVSM ܰ͘࢖͏෼ʹ͸

    ͱ͖ͬͭ΍͍͢ έʔε͕૿ՃɾෳࡶԽ ͢Δͱਏ͍
  28. Ͳ͏΍ͬͯ"1*Λςετ͢Δ͔ šͰ͖Δ 㱠 ࢖͍΍͍͢ š1PTUNBOͳͲͷ(6*πʔϧ š+6OJUͳͲͷ 6OJU5FTUJOH'SBNFXPSL š3FTU"TTVSFEͳͲͷ3&45"1*ಛԽܕ5FTUJOH'SBNFXPSL šDVSM ܰ͘࢖͏෼ʹ͸

    ͱ͖ͬͭ΍͍͢ έʔε͕૿ՃɾෳࡶԽ ͢Δͱਏ͍ ௥Ճͷ ֶशίετ ͕௿͍ ੍໿͕গͳ͗ͯ͢ ΧΦεʹͳΓ͕ͪ
  29. Ͳ͏΍ͬͯ"1*Λςετ͢Δ͔ šͰ͖Δ 㱠 ࢖͍΍͍͢ š1PTUNBOͳͲͷ(6*πʔϧ š+6OJUͳͲͷ 6OJU5FTUJOH'SBNFXPSL š3FTU"TTVSFEͳͲͷ3&45"1*ಛԽܕ5FTUJOH'SBNFXPSL šDVSM ܰ͘࢖͏෼ʹ͸

    ͱ͖ͬͭ΍͍͢ έʔε͕૿ՃɾෳࡶԽ ͢Δͱਏ͍ ௥Ճͷ ֶशίετ ͕௿͍ ੍໿͕গͳ͗ͯ͢ ΧΦεʹͳΓ͕ͪ ର৅͕ ͪΌΜͱͨ͠ 3&45"1*ͳΒศར 31$ͱ͔͸ਏ͍
  30. Ͳ͏΍ͬͯ"1*Λςετ͢Δ͔ šͰ͖Δ 㱠 ࢖͍΍͍͢ š1PTUNBOͳͲͷ(6*πʔϧ š+6OJUͳͲͷ 6OJU5FTUJOH'SBNFXPSL š3FTU"TTVSFEͳͲͷ3&45"1*ಛԽܕ5FTUJOH'SBNFXPSL šDVSM ܰ͘࢖͏෼ʹ͸

    ͱ͖ͬͭ΍͍͢ έʔε͕૿ՃɾෳࡶԽ ͢Δͱਏ͍ ௥Ճͷ ֶशίετ ͕௿͍ ੍໿͕গͳ͗ͯ͢ ΧΦεʹͳΓ͕ͪ ର৅͕ ͪΌΜͱͨ͠ 3&45"1*ͳΒศར 31$ͱ͔͸ਏ͍ ਏ͍
  31. %FWFMPQFS 1SPHSBNNFS ʹͱͬͯಡΈॻ͖͠΍͘͢ɺ ϝϯς͠΍͍͢΋ͷ͕ཉ͍͠ʂ

  32. 45"$

  33. IUUQTXXXTMJEFTIBSFOFUUBLBOPSJHNJDSPTFSWJDFTUFTUBVUPNBUJPOXJUILBSBUF

  34. IUUQTXXXTMJEFTIBSFOFUUBLBOPSJHNJDSPTFSWJDFTUFTUBVUPNBUJPOXJUILBSBUF

  35. ͋ͬͨʂ

  36. ,BSBUF

  37. 8IBUJT,BSBUF API Testing Framework written in Java Write like Cucumber

    Run like JUnit Testing Mocking Perf-Testing https://github.com/intuit/karate Native Support for JSON-based REST API
  38. &YBNQMFPG,BSBUF

  39. ,BSBUFͷ͍͍ͱ͜Ζ Simple for Simple Case Cucumber Compatible Reusable Test Case

    https://github.com/intuit/karate Extensible for Complex Case
  40. આ໌͚ͩ͡ΌΑ͘Θ͔Βͳ͍ʁ

  41. ͦΕͰ͸ɺ

  42. -JWF$PEJOHͷ͓࣌ؒͰ͢ɻ

  43. ,BSBUFɺ͍͍Ͱ͢ΑͶʁ

  44. %FNP -JWF$PEJOH š8SJUF&YFDVUF4IPX3FQPSU

  45. ,BSBUFɺ޿Ί͍ͯͬͯ·͢ʂ

  46. ࣾ಺Ͱͷ,BSBUFීٴ׆ಈ š։ൃνʔϜͱҰॹʹςετΛॻ͘ 4&5։ൃνʔϜ ςετͷϊ΢ϋ΢ ։ൃνʔϜ 4&5 υϝΠϯφϨοδ ։ൃνʔϜ͕ ओମ

  47. ͋ΔνʔϜͰͷ੒Ռ šຊ൪؀ڥͰͷো֐࡟ݮ šো֐ͷૣظݕग़ šӡ༻࣌ΑΓ΋ϦϦʔε࣌ɺϦϦʔε࣌ΑΓ΋։ൃ࣌ š։ൃνʔϜͷࣗओੑ্͕͕ͬͨ  ,BSBUF 4&5ͷ׆ಈ िؒ ෼

  48. ࠷ॳͷέʔε 4&5͕࡞੒ ௥Ճͷέʔε ։ൃνʔϜ͕࡞੒ 4&5͕ϨϏϡʔ ͦΕҎ߱ έʔε௒  ։ൃνʔϜ͕࡞੒ νʔϜ಺ϨϏϡʔ

  49. ,BSBUF͕඼࣭Λ্͛Δ

  50. ,BSBUF͕඼࣭Λ্͛Δ

  51. ,BSBUF͕ z z Λଅ͢

  52. ࣾ಺Ͱͷ,BSBUFීٴ׆ಈ šࣾ಺ษڧձ ͬΆ͍΋ͷ Ͱڞ༗ š)BOET0Oηογϣϯͷ։࠵ šαϯϓϧ࣮૷ Α͋͘Δύλʔϯ ͷఏڙ ࢀՃऀͷ୲౰αʔϏε ͷςετΛ࣮ࡍʹॻ͘

    ೝূॲཧ ඇಉظॲཧ
  53. ࣗಈςετͷӡ༻Ͱग़ͯ͘ΔΞϨίϨ šςετ݁Ռ͔Β'BJMͷݪҼΛ୳͢ͷେม໰୊

  54. Ͳ͜ʹݪҼ͕͋Δʁ API API API DB ςετ ࣦഊʂ

  55. Ͳ͜ʹݪҼ͕͋Δʁ ʁ ʁ ʁ ʁ ςετ ࣦഊʂ Ͳ͕͜໰୊ͳͷ

  56. Ͳ͏ʹ͔Ͱ͖ͳ͍ʁ

  57. ࣗ෼ΒͰ࡞Ζ͔ͬ

  58. ԿͰࣗલͰ࡞Δͷʁ š"1*5FTUͷΠΠײ͡ͷϨϙʔςΟϯάπʔϧ͕ͳ͍ š෼ࢄτϨʔγϯά΍಺੡πʔϧ ϞχλϦϯάɺ σϓϩΠ ͳͲͱ࿈ܞ͍ͤͨ͞ šཉ͍͠ػೳ͕ͳ͚Ε͹ɺ࡞Ε͹͍͍ʂ

  59. ෼ࢄτϨʔγϯά

  60. ෼ࢄτϨʔγϯά %JTUSJCVUFE5SBDJOH šෳ਺ͷαʔϏεʹ·͕ͨΔॲཧΛ෼ੳ͢Δ࢓૊Έ .JDSPTFSWJDFT 3FRVFTUʹରͯ͠ͲͷαʔϏεͷ Ͳͷ&OEQPJOU͕DBMM͞Ε͔ͨ ͲͷαʔϏεͷύϑΥʔϚϯε͕ ϘτϧωοΫʹͳ͍ͬͯΔ͔

  61. ;JQLJO ͷ 5SBDF-PH

  62. 4FCBT

  63. 4FCBTr "1*5FTUJOH3FQPSU 1MBUGPSN šϩʔΧϧɾ$*্Ͱ࣮ߦͨ͠ςετ݁ՌͷӾཡɾ؅ཧ šςετ͕'BJMͨ͠ࡍɺ5SBDF-PHΛجʹର৅ऀʹͷΈ ௨஌Λൃߦ 5SBDF-PHͷ ֬ೝ΋Մೳ

  64. None
  65. None
  66. None
  67. None
  68. ௨஌ͷ࢓૊Έ API API API DB *%""" *%$$$ *%###

  69. ௨஌ͷ࢓૊Έ API API API DB *%""" *%$$$ *%###

  70. ௨஌ͷ࢓૊Έ API API API DB *%""" *%$$$ *%###

  71. ௨஌ͷ࢓૊Έ API API API DB *%""" *%$$$ *%### 5SBDF-PH͔Β Τϥʔͷ͋Δ

    $PNQPOFOUΛݕग़
  72. ,BSBUFͷ 3FQPSU-PH

  73. Քಇ؀ڥ "QQMJDBUJPO*% ;JQLJO ͷ 5SBDF-PH

  74. ௨஌ͷ࢓૊Έ API API API DB *%""" *%$$$ *%### 5SBDF-PH͔Β Τϥʔͷ͋Δ

    $PNQPOFOUΛݕग़ .POJ UPSJOH 4FCBT
  75. ӡ༻ͯ͠ΈͯͲΜͳײ͡ʁ

  76. Ӷҙݕূதʜ!

  77. 4FCBT͕໨ࢦ͢΋ͷ

  78. ϓϩμΫτ඼࣭ͷ޲্

  79. ͡Όͳͯ͘ɺ

  80. ։ൃ ʹ·ͭΘΔ ίετͷ࡟ݮ

  81. 4FCBT͕ݮΒ͍ͨ͠΋ͷɾίετ šো֐࣌ͷରԠ š2"࣌ͷ3FHSFTTJPO΍σϓϩΠϛε š2"ɾຊ൪؀ڥͰͷόά      

         
  82. ,FZ.FTTBHFճऩ

  83. ςετͷ໾ׂ͸඼࣭อূʜ ͚ͩ͡Όͳ͍ʂʂ

  84. ςετͷ໾ׂ͸඼࣭อূʜ ͚ͩ͡Όͳ͍ʂʂ

  85. ςετͷ ͸඼࣭อূʜ ͚ͩ͡Όͳ͍ʂʂ

  86. ςετΛॻ͘ ʹ օ͕ϋοϐʔ ͱ͍͏ঢ়ଶʹ͍ͨ͠

  87. Ͳͷ؀ڥͰ΋໾ʹཱͭ ʹ օ͕ϋοϐʔ

  88. 5IBOLZPVGPSMJTUFOJOH