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
450
SREの越境 / SRE Collaboration
y0hgi
2
300
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
450
ジョジョの世界をXRで再現する
mofurune
0
130
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
460
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
7
1.9k
FreeBSDでZabbixを動かす
kenkino
0
360
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
230
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
130
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
Featured
See All Featured
Test your architecture with Archunit
thirion
2
2.4k
New Earth Scene 8
popppiees
4
2.6k
How to train your dragon (web standard)
notwaldorf
96
6.9k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
300
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
The Curse of the Amulet
leimatthew05
3
15k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
420
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Everyday Curiosity
cassininazir
0
340
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 => !