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

Better Way for Test Data Generation??

Better Way for Test Data Generation??

9e64d2069945742c818421e884603b44?s=128

shunsuke sato

July 30, 2019
Tweet

Transcript

  1. Better Way for Test Data Generation?? 2019/07/30 @Otemachi.swift #04

  2. ࣗݾ঺հ w ࠤ౻ढ़ี • @ushisantoasobu w גࣜձࣾϛΫγΟΈͯͶࣄۀ෦ w J04ϝΠϯʹɺ"OESPJE3BJMT΋গʑ w

    ޷͖ͳ΋ͷίʔώʔϑοταϧ
  3. ΞδΣϯμ

  4. ΞδΣϯμ w ίʔυδΣωϨʔγϣϯʹ͍ͭͯ w ʮςετσʔλʯͷδΣωϨʔγϣϯ w ͦ΋ͦ΋ԿΛղܾ͍ͨ͠ͷ͔ʁ w ίʔυδΣωϨʔγϣϯ͍ͯ͘͠ʢ࣮૷ʣ

  5. ίʔυδΣωϨʔγϣϯʹ͍ͭͯ

  6. ίʔυδΣωϨʔγϣϯʹ͍ͭͯ w J04ք۾ʹ͓͚Δ͜͜਺೥ͷಈ͖ʢॴײʣ w J04։ൃͷ੒ख़ංେԽ͢ΔΞϓϦ w ΞʔΩςΫνϟ w ςετ w

    σβΠϯγεςϜ ͳͲ͕ϗοτͳτϐοΫʹ
  7. w J04ք۾ʹ͓͚Δ͜͜਺೥ͷಈ͖ʢॴײʣ w J04։ൃͷ੒ख़ංେԽ͢ΔΞϓϦ w ΞʔΩςΫνϟ w ςετ w σβΠϯγεςϜ

    ͳͲ͕ϗοτͳτϐοΫʹ ίʔυδΣωϨʔγϣϯʹ͍ͭͯ
  8. w J04ք۾ʹ͓͚Δ͜͜਺೥ͷಈ͖ʢॴײʣ w J04։ൃͷ੒ख़ංେԽ͢ΔΞϓϦ w ΞʔΩςΫνϟ w ςετ w σβΠϯγεςϜ

    ͳͲ͕ϗοτͳτϐοΫʹ ίʔυδΣωϨʔγϣϯʹ͍ͭͯ ϘΠϥʔϓϨʔτΛͨ͘͞Μॻ͔ͳ͍ͱ͍͚ͳ͍ ίʔυδΣωϨʔγϣϯͷॏཁੑ͕ߴ·͍ͬͯΔʁ
  9. ίʔυδΣωϨʔγϣϯͷࣄྫ w 0UFNBDIJTXGUͰൃදͨ͠΋ͷ w ʮϓϨθϯςʔγϣϯ૚ʯͷςϯϓϨࣗಈੜ੒ • https://speakerdeck.com/ushisantoasobu/ generating-cas-templates

  10. ίʔυδΣωϨʔγϣϯͷࣄྫ

  11. ίʔυδΣωϨʔγϣϯͷࣄྫ w 6*,POGͰௌ͍͖ͯͨɺ6CFSͷࣄྫ w ʢJ04ͷϓϩμΫτશͯͰʣສߦ w ͦͷ͏ͪͷ൒෼͸ίʔυδΣωϨʔγϣϯ͞Εͨ΋ͷ • https://www.youtube.com/watch? v=Tkg8721fObU&t=79s

  12. ʮςετσʔλʯͷδΣωϨʔγϣϯ

  13. ͦ΋ͦ΋ԿΛղܾ͍ͨ͠ͷ͔ʁ

  14. ྫ͑͹ɺ͜ͷΑ͏ͳ&OUJUZ͕͋ͬͯɺɺɺ

  15. ϢχοτςετͰͦͷҰཡΛฦ͢ϞοΫͷ3FQPTJUPSZΛॻ͘ͱ͜͏ͳΔ

  16. ςετσʔλΛ৑௕ʹॻ͔ͳͯ͘͸ͳΒͳ͍
 ʢ"TTFSU͢Δͱ͖ʹඞཁͳͷ͸zJEz͚ͩͩͬͨΓ͢Δʣ

  17. ͜ͷ൥Θ͠͞Λղܾ͍ͨ͠

  18. • https://clean-swift.com/seed-data-unit-tests/ • https://github.com/Nonchalant/FactoryProvider • https://speakerdeck.com/tattn/tesutodetafalsezi- dong-sheng-cheng-fang-fa-falsebie-jie ଞͷํͷղܾํ๏ͷྫ

  19. w Ͱ͖Δָ͚ͩʹॻ͚ΔΑ͏ʹ w ϓϩμΫγϣϯίʔυʹ͸खΛ͚ͭͨ͘ͳ͍ w ϚʔΧʔ༻ͷϓϩτίϧ͢ΒͰ͖Ε͹͚ͭͨ͘ͳ͍ w ֶशίετ͸ߴ͘ͳ͍ͷ͕๬·͍͠ w ޿͘࢖ΘΕ͍ͯΔϥΠϒϥϦҎ֎ͷ΋ͷ͸࢖͍ͨ͘ͳ͍

    ࣗ෼ͳΓʹߟ͑ͨɺཧ૝ͷ΋ͷ
  20. None
  21. None
  22. ͢΂ͯͷϓϩύςΟʹ ͦΕΆ͍σϑΥϧτҾ਺Λ΋ͭ ΠχγϟϥΠβΛࣗಈੜ੒Ͱ͖Ε͹࠷ߴͰ͸ʁ

  23. ͖͞΄Ͳͷ&OUJUZʹରͯ͠ɺɺɺ

  24. ͜ͷΑ͏ͳϝιουΛςετλʔήοτʹͷΈੜ΍ͯ͋͛͠Δ

  25. ͖͞΄Ͳͷ৑௕ͩͬͨ6OJU5FTUͷίʔυ͕ɺɺɺ

  26. ͜ͷΑ͏ʹεοΩϦͱॻ͚Δ

  27. None
  28. ίʔυδΣωϨʔγϣϯ͍ͯ͘͠ʢ࣮૷ʣ

  29. 4PVSDFSZ 4UFODJM

  30. ͜Μͳײ͡Ͱॻ͍ͯΈ·ͨ͠ʢTUFODJMϑΝΠϧʣ

  31. ҎԼʹαϯϓϧϓϩδΣΫτ͋Γ·͢ https://github.com/ushisantoasobu/ DemoTestDataGeneration/pull/1/files

  32. ߟ͑Δ͜ͱ͸ʮͦΕͧΕͷܕͷσϑΥϧτ஋ΛͲ͏͢Δ͔ʯͷΈ

  33. 0QUJPOBMͷͱ͖OJM

  34. ϓϦϛςΟϒܕͷͱ͖ͦΕͧΕͷܕͷσϑΥϧτ஋Λઃఆͯ͋͛͠Δ ʢz*OUzͳΒ l4USJOHzͳΒۭจࣈɺͳͲʣ

  35. &OVNͷͱ͖࠷ॳͷ஋

  36. Ͳ͏ͯ͠΋೉͍͠ͱ͖ʢࠓճͷྫͰ͍͏ͱ"TTPDJBUFE7BMVFΛ΋ͭ&OVNͷ ஋ͷͱ͖ʣʮϕλॻ͖ʯͰಀΕΔ͜ͱ΋Ͱ͖Δ

  37. ͦΕҎ֎ͷͱ͖ଞͷ&OUJUZͱͯ͠࠶ؼతʹѻ͏

  38. 5*14ͱͯ͠͸ɺ4PVSDFSZ4UFODJMͱ΋ʹ υΩϡϝϯτ͕͔ͬ͠Γ੔උ͍ͯ͠ΔΘ͚Ͱ͸ͳ͍ͷͰ ίʔυ௚઀ΈΔͱޮ཰తͩͬͨ ʢ΋ͬͱ͍͍σόοάͷ࢓ํ͋Δͷ͔΋͠Εͳ͍͕ʣ

  39. w Ͱ͖Δָ͚ͩʹॻ͚ΔΑ͏ʹ✅ w ϓϩμΫγϣϯίʔυʹ͸खΛ͚ͭͨ͘ͳ͍✅ w ϚʔΧʔ༻ͷϓϩτίϧ͢ΒͰ͖Ε͹͚ͭͨ͘ͳ͍ w ֶशίετ͸ߴ͘ͳ͍ͷ͕๬·͍͠✅ w ޿͘࢖ΘΕ͍ͯΔϥΠϒϥϦҎ֎ͷ΋ͷ͸࢖͍ͨ͘ͳ͍✅

    ࣗ෼ͳΓʹߟ͑ͨɺཧ૝ͷ΋ͷʢ֬ೝʣ
  40. Thanks for Listening ☕