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
使い捨てAPIテストのすすめ
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
izumix03
February 09, 2024
Business
250
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
使い捨てAPIテストのすすめ
izumix03
February 09, 2024
Other Decks in Business
See All in Business
課題発見から始めるプロダクト密着型TA組織立ち上げ 〜小規模TAチームが3Dアセットの生産性を倍にした方法〜
gree_tech
PRO
0
920
マーケティンググループ紹介資料/ marketing
m3c
2
18k
なぜデベロッパーアドボカシーが必要なのか?
taiponrock
PRO
0
170
増え続ける運用を、 Skill化する"型"でさばく
morimori3
0
260
中期経営計画2027(2026年8月14日更新)
buyselltechnologies
0
3.6k
株式会社ジェーイーエル会社案内_簡易版202608
jelrobot
0
410
CMB.TECH Q2 2026 earnings release
cmbtech
PRO
1
1.7k
誰かの役に立つアウトプットの作り方〜学びの循環に飛び込もう!
ikuodanaka
3
540
アッテル会社紹介資料/culture deck
attelu
11
17k
ラス恋カンパニーデック_260907
laskoi
0
350
TECO Design 会社紹介資料
tecodesign
0
290
さまざまなサイズにおける巻き込み方と伝え方 / OSO2026
daiksy
1
370
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
520
The untapped power of vector embeddings
frankvandijk
2
1.9k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
YesSQL, Process and Tooling at Scale
rocio
174
15k
How GitHub (no longer) Works
holman
316
150k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Navigating Weather and Climate Data
rabernat
0
510
Into the Great Unknown - MozCon
thekraken
41
2.7k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
Transcript
使い捨てAPIテストのすすめ ~取得系APIのリプレイスで使えるTips~ DeNA SOMPO Mobility 泉川 貴洋
WEB APIのリプレイって⼤変... 2 実際にやってよかったTips 使い捨てAPIテスト どういう仕様?複雑すぎる... テストもない... 既存APIと同じ挙動を保証?!!
3 泉川 貴洋 / いずみかわ たかひろ 所属 DeNA SOMPO Mobility
グロース本部プロダクト開発部 担当 Anyca サーバサイドエンジニア 出⾝ ⾹川県 家族構成 妻と2歳の娘の3⼈家族 @izumix0303
エニカとは 新型⾞‧⾼級⾞など1,300以上の⾞種に乗れる、 個⼈間を中⼼としたカーシェアサービス。 カーシェアを通じた理想のライフスタイルを提供 4
‧データ準備(登録, DB Dump,etc...) ‧リクエストと正解レスポンスを定義 ‧CIなどで継続的に実⾏ 5 使い捨てAPIテスト? ⼀般的なAPIテスト 使い捨てAPIテスト ‧データ準備(登録,
DB Dump,etc...) ‧リクエストだけ定義 ‧開発終わったら破棄 = 使い捨て
使い捨てAPIテストの構築⼿順 ①古いエンドポイント 旧 新 ②新エンドポイントを 別に作る ③テストを書く GET old/hoge/1 レスポンス取得
新旧のレスポンス⽐較! GET new/hoge/1 ④開発 DB
使い捨てAPIテストの作り⽅ ‧Jupyter Labで作る ‧pythonに変換して実⾏ ‧pytest-clarity で差分を⾒やすくする
Jupyter Labで作る 対話的に確認しながら作れる
Pythonに変換 Makefileの例 Pythonに変換しながら Pytestを実⾏ NOTEBOOKS:=$(shell find src/test -name "*.ipynb") PYS:=$(NOTEBOOKS:.ipynb=.py)
.PHONY: convert convert: $(PYS) %.py: %.ipynb $(VENV)/jupyter nbconvert --to python $< .PHONY: test test: convert $(VENV)/pytest -vv ./src/test/**/*.py include Makefile.venv
pytest-clarity で差分を⾒やすくする JSONの差分を、 ⾊付けして ⾒せてくれる
使い捨てAPIテストのメリット 作りやすさ 簡単に 作れる 質 保証内容が 確実 量 パターンも ⼗分確保
Let's 快適なAPIリプレイス!