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
残して価値のあるテスト設計 / Test design by specification map
Search
Yuji Imagawa
June 26, 2019
Programming
8
4.9k
残して価値のあるテスト設計 / Test design by specification map
#gotanda.rb 第37回目 で発表したスライドです。
Yuji Imagawa
June 26, 2019
Tweet
Share
More Decks by Yuji Imagawa
See All by Yuji Imagawa
Web開発とその前にある大きな断崖と人生設計について / The difficulty of development and life plan of engineer
ug23
0
440
Other Decks in Programming
See All in Programming
文字コードの話
qnighy
41
15k
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
Package Management Learnings from Homebrew
mikemcquaid
0
280
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
460
iOSアプリでフロントエンドと仲良くする
ryunakayama
0
120
CSC307 Lecture 12
javiergs
PRO
0
450
個人開発は儲からない - それでも開発開始1ヶ月で300万円売り上げた方法
taishiyade
0
110
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
2
960
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
110
Raku Raku Notion 20260128
hareyakayuruyaka
0
420
CSC307 Lecture 08
javiergs
PRO
0
690
あなたはユーザーではない #PdENight
kajitack
4
280
Featured
See All Featured
Abbi's Birthday
coloredviolet
2
5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Evolving SEO for Evolving Search Engines
ryanjones
0
140
Tell your own story through comics
letsgokoyo
1
820
The Pragmatic Product Professional
lauravandoore
37
7.2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
The SEO identity crisis: Don't let AI make you average
varn
0
400
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.4k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
63
53k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
190
Making Projects Easy
brettharned
120
6.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Transcript
ͯ͠Ձͷ͋Δ ςετઃܭ 2019-06-26 @ gotanda.rb # 37 Yuji Imagawa (
@ug23_ )
εϚʔτΩϟϯϓͷࠓͰ͢ • ࠓ༟࢜ @ug23_ • ΤϯδχΞ4 • લ৬͕QAΤϯδχΞ • ͍·RailsΔ͠VueΔ͠ΠϯϑϥΔ
• #tddyyχ ͷͳ͔ͷͻͱ • ؾʹͳ͍ͬͯΔ͜ͱ: Sorbet
ࠓि͔ΒΦϑΟεҠస͠·ͨ͠
We are hiring! ࣄۀΛΓ͍ͨΤϯδχΞืूதͰ͢ [εϚʔτΩϟϯϓ ΤϯδχΞ] [ݕࡧ]
ࠓͷςʔϚ RSpec ͱ ςετ
ࢲͷ ςετઃܭͷͷ΄͏͕ ϝΠϯͰ͢
͓͠ͳ͕͖ • QAΤϯδχΞ࣌ͷ • Α͍ͬͯ͘Δςετઃܭ • RSpecʹԠ༻͢Δ
QAΤϯδχΞ࣌ͷ
ςετͷϨϏϡʔ͍͠ • ϨϏϡʔͯ͠ʂͱ͞ΕΔExcel • ্Լʹ͘ηϧ݁߹͞ΕͨΧςΰϦ • ҧ͍͕Θ͔Βͳ͍ࣅͨςετέʔε
ࢥͬͨ͜ͱ Excelͷςετέʔε ϨϏϡʔ͢Δͷ͕͍͠
ࢥͬͨ͜ͱ ExcelʹͳΔલʹϨϏϡʔ͍ͨ͠
ͨͲΓண͍ͨ͑ • ϚΠϯυϚοϓ͔Β࢝ΊΔ ιϑτΣΞςετ • ా ڿ (ஶ), ླ ࡾل
(ஶ) • ϚΠϯυϚοϓͷ ࡉׂ͔͍Ѫ͠·͢
ϚΠϯυϚοϓͷΑ͍ͱ͜Ζ • ॻ͘աఔͰ಄ΛཧͰ͖Δ • ݟΔଆจষΑΓݟ͍͢ • πϦʔͳͷͰࣗͷݟΔతʹΑͬͯ ୳ࡧ๏ΛબͰ͖Δ • ਂ͞༏ઌ
or ෯༏ઌ • ༿·ͰݟΔ or ͋Δ֊͚ͩ͏ ※ޮՌʹݸਓ͕ࠩ͋Γ·͢
Α͍ͬͯ͘Δςετઃܭ
ϚΠϯυϚοϓΛ͍·͢ • ํେ·͔ͳέʔεΛߟ͑Δ࣌ ϚΠϯυϚοϓΛॻ͖·͢ • ޙ͔ΒRSpecॻ࣌͘ͱ͔ɺखಈͷγεςϜςετʹͳΔ߹ • ͚ࣗͩͷͱ͖εέονϒοΫʹ ඳ͖·͕͢Gitʹ͋͛ΒΕͳ͍…
GitͰཧͰ͖ΔϚΠϯυϚοϓΛ࡞Δ • Markdown→ϚΠϯυϚοϓԽ͢Δ • ࣗ Atomͷ Markdown Mindmap Λར༻͍ͯ͠·͢
σϞ
ςετઃܭ༻ϚΠϯυϚοϓͷॻ͖ํ • ֊ߟ͑ͳ͍ • ͷͼͷͼॻ͘ʂ • ը໘ΛΠϝʔδ͍͍ͯ͠͠ Ϋϥεผͷ୯ҐΛΠϝʔδͯ͠ྑ͍ • ༿ͷཁૉ͕1ͭҎ্ͷςετέʔεʹ
ରԠ͢ΔΑ͏ʹॻ͘
͍ํ • ςετέʔεͷϨϏϡʔ࣌ʹ͏ • ৽ϝϯόʔ͕ೖͬͨ࣌ͳͲ ͦͷγεςϜͷ༷Ұཡͱͯ͠ݟͤΔ • ΈΜͳͰख͚ͯ͠ಈ࡞֬ೝ͍ͨ࣌͠ ʮ͜ͷลͬͯʯͱ͔ਤࣔ͢Δ •
ػೳ͕େ͖͘มΘͬͨΒϓϧϦΫग़͢
෭࡞༻ͱͯ͠ γεςϜͷػೳΛࣔͨ͠ ਤʹͳΔ
RSpecʹԠ༻͢Δ
ͦͦRSpec • ͱͱBDDπʔϧ • ࢲୡSpecificationΛॻ͍͍ͯΔ • "rpsec --format documentation" ͱ
࣮ߦͯ͠Έͯ΄͍͠ • ڵຯΛ࣋ͬͨํ ʰςετۦಈ։ൃʱ(ΦʔϜࣾ)ͷC
RSpecΛ༷ॻͰ͋Δ͔ͷΑ͏ʹॻ͖͍ͨ • ςετΛ࣮ߦͯ݁͠ՌΛಡΉͱ ͦͷ෦ͷίʔυͷ༷͕Θ͔ΔΑ͏ʹ ͍͖͍ͯͨ͠ • ͖ͬ͞ͷϚΠϯυϚοϓͱؔ࿈͚Δ
࣮ࡍʹͬͯΈͨ • FizzBuzzͰྫʹͯ͠Έͨ
࣮ • ݟͤ·͢ • Gistʹ͋͛·ͨ͠ • https://gist.github.com/ ug23/9aafd9e7666ffaa9a1aaba3640d6 d5d8
rspec࣮ߦ݁Ռ fizzbuzz indexΛදࣔจࣈྻʹม͢Δ 3ͷഒͷͱ͖Fizz 5ͷഒͷͱ͖Buzz 15ͷഒͷͱ͖FizzBuzz 3ͷഒͰ5ͷഒͰͳ͍ͱ͖ͦͷ·· ग़ྗ͢Δ index:1ͷͱ͖ͷදࣔจࣈྻΛվߦ۠ΓͰඪ४ग़ྗ͢Δ index:15ͷͱ͖ͷදࣔจࣈྻΛվߦ۠ΓΛඪ४ग़ྗ͢Δ
ճ͢Δ 1͔Β100·ͰͰग़ྗ͢Δ
ҙ • ͳʹ͔ΛΞτϓοτ͢Δࡍʹ ϚΠϯυϚοϓΛϕʔεʹ͢ΔΠϝʔδ • ٯ͋·Γߟ͍͑ͯ·ͤΜ ٯʹ໘ʹͳΔ͔͠Ε·ͤΜ • ͬͱ͍͍͍ํ͋Εڭ͍͑ͯͩ͘͞
·ͱΊ
·ͱΊ • ςετઃܭͷखஈͱͯ͠ ϚΠϯυϚοϓΛར༻ͯ͠·͢ • ςετઃܭͷϚΠϯυϚοϓ͕ ͦͷ··ػೳҰཡʹͳͬͯ ͍Ζ͍Ζ͑·͢ • ͦͷ··RSpecςετέʔεʹ
མͱ͠ࠐΜͰ͍·͢