Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Test Driven Development For Lambda
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
堀家隆宏
August 09, 2017
Technology
410
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Test Driven Development For Lambda
堀家隆宏
August 09, 2017
More Decks by 堀家隆宏
See All by 堀家隆宏
オープンソースコミュニティで加速するサーバーレスの未来/serverless will be
horike37
4
780
auth0-meetup.pdf
horike37
1
290
What’s happening with Serverless Framework, and it lives with AWS SAM.
horike37
0
150
What is Serverless. Why is Serverless.
horike37
1
140
aws-with-functional-saas
horike37
2
230
serverless-with-oss
horike37
0
180
slsconftokyo
horike37
0
6k
slsconfworkshop
horike37
3
3.1k
serverless-kyoto
horike37
1
190
Other Decks in Technology
See All in Technology
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
890
俺の仕事は AIに奪われないし、たぶんその BIも要らない
hikaruri
0
470
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
2
1.6k
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.5k
What the customer really needed
kawaguti
PRO
1
160
DEFCON34-Write-up_HYCu-MYCu
daikiokazaki
0
160
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
4
1.7k
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
3k
人間はどの意思決定を手放せるのか
kawasima
14
6.8k
空間オーディオで過去の 自分(ゴースト)と競うランニング 〜HealthKitのルートを足音に変える実装〜
nao_randd
0
210
range over func 2年間の軌跡 Issue #56413 はGoのエコシステムをどう変えたか
ryujicre8ive
0
190
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
27
21k
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
520
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
We Are The Robots
honzajavorek
0
370
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
800
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
360
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.9k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
Become a Pro
speakerdeck
PRO
31
6.3k
Transcript
5FTU%SJWFO%FWFMPQNFOU 'PS-BNCEB
ࣗݾհ w %JHJUBM$VCF$P-UE w 4FSWFSMFTT'SBNFXPSL$PSF$POUSJCVUPSBOE QMVHJOEFWFMPQFS w 4FSWFSMFTT'SBNFXPSLຊޠϑΥʔϥϜཧऀ IUUQTHJUIVCDPNTFSWFSMFTTKBQBOGPSVN
4BOGSBODJTDP
ࠓ͢͜ͱ
-BNCEBΛͬͨΠϕϯτυϦϒϯΞʔΩςΫνϟʹ͓͚Δ ςετͷצॴΛղઆͭͭ͠ɺ ࣮ࡍͷςετίʔυΛಈ͔͠ͳ͕ΒϙΠϯτΛԡ͍͑ͯ͘͞
2ԿނςετΛॻ͘ͷ͔
ܧଓతʹ։ൃΛߦ͏ϓϩδΣΫτϓϩμΫτ ͷ࣭ΛอͪͭͭɺվળͷͨΊͷιʔείʔυͷ มߋΛޮྑ͘ߦ͏ͨΊͷΛ࡞Δ ϞϊϦγοΫͳγεςϜ։ൃͷੈքͰ͜Εಉ͡
2ԿނΠϕϯτυϦϒϯΞʔΩςΫνϟ ͳੈքͰςετͷ͕Α্͕͘Δͷ͔
wૄ݁߹ͳϚΠΫϩαʔϏε܈Λ౷߹ͯ͠ςετΛ͢Δͱ͍͏ɺࠓ·Ͱʹ͋·Γͳ͡Έ ͷͳ͍ςετͷߟ͑ํ͕ඞཁͱͳͬͨ wΞʔΩςΫνϟͷಛੑ্ɺιʔείʔυͷ࣭͕γεςϜࣗମͷ࣭ʹμΠϨΫτʹ ӨڹΛٴ΅ͨ͢ΊɺͳΜͱͳ͘Ͱࡁ·͞Εͳ͍෦͕େ͖͘ͳ͖ͬͯͨ
ΠϕϯτυϦϒϯΞʔΩςΫνϟ ͷςετઓུͬͯͲΜͳͷʁ
ΠϕϯτυϦϒϯΞʔΩςΫνϟͷςετઓུ ΠϯςάϨʔγϣϯςετ Ϣχοτςετ Ϣχοτςετ
ΠϕϯτυϦϒϯΞʔΩςΫνϟͷςετઓུ w࣮ڥʹσϓϩΠͨ͠ΞʔΩςΫνϟͷΠϯϓοτͱΞτϓοτ͕ਖ਼ ͍͜͠ͱΛΠϯςάϨʔγϣϯςετʹΑΓνΣοΫ͢Δ w֤-BNCEBϑΝϯΫγϣϯϢχοτςετʹΑΓɺ୯ମςετΛߦ͏
ΠϯςάϨʔγϣϯςετͷϙΠϯτ w4FSWFSMFTT'SBNFXPSL4".ͳͲͷσϓϩΠπʔϧΛ͍Ξʔ ΩςΫνϟΛఆٛ wσϓϩΠɺςετͷ࣮ࢪɺআͷྲྀΕΛίʔυԽ͢Δ
"1*(BUFXBZͷΠϯςάϨʔγϣϯςετྫ IUUQTHJUIVCDPNIPSJLFTFSWFSMFTTBQJJOUFHSBUJPOUFTUTBNQMF σϓϩΠ আ ςετ beforeAll(() => { Utils.deployService(); });
it('should return correct values from all apis', () => { const testEndpoint = `${endpoint}/hello`; return fetch(testEndpoint, { method: 'GET' }) .then(response => response.json()) .then((json) => expect(json.message).to.equal(‘Go function successfully!')); }); afterAll(() => { Utils.removeService(); }); });
ϢχοτςετͷྲྀΕ w"84"1*ͷଓΛϞοΫɺ-PDBM4UBDLͱ͍ͬͨԾͷڥͰஔ͖͑Δɻͭ·Γɺ "84Ϧιʔεςετ֎ͱͯ͠୯७ʹॲཧͷྲྀΕΤϥʔॲཧͷذͳͲͷϓϩάϥ Ϝ༷ͷςετʹॏΛஔ͘ w"84"1*ͷଘࡏΛҙࣝ͢ΔҎ֎ɺ͍ΘΏΔ௨ৗͷϢχοτςετ
ϞοΫΛ࡞Δྫ const dynamoDbGetStub = sinon.stub(proxyDynamoDB.prototype,’get').returns( {promise: () => { return
Promise.resolve({ Item: { post_title: 'aa', post_content: 'bb' } }) }}) %ZOBNP%#%PDVNFOU$MJFOUHFU QSPNJTF ͷฦΓΛࢦఆ -BNCEBͷϢχοτςετϕετϓϥΫςΟε IUUQRJJUBDPNIPSJLFJUFNTGGCDBF
͜ΕΒͷςετΛΈ߹Θͤͯ ͲͷΑ͏ʹ5FTU%SJWFOʹ։ൃΛߦ͏ͷ͔
5%%ͷྲྀΕ w·ͣΠϯςάϨʔγϣϯςετΛॻ͘ɻ-BNCEBਖ਼ৗܥͷΈͷͬ͘͟Γ௨ΔϨϕ ϧͰྑ͍ w࣍ʹ-BNCEBͷΤϥʔॲཧʹ͍ͭͯཧͯ͠ϢχοτςετͱϓϩάϥϜΛϒϥο γϡΞϓ w࠷ޙʹΠϯςάϨʔγϣϯςετͱϢχοτςετ͕௨Δ͜ͱΛ֬ೝͯ͠
·ͱΊ
wΠϯςάϨʔγϣϯςετΛߦͬͯϚΠΫϩαʔϏεશମΛཏ͢ΔςετΛߦ ͏ wϢχοτςετ"84"1*ͷʹଓͤͣʹ७ਮͳϓϩάϥϜͷৼΔ͍ͷΈΛς ετ͢Δ w։ൃͷࡍ·ͣΠϯςάϨʔγϣϯςετΛॻ͘ͱ͜Ζ͔Β
࠷େࣄͳ͜ͱ
ͨΓલͷ͜ͱͰ͋Γ·͕͢ɺ ࣮ઓͰ͑ΔͨΊʹࣗͰςετΛॻ͍ͯ ମʹ֮͑ͤ͞·͠ΐ͏