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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
minato128
October 07, 2017
Programming
920
1
Share
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
630
Azure Monitoring with Datadog Part 1
minato128
0
200
新メール配信基盤への移行 /ikyu-mail-platform
minato128
7
5.9k
デプロイ完全自動化から1年で起きたこと /ikyu-deploy
minato128
2
5k
Other Decks in Programming
See All in Programming
JOAI2026 1st solution - heron0519 -
heron0519
0
140
t *testing.T は どこからやってくるの?
otakakot
1
660
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
820
実用!Hono RPC2026
yodaka
2
230
Agentic Elixir
whatyouhide
0
170
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
150
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
200
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
430
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
270
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
580
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
110
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
180
Test your architecture with Archunit
thirion
1
2.2k
Abbi's Birthday
coloredviolet
2
7.1k
How GitHub (no longer) Works
holman
316
150k
The Language of Interfaces
destraynor
162
26k
Building an army of robots
kneath
306
46k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Become a Pro
speakerdeck
PRO
31
5.9k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
260
Building Applications with DynamoDB
mza
96
7k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
120
Building AI with AI
inesmontani
PRO
1
910
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