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
Tests API
Search
Yoshiki Nakagawa
August 30, 2016
Programming
83
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Tests API
Yoshiki Nakagawa
August 30, 2016
More Decks by Yoshiki Nakagawa
See All by Yoshiki Nakagawa
Amazon Bedrock で作る未来の開発サイクルと オペレーション戦略 / AWS Summit Japan 2025
yyoshiki41
0
1.4k
MCP Documentation Server @AI Coding Meetup #1
yyoshiki41
2
4.3k
Go API クライアントの実装 〜Go Conference に載せれなかったTIPS〜
yyoshiki41
0
780
マルチテナントのアプリケーション実装 〜実践編〜
yyoshiki41
5
3.2k
Canary Deployments
yyoshiki41
0
600
go-gmail-drafts
yyoshiki41
0
820
Graceful Upgrade for Go App
yyoshiki41
0
150
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
660
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.1k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
380
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
340
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
180
Event is what happens
moro
2
450
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
22
22k
contenteditable と日本語入力に向き合う
colorful12
0
190
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
360
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
210
パーソナライズPodcastを作った話
repunit11
0
140
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
142
7.8k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
350
Building Adaptive Systems
keathley
44
3.2k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
GitHub's CSS Performance
jonrohan
1033
470k
Accessibility Awareness
sabderemane
1
250
Transcript
Tests API Agora Tech Talk #5 Aug / 30 /
2016 @yyoshiki41 Yoshiki Nakagawa
Health Check API Runscope Blog Build a Health Check API
for Services Underneath Your API TL;DR • Create separate health check API endpoints for all services! • Set up notifications!
Health Check API How do we monitor them? • MySQL
• Redis • BIND • etc ... They don't come with (HTTP) RESTful APIs ! Communicate over lower-level protocols like TCP and UDP.
Good Example! ElasticSearch $ curl localhost:9200/_cluster/health { "cluster_name": "pairs-jp-es-cluster", "status":
"green", "timed_out": false, "number_of_nodes": 6, "number_of_data_nodes": 5, "active_primary_shards": 8, "active_shards": 32, "relocating_shards": 0, "initializing_shards": 0, "unassigned_shards": 0, "delayed_unassigned_shards": 0, "number_of_pending_tasks": 0, "number_of_in_flight_fetch": 0, "task_max_waiting_in_queue_millis": 0, "active_shards_percent_as_number": 100 }
Create Health Check API Endpoints! Check MySQL connection <?php $config
= [ "server" => "databaseserver:3306", "username" => "root", "password" => "password" ]; header('Content-type: application/json'); $link = new mysqli($config['server'],$config['username'],$config['password']); if ($link->connect_errno) { http_response_code(503); echo('{ "status": "Unable to connect" }'); } else { http_response_code(200); echo('{ "status": "Connection successful." }'); }
Caution Do not open to the public ! Access control
by ip address or authentication. nginx Advent Calendar 2015 Day21 nginx APIΤϯυϙΠϯτຖͷΞΫηε੍ޚ
Tests API Unit test $ go test -run TestHogehoge How
do we test API endpoints??
Runscope
Runscope • Monitor API perfomance • CI
Monitor API performance Set schedules for this test Demo
Ghost Inspector
Ghost Inspector Ghost InspectorΛࢼͯ͠Έ·ͨ͠ FYI (૿੮)·ͩࢹͰফͯ͠ΔͷʁϒϥβνΣοΫࣗಈԽͷ͢͢ Ί
Demo
Automate everything Commit => Unit Test => Deploy => API
Tests => !