Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Better Way for Test Data Generation??
Search
shunsuke sato
July 30, 2019
Programming
1
2.8k
Better Way for Test Data Generation??
shunsuke sato
July 30, 2019
Tweet
Share
More Decks by shunsuke sato
See All by shunsuke sato
要約 "Add Live Text interaction to your app"
ushisantoasobu
1
950
ANDPAD iOS開発の生態系と課題 - 最近取り組み始めた「マルチモジュール化」について
ushisantoasobu
1
770
Summary of Diagnose unreliable code with test repetitions
ushisantoasobu
1
960
実践!「みてね」における自動生成活用例
ushisantoasobu
5
6.1k
5 Tips when test fails randomly
ushisantoasobu
2
3.6k
iOS/Androidのサブスクリプション実装における違いをざっと振り返る
ushisantoasobu
2
1.6k
24時間でMacアプリを作ってスベってきた話
ushisantoasobu
0
2.1k
Redirectable in App?
ushisantoasobu
2
900
iOSのClean Architecture テンプレ自動生成を支える技術 / generating CA's templates
ushisantoasobu
0
280
Other Decks in Programming
See All in Programming
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
380
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
910
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
780
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
350
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
Refactor your code - refactor yourself
xosofox
1
260
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
480
testcontainers のススメ
sgash708
1
120
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
720
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
380
Featured
See All Featured
Site-Speed That Sticks
csswizardry
2
190
BBQ
matthewcrist
85
9.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Code Review Best Practice
trishagee
65
17k
Writing Fast Ruby
sferik
628
61k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Transcript
Better Way for Test Data Generation?? 2019/07/30 @Otemachi.swift #04
ࣗݾհ w ࠤ౻ढ़ี • @ushisantoasobu w גࣜձࣾϛΫγΟΈͯͶࣄۀ෦ w J04ϝΠϯʹɺ"OESPJE3BJMTগʑ w
͖ͳͷίʔώʔϑοταϧ
ΞδΣϯμ
ΞδΣϯμ w ίʔυδΣωϨʔγϣϯʹ͍ͭͯ w ʮςετσʔλʯͷδΣωϨʔγϣϯ w ͦͦԿΛղܾ͍ͨ͠ͷ͔ʁ w ίʔυδΣωϨʔγϣϯ͍ͯ͘͠ʢ࣮ʣ
ίʔυδΣωϨʔγϣϯʹ͍ͭͯ
ίʔυδΣωϨʔγϣϯʹ͍ͭͯ w J04ք۾ʹ͓͚Δ͜͜ͷಈ͖ʢॴײʣ w J04։ൃͷख़ංେԽ͢ΔΞϓϦ w ΞʔΩςΫνϟ w ςετ w
σβΠϯγεςϜ ͳͲ͕ϗοτͳτϐοΫʹ
w J04ք۾ʹ͓͚Δ͜͜ͷಈ͖ʢॴײʣ w J04։ൃͷख़ංେԽ͢ΔΞϓϦ w ΞʔΩςΫνϟ w ςετ w σβΠϯγεςϜ
ͳͲ͕ϗοτͳτϐοΫʹ ίʔυδΣωϨʔγϣϯʹ͍ͭͯ
w J04ք۾ʹ͓͚Δ͜͜ͷಈ͖ʢॴײʣ w J04։ൃͷख़ංେԽ͢ΔΞϓϦ w ΞʔΩςΫνϟ w ςετ w σβΠϯγεςϜ
ͳͲ͕ϗοτͳτϐοΫʹ ίʔυδΣωϨʔγϣϯʹ͍ͭͯ ϘΠϥʔϓϨʔτΛͨ͘͞Μॻ͔ͳ͍ͱ͍͚ͳ͍ ίʔυδΣωϨʔγϣϯͷॏཁੑ͕ߴ·͍ͬͯΔʁ
ίʔυδΣωϨʔγϣϯͷࣄྫ w 0UFNBDIJTXGUͰൃදͨ͠ͷ w ʮϓϨθϯςʔγϣϯʯͷςϯϓϨࣗಈੜ • https://speakerdeck.com/ushisantoasobu/ generating-cas-templates
ίʔυδΣωϨʔγϣϯͷࣄྫ
ίʔυδΣωϨʔγϣϯͷࣄྫ w 6*,POGͰௌ͍͖ͯͨɺ6CFSͷࣄྫ w ʢJ04ͷϓϩμΫτશͯͰʣສߦ w ͦͷ͏ͪͷίʔυδΣωϨʔγϣϯ͞Εͨͷ • https://www.youtube.com/watch? v=Tkg8721fObU&t=79s
ʮςετσʔλʯͷδΣωϨʔγϣϯ
ͦͦԿΛղܾ͍ͨ͠ͷ͔ʁ
ྫ͑ɺ͜ͷΑ͏ͳ&OUJUZ͕͋ͬͯɺɺɺ
ϢχοτςετͰͦͷҰཡΛฦ͢ϞοΫͷ3FQPTJUPSZΛॻ͘ͱ͜͏ͳΔ
ςετσʔλΛʹॻ͔ͳͯ͘ͳΒͳ͍ ʢ"TTFSU͢Δͱ͖ʹඞཁͳͷzJEz͚ͩͩͬͨΓ͢Δʣ
͜ͷΘ͠͞Λղܾ͍ͨ͠
• 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 ଞͷํͷղܾํ๏ͷྫ
w Ͱ͖Δָ͚ͩʹॻ͚ΔΑ͏ʹ w ϓϩμΫγϣϯίʔυʹखΛ͚ͭͨ͘ͳ͍ w ϚʔΧʔ༻ͷϓϩτίϧ͢ΒͰ͖Ε͚ͭͨ͘ͳ͍ w ֶशίετߴ͘ͳ͍ͷ͕·͍͠ w ͘ΘΕ͍ͯΔϥΠϒϥϦҎ֎ͷͷ͍ͨ͘ͳ͍
ࣗͳΓʹߟ͑ͨɺཧͷͷ
None
None
ͯ͢ͷϓϩύςΟʹ ͦΕΆ͍σϑΥϧτҾΛͭ ΠχγϟϥΠβΛࣗಈੜͰ͖Ε࠷ߴͰʁ
͖͞΄Ͳͷ&OUJUZʹରͯ͠ɺɺɺ
͜ͷΑ͏ͳϝιουΛςετλʔήοτʹͷΈੜͯ͋͛͠Δ
͖͞΄Ͳͷͩͬͨ6OJU5FTUͷίʔυ͕ɺɺɺ
͜ͷΑ͏ʹεοΩϦͱॻ͚Δ
None
ίʔυδΣωϨʔγϣϯ͍ͯ͘͠ʢ࣮ʣ
4PVSDFSZ 4UFODJM
͜Μͳײ͡Ͱॻ͍ͯΈ·ͨ͠ʢTUFODJMϑΝΠϧʣ
ҎԼʹαϯϓϧϓϩδΣΫτ͋Γ·͢ https://github.com/ushisantoasobu/ DemoTestDataGeneration/pull/1/files
ߟ͑Δ͜ͱʮͦΕͧΕͷܕͷσϑΥϧτΛͲ͏͢Δ͔ʯͷΈ
0QUJPOBMͷͱ͖OJM
ϓϦϛςΟϒܕͷͱ͖ͦΕͧΕͷܕͷσϑΥϧτΛઃఆͯ͋͛͠Δ ʢz*OUzͳΒ l4USJOHzͳΒۭจࣈɺͳͲʣ
&OVNͷͱ͖࠷ॳͷ
Ͳ͏͍ͯ͠͠ͱ͖ʢࠓճͷྫͰ͍͏ͱ"TTPDJBUFE7BMVFΛͭ&OVNͷ ͷͱ͖ʣʮϕλॻ͖ʯͰಀΕΔ͜ͱͰ͖Δ
ͦΕҎ֎ͷͱ͖ଞͷ&OUJUZͱͯ͠࠶ؼతʹѻ͏
5*14ͱͯ͠ɺ4PVSDFSZ4UFODJMͱʹ υΩϡϝϯτ͕͔ͬ͠Γඋ͍ͯ͠ΔΘ͚Ͱͳ͍ͷͰ ίʔυΈΔͱޮతͩͬͨ ʢͬͱ͍͍σόοάͷํ͋Δͷ͔͠Εͳ͍͕ʣ
w Ͱ͖Δָ͚ͩʹॻ͚ΔΑ͏ʹ✅ w ϓϩμΫγϣϯίʔυʹखΛ͚ͭͨ͘ͳ͍✅ w ϚʔΧʔ༻ͷϓϩτίϧ͢ΒͰ͖Ε͚ͭͨ͘ͳ͍ w ֶशίετߴ͘ͳ͍ͷ͕·͍͠✅ w ͘ΘΕ͍ͯΔϥΠϒϥϦҎ֎ͷͷ͍ͨ͘ͳ͍✅
ࣗͳΓʹߟ͑ͨɺཧͷͷʢ֬ೝʣ
Thanks for Listening ☕