Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
IIS URL Rewrite のユニットテストをしよう! /iis-url-rewrite-...
Search
minato128
October 07, 2017
Programming
940
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
IIS URL Rewrite のユニットテストをしよう! /iis-url-rewrite-unit-test
.NET Conf 2017 Tokyo, Japan の LT
https://csugjp.connpass.com/event/66004/
minato128
October 07, 2017
More Decks by minato128
See All by minato128
Cloudflare Use Cases at CADDi
minato128
2
720
Azure Monitoring with Datadog Part 1
minato128
0
210
新メール配信基盤への移行 /ikyu-mail-platform
minato128
7
6k
デプロイ完全自動化から1年で起きたこと /ikyu-deploy
minato128
2
5k
Other Decks in Programming
See All in Programming
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
590
VibeCodingからAgenticWorkflowへ
starfish719
0
330
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
260
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
540
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
160
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
140
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
140
テーブルをDELETEした
yuzneri
0
140
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.7k
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
490
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
190
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
300
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
340
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Raft: Consensus for Rubyists
vanstee
141
7.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Paper Plane
katiecoart
PRO
2
52k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
540
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
240
Scaling GitHub
holman
464
140k
The Limits of Empathy - UXLibs8
cassininazir
1
600
Transcript
IIS URL Rewrite の ユニットテストをしよう! 株式会社一休 宿泊事業本部 開発部 飯迫 正貴
2017/10/07 LT
IIS URL Rewrite とは?
IIS URL Rewrite とは? • URL Rewrite Module • https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-
module/using-the-url-rewrite-module • 設定に書いたルールに従ってURLを書き換えてくれる
課題
課題 • 便利な反面、継ぎ足し続けるとわけが分からなくなる • 負債化しやすい • 全体が理解できず、変更すると他が壊れるのではという恐怖 • ジェンガ状態 •
気軽にリファクタリングできない
www.ikyu.com/rewrite.config
きっかけ • ある日の会議の雑談 • わたし「そういえばRewriteがバグりやすいんですよねえ」 • CTO「はてなでは rewrite のテスト書いてたよ」 •
http://d.hatena.ne.jp/onishi/20101017/1287277579 • 数日後 • しばやん「テスト用のライブラリ作りました」 • http://blog.shibayan.jp/entry/20160620/1466392651
IIS Express TestKit
IIS Express TestKit • Rewrite Rule のテストが書けるハイパー便利ツール • Outbound Rule
も対応 • OSS • https://github.com/shibayan/iisexpress-testkit
IIS Express TestKit
Project Example
Rewrite Rule Example
Outbound Rule Example
運用してみた
運用してみた • 壊れるのを恐れず、気軽に変更できるようになった • 最高 • CI に Rewrite のユニットテストを追加
• 不正なRewriteがリリースされる事故がなくなった • データセンターからクラウドに移行したときにも活躍 • PaaSに乗せるためアプリを分割したらテストが通らなくなった • 通らなくなったもの=分割してなくなった部分のテスト => Rewriteも分割 • ユニットテストを書いたことで参照されてないルールがあぶり 出された • そしてリファクタリング
参照されてないルール
まとめ • IIS の URL Rewrite もユニットテストが書ける! • URL Rewrite
運用で困っている人は今すぐインストールして書 きましょう! • Install-Package IisExpressTestKit