COOKPAD and Test Automation

COOKPAD and Test Automation

ソフトウェアテストシンポジウム 2014 東北(JaSST'14 Tohoku)
2014年5月23日(金)

Cf7b553387b247d737c60cfceabb2cea?s=128

Naoto Takai

May 25, 2014
Tweet

Transcript

  1. ΫοΫύουͱςετࣗಈԽ JaSST’14 Tohoku

  2. ߴҪ௚ਓ ΫοΫύουגࣜձࣾ

  3. ࢲͷཤྺॻ ೥ʙ ϝʔΧʔܥൢࣾ  ೥ʙ ΢Σϒ੍࡞ձࣾ  ೥ʙ େखγεςϜΠϯςάϨʔλʔ 

    ೥ʙ ωοταʔϏεӡӦձࣾ 
  4. ιϑτ΢ΣΞ඼࣭ͱͷग़ձ͍ ΢Σϒ੍࡞ձࣾͰडୗ։ൃʹैࣄ͍ͯͨ͠ ࢲ͸3VCZͷීٴɾൃలͷͨΊʹେखγε ςϜΠϯςάϨʔλ΁ͱస৬ͨ͠ͷ͕ͩɺ ԿͷҼՌ͔ιϑτ΢ΣΞඪ४Խ෦໳ʹ഑ଐ ͞ΕΔ͜ͱʹͳͬͨͷͩͬͨʜʜɻ

  5. None
  6. None
  7. ݄ؒϢχʔΫϒϥ΢β਺ ສ  ສ  ສ  ສ  ສ

     ສ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ ݄ 1$ ϞόΠϧ  ສ6# ʢ೥݄ظୈ࢛൒ظܾࢉิ଍આ໌ࢿྉʣ
  8. εϚϗΞϓϦྦྷܭ%-਺ ύζυϥ ສɺࠇೣ ສ J04 ສ "OESPJEສ ʢ೥݄࣌఺ʣ

  9. ౤ߘϨγϐ਺ ສ ສ ສ ສ ສ ສ ສ ݄ ݄

    ݄ ݄ ݄ ݄ ݄ Ϩγϐ਺ ສ඼ ʢ೥݄ظୈ࢛൒ظܾࢉิ଍આ໌ࢿྉʣ
  10. ΫοΫύουͷϢʔβʔ உੑ  ঁੑ  ঁੑ உੑ ੑผ ୅Ҏ্ 

    ୅  ୅  ୅  ୅ҎԼ  ୅ҎԼ ୅ ୅ ୅ ୅Ҏ্ ೥୅ʢঁੑʣ ʢ೥݄࣌఺ʣ
  11. . . .  .  . 2 2 2

    2 2 2 2 2 2 2 2 2 2 2 2 ձһࣄۀ ޿ࠂࣄۀ ͦͷଞ ࢛൒ظച্ߴ  ඦສԁʢ࿈݁ʣ ʢ೥݄ظୈ࢛൒ظܾࢉิ଍આ໌ࢿྉʣ
  12. ΞϓϦέʔγϣϯߏ੒ʢ8FCʣ MySQL Redis Memcached Unicorn Rails 3.2 Ruby 2.0 nginx

    Amazon Web Service Apache
  13. ΞϓϦέʔγϣϯن໛ʢ8FCʣ w Ϟσϧɹɹɹɹɹɹɹʜ Ϋϥε w ίϯτϩʔϥʔɹɹɹʜΫϥε w ϏϡʔςϯϓϨʔτɹʜ ϑΝΠϧ w

    ϧʔςΟϯάఆٛɹɹʜ ߦ w 34QFD&YBNQMF਺ɹɹʜ ݸ w σϓϩΠճ਺ɹɹɹɹʜճҎ্ʗ೔ ʢ೥݄೔࣌఺ʣ
  14. None
  15. ࠷ߴʹ͓͍͍͠ʮνϣίϨʔτέʔΩʯ͸ Ͳ͏΍ͬͨΒͰ͖Δ͔Λߟ͍͑ͯͩ͘͞ɻ

  16. None
  17. ʮຖ೔ͷྉཧΛָ͠Έʹʯ͸ Ͳ͏΍ͬͨΒͰ͖Δ͔Λߟ͍͑ͯͩ͘͞ɻ

  18. ࣦഊ͢Δ΍Γํ  ָ͠ΈʹͳΔͨΊͷཁ݅Λఆٛ͢Δ  ্هΛຬͨ͢ػೳΛઃܭ͢Δ  ιϑτ΢ΣΞΛ࣮૷͠ɺςετ͢Δ

  19. ͳࣦͥഊ͢Δͷ͔ʁ  ָ͠ΈʹͳΔͨΊͷཁ݅Λఆٛ͢Δ  ্هΛຬͨ͢ػೳΛઃܭ͢Δ  ιϑτ΢ΣΞΛ࣮૷͠ɺςετ͢Δ ʮଥ౰ੑ֬ೝʯͷϓϩηε͕ͳ͍

  20. ̫ˍ̫ʢݕূͱଥ౰ੑ֬ೝʣ w ݕূ
 ٬؍తূڌΛఏࣔ͢Δ͜ͱʹΑͬͯɺنఆཁٻࣄ߲ ͕ຬͨ͞Ε͍ͯΔ͜ͱΛ֬ೝ͢Δ͜ͱɻ w ଥ౰ੑ֬ೝ
 ٬؍తূڌΛఏࣔ͢Δ͜ͱʹΑͬͯɺಛఆͷҙਤ͞ Εͨ༻్ຢ͸ద༻ʹؔ͢Δཁٻࣄ߲͕ຬͨ͞Ε͍ͯ Δ͜ͱΛ֬ೝ͢Δ͜ͱɻ

  21. ̫ࣈϞσϧͱ̫ˍ̫ ଥ౰ੑ֬ೝ ཁ݅ఆٛ جຊઃܭ ৄࡉઃܭ ࣮૷ɾ୯ମςετ ݁߹ςετ γεςϜςετ ड͚ೖΕςετ اը

    ධՁ ݕূ
  22. ̫ࣈϞσϧͱ੹೚෼ք఺ʢ༨ஊʣ ൃ஫ଆൣғ ཁ݅ఆٛ جຊઃܭ ৄࡉઃܭ ࣮૷ɾ୯ମςετ ݁߹ςετ γεςϜςετ ड͚ೖΕςετ اը

    ධՁ डୗଆൣғ डୗ։ൃͰଥ౰ੑ֬ೝ͕ ࿩୊ʹͳΒͳ͍ཧ༝ ਖ਼֬ʹ͸ཁ݅ఆٛɾड͚ೖ Εςετ͸ൃ஫ଆ੹೚
  23. ੒ޭ͢Δ΍Γํ  ιϑτ΢ΣΞΛ͔ͭͬͯ΋Β͏  ָ͠Έʹͳ͔ͬͨΛௐ΂Δ  Ͳ͏΍ͬͨΒ΋ͬͱָ͠ΈʹͳΔ ιϑτ΢ΣΞΛͭ͘ΕΔ͔ߟ͑Δ

  24. σΠϒɾτʔϚεᐌ͘ɺ " 8IFSFEPXFXBOUUPCF  # 8IFSFBSFXF  $ )PXEPXFJNQSPWFPVSQSPDFTT 5IJTJT"HJMJUZ5IFSFJTOPNPSF

  25. ཁٻຬ଍ͷࣄޙੑ ιϑτ΢ΣΞ͕ཁٻΛຬ͍ͨͯ͠Δ͔͸ɺ ιϑτ΢ΣΞΛ࢖Θͳ͍ͱ൑அͰ͖ͳ͍ɻ

  26. ΋͠ɺ͓٬͞·ʹ๬Ή΋ͷΛฉ͍͍ͯͨΒɺ ͓٬͞·͸ʮ΋ͬͱ଎͍അ͕ཉ͍͠ʯͱ
 ౴͍͑ͯͨͩΖ͏ɻ ϔϯϦʔɾϑΥʔυʦཁग़యʧ

  27. ୭͕ސ٬ͳͷ͔͕Θ͔Βͳ͚Ε͹ɺԿ͕඼ ࣭ͳͷ͔΋Θ͔Βͳ͍ɻ ΤϦοΫɾϦʔεʰϦʔϯελʔτΞοϓʱ ඼࣭͸୭͔ʹͱͬͯͷՁ஋Ͱ͋Δɻ δΣϥϧυɾϫΠϯόʔάʰιϑτ΢ΣΞจԽΛ૑Δ̍ʱ

  28. ߏங͢Δ ܭଌ͢Δ ֶͿ ੡඼ σʔλ ΞΠσΞ ߏஙɾܭଌɾֶशͷϧʔϓ ͜ͷϧʔϓʹཁ͢Δ࣌ؒΛ࠷খԽ͢Δ

  29. ϧʔϓʹཁ͢Δ࣌ؒΛ࠷খԽ͢Δʹ͸ʁ ʢʹιϑτ΢ΣΞͷͭ͘Γํͷվળʣ

  30. ࣦഊ͢Δ΍Γํ  ։ൃϓϩηεඪ४Λఆٛ͢Δɻ  ։ൃϓϩηεඪ४ΛϓϩδΣΫτຖʹ ςʔϥϦϯά͢Δɻ

  31. ͳࣦͥഊ͢Δͷ͔ʁ  ։ൃϓϩηεඪ४Λఆٛ͢Δɻ  ։ൃϓϩηεඪ४ΛϓϩδΣΫτຖʹ ςʔϥϦϯά͢Δɻ ݱ࣮ͷ։ൃϓϩηεͷվળͰ͸ͳ͍

  32. ੒ޭ͢Δ΍Γํ  ϦϦʔεՄೳͳঢ়ଶʹ͢Δ  ιϑτ΢ΣΞΛ։ൃ͢Δ  มߋΛՃ͔͑ͯΒϦϦʔεՄೳͳ ঢ়ଶʹͳΔ·ͰͷແବΛͳ͘͢

  33. ιϑτ΢ΣΞੜ࢈ੑ ιϑτ΢ΣΞͷੜ࢈ੑΛ޲্ͤ͞ΔͨΊͷ ޮՌతͳख๏͸͓Αͦࡾͭʹ෼ྨ͞ΕΔɻ w ෦඼Խʜͭ͘Βͳ͍Α͏ʹ͢Δ w ࣗಈԽʜ͠ͳ͍Α͏ʹ͢Δ w ՄࢹԽʜΘ͔ΔΑ͏ʹ͢Δ

  34. ܧଓతσϦόϦʔ ܧଓతσϦόϦʔ͸ιϑτ΢ΣΞ։ൃʹ͓ ͚Δن཯ͷͻͱͭͩɻʜʜܧଓతσϦό ϦʔΛ࣮ݱ͢Δʹ͸ɺ։ൃνʔϜ͕ιϑτ ΢ΣΞΛܧଓతʹ౷߹͠ɺ࣮ߦϑΝΠϧΛ Ϗϧυ͠ɺ͞ΒʹͦΕΛࣗಈతʹςετ ͯ͠໰୊Λݕग़͢Ε͹͍͍ɻ IUUQDBQTDUSMRVFKQLENTOSXJLJCMJLJ $POUJOVPVT%FMJWFSZ

  35. ࣗಈςετͱඅ༻ରޮՌʢ༨ஊʣ ςετࣗಈԽ͸։ൃϓϩηεͷϜμऔΓͰ ͋Γɺͦ΋ͦ΋ϜμऔΓʹඅ༻ରޮՌͱ͍ ͏֓೦͸͏·Εͳ͍ʢΩϦοʣ

  36. σϓϩΠϝϯτύΠϓϥΠϯ ੒Ռ෺ϦϙδτϦ όʔδϣϯίϯτϩʔϧ ιʔείʔυ ઃఆ ίϛοτεςʔδ ड͚ೖΕεςʔδ ड͚ೖΕςετ ؀ڥઃఆɺσϓϩΠɺ εϞʔΫςετ

    ੑೳςετ ؀ڥઃఆɺσϓϩΠɺ εϞʔΫςετ ຊ൪؀ڥ ؀ڥઃఆɺσϓϩΠɺ εϞʔΫςετ ίϯύΠϧ ίϛοτςετ ੒Ռ෺࡞੒ ίʔυղੳ ؀ڥઃఆ σϓϩΠ εϞʔΫςετ ड͚ೖΕςετ ઃఆ +F[)VNCMFɺ%BWJE'BSMFZʰܧଓతσϦόϦʔʱ
  37. ΫοΫύουͷύΠϓϥΠϯ Source Code Review Continuous Integration Production Test Developement Production

    GitHub Git Repository merge pull req pull tag deploy deploy
  38. Developer Machine Redis Shared Development MySQL EC2 Ruby on Rails

    memcached Remote Spec Workers remote_spec worker remote_spec worker  GitHub Enterprise LAN Tokyo Tyrant Development App Server push rspec deploy HipChat ϩʔΧϧͷ։ൃ؀ڥ
  39. ։ൃऀʹΑΔςετ  34QFDʹΑΔςετ
 ୯ମςετπʔϧʹΑͬͯɺσʔλϕ ʔε΋ؚΊͨςετΛ͢Δ  $BQZCBSBʹΑΔςετ
 ը໘ͳ͠ͷ΢Σϒϒϥ΢βΛ༻͍ͯɺ γφϦΦϕʔεͷςετΛ͢Δ

  40. ։ൃऀςετɾ2"ςετʢ༨ஊʣ ։ൃऀςετͱ2"ςετ͸ରཱతͳ֓೦ Ͱ͸ͳ͘ɺςετͷ͋Δଆ໘ʹ͗͢ͳ͍ɻ ෼ྨ͋Γ͖Ͱߟ͑ΔͷͰ͸ͳ͘ɺϦϦʔε ·ͰʹԿ͕ඞཁ͔Λߟ͑Α͏ɻ

  41. 34QFDͷಛ௃ ;Δ·͍ۦಈ։ൃʢ#%%ʣͷͨΊͷςες ΟϯάϑϨʔϜϫʔΫɻ w σϑΝΫτελϯμʔυͰ͋Δ w ςετίʔυΛߏ଄Խ͠΍͍͢ w ΤίγεςϜ͕ॆ࣮͍ͯ͠Δ

  42. 34QFDʹΑΔςετ describe SymbolStack do ... context 'when stack is empty'

    do subject(:empty_stack) { SymbolStack.new } describe '#size' do it { expect(empty_stack.size).to eq 0 } end
  43. $BQZCBSBʹΑΔςετ feature 'User login' do scenario 'successful login' do visit

    login_path fill_in 'Login', with: 'user@example.com' fill_in 'Password', with: 'password' click_link 'Submit' expect(current_path).to root_path end
  44. LAN EC2 CI Server Git Repository Production Test HipChat tag

    pull notify deploy Development DB schema Remote Spec distribute Git Repository clone pusher service hook pull push Developer merge ιʔείʔυͷྲྀΕ
  45. ίʔυϨϏϡʔ Team Pull Request Owner Developer Developer review open merge

    review ίʔυϨϏϡʔ͸νʔϜ୯ҐͰߦͳ͏͕ɺ શһ͕ϨϏϡʔ͢Δ͜ͱ΋Ͱ͖Δɻ
  46. None
  47. None
  48. None
  49. None
  50. Repository Product Support Product Manager Issue Developer UI/UX Designer Pull

    Request file file review open open (JU)VC&OUFSQSJTFͷར༻ ΤϯδχΞҎ֎ʹ΋σβΠφʔ৬ɺσΟϨ Ϋλʔ৬ɺαϙʔτ৬ͳͲ
  51. LAN EC2 CI Server Git Repository Production Test HipChat tag

    pull notify deploy Development DB schema Remote Spec distribute Git Repository clone pusher service hook pull push Developer merge ιʔείʔυͷྲྀΕ
  52. $*αʔόʮ͓Ή͖Μ͢ʯ IUUQTHJUIVCDPNNBTBOPCVJNBJFNPUJPOBMKFOLJOTQMVHJO

  53. $*࣌ؒʹؔ͢Δܦݧଇ ։ൃऀ͸े෼ʹၗຫͳͷͰɺ ෼ͰΠϥΠϥ͠ɺ෼ͰΩϨΔɻ

  54. $*Λૣ͘͢Δ޻෉  ϚϧνϓϩηεԽʢQBSBMMFM@UFTUTʣ  ෼ࢄԽ  ୈ̍ੈ୅SFNPUF@TQFD  ୈ̎ੈ୅SFNPUF@TQFD 

    ୈ̏ੈ୅3334QFD
  55. 3334QFDͷಛ௃  εϙοτΠϯελϯεΛར༻  ϓϩηεఀࢭ͔Βͷࣗಈ෮ؼ  ࣦഊͨ͠ςετͷࣗಈ࠶࣮ߦ  ςετ࣮ߦॱংͷ࠷దԽ 

    ௕͍ςετͷ౤ػత࣮ߦ  Φʔϓϯιʔε IUUQTHJUIVCDPNDPPLQBESSSTQFDCMPCNBTUFS%&4*(/NE
  56. Master Slave Worker Slave Slave Worker ʜ ʜ DB 3334QFDͷߏ੒

    &YBNQMF਺ʜ໿  εϨʔϒ਺ʜ໿୆ ϫʔΧʔ਺ʜ໿ฒྻ ࣮ߦ࣌ؒɹʜ໿෼
  57. ςετͷ඼࣭ ػೳͷՁ஋͸ϦϦʔεͯ͠ॳΊͯΘ͔Δ ʹςετʹա৒ͳઌߦ౤ࢿ͸Ͱ͖ͳ͍ w ςετઃܭ޻ఔΛಠཱͯ͠ઃ͚ͳ͍ w ։ൃ޻ఔͷ͋ͱͷςετ޻ఔ͸ͳ͍ ຊ൪؀ڥͰͷμϝʔδίϯτϩʔϧ͕ॏཁ

  58. None
  59. None
  60. None
  61. None
  62. None
  63. σϕϩούʔͱϢʔβʔͷίϛϡχέʔγ ϣϯ΍ίϥϘϨʔγϣϯΛ્Ήน΋ͳ͘ͳ ͬͨɻόάͷण໋͸ɺ਺ϲ݄͔Β਺෼ʹ୹ ॖ͞Εͨɻ ̟ɾ΢ΟςΧʔɺ̟ɾΞʔϘϯɺ̟ɾΩϟϩʔϩ
 ʰςετ͔Βݟ͑ͯ͘Δάʔάϧͷιϑτ΢ΣΞ։ൃʱ

  64. ͱɺ͍͏͓࿩ͩͬͨͷ͞ʜʜ

  65. ϞόΠϧΞϓϦέʔγϣϯ w ΑΓϢʔβʔΤΫεϖϦΤϯε͕ॏཁʹ w Ϧονͳ6*ɺෳࡶͳঢ়ଶͷςετ w ΞϓϦέʔγϣϯσϦόϦʔ໰୊͕࠶೩ w ෳ਺όʔδϣϯ͕ซଘ w

    ϦϦʔεϑϩʔͷ࠶ߏங w ϦϦʔεظؒɺςετϑΣʔζ
  66. ෮श໰୊ ສճʹճɺສԁ͕౰ͨΔεϩοτϚ γϯ͕͋Δ΋ͷͱ͠·͢ɻ͜ͷεϩοτϚ γϯͰ༡Ϳͱ͖ɺճ͋ͨΓ͍͘Βίετ Λ͔͚Δ΂͖͔ߟ͍͑ͯͩ͘͞ɻ

  67. ·ͱΊ w Ϣʔβʔͷཁٻ͸ɺϦϦʔεͯ͠ॳΊͯ ෼͔Δɻ w ߏஙɾܭଌɾֶशͷϧʔϓʹཁ͢Δ࣌ؒ Λ࠷খԽ͠ͳ͚Ε͹ͳΒͳ͍ɻ w ϦϦʔε·ͰͷϓϩηεΛఆٛ͠ɺͦ͜ ͔ΒແବΛऔΓআ͘ɻ