SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
6.
API (単体) テスト
API
Server
Test
1. テストデータをリクエスト
として送信
[request]
GET api/user
id: 1
[response]
id: 1
name: deme0607
email: deme0607@example.com
2. レスポンスデータを期待結果
と比較
7.
それだけで十分?
• API は様々なコンポーネントと結合して動作
API
Server
User
API
Server
DB
Load Balancer / Reverse Proxy
[request] [response]
8.
API結合テスト
• 実環境で動作しているAPIを実際のクライアン
トと同じ経路からテスト
API
Server
結合
テスト
API
Server
DB
Load Balancer / Reverse Proxy
[request] [response]