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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
izumix03
February 09, 2024
Business
260
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
増え続ける運用を、 Skill化する"型"でさばく
morimori3
0
380
マーケティンググループ紹介資料/ marketing
m3c
2
18k
向山純平 メニュー表 / Junpei Mukouyama – Professional Services
mj6237
3
290
インパクトレポート2026
nessu_inc
0
110
malna-recruiting-pitch
malna
0
28k
SaaS・クラウド版・ソフトウェア版…どれを選ぶ? 用途と課題で紐解く Movable Type シリーズ選定ガイド
masakah
0
250
TECO Design 会社紹介資料
tecodesign
0
320
Armed Security Guards in Nashville: When Does Your Business Need Them?
firstclasssecurity1
0
230
AI × 型|FDE的な働き方を再現可能にする「判断の軸」
aictokamiya
0
160
家族アルバム みてね 事業紹介 / Our Business
familyalbum
9
64k
カンパニーデック_260910.pdf
kojima1
0
390
freeeの福利厚生と働き方
freee
PRO
1
110k
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
550
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
New Earth Scene 8
popppiees
4
2.6k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
We Have a Design System, Now What?
morganepeng
55
8.4k
エンジニアに許された特別な時間の終わり
watany
109
250k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
How STYLIGHT went responsive
nonsquared
100
6.3k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
YesSQL, Process and Tooling at Scale
rocio
174
15k
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リプレイス!