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
1
920
IIS URL Rewrite のユニットテストをしよう! /iis-url-rewrite-unit-test
.NET Conf 2017 Tokyo, Japan の LT
https://csugjp.connpass.com/event/66004/
minato128
October 07, 2017
Tweet
Share
More Decks by minato128
See All by minato128
Cloudflare Use Cases at CADDi
minato128
2
590
Azure Monitoring with Datadog Part 1
minato128
0
200
新メール配信基盤への移行 /ikyu-mail-platform
minato128
7
5.9k
デプロイ完全自動化から1年で起きたこと /ikyu-deploy
minato128
2
4.9k
Other Decks in Programming
See All in Programming
Codex の「自走力」を高める
yorifuji
0
1.3k
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
150
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
390
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
150
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1.1k
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
240
Ruby and LLM Ecosystem 2nd
koic
1
1.3k
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
360
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
180
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
510
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
300
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.2k
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
650
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
260
Side Projects
sachag
455
43k
Building Adaptive Systems
keathley
44
3k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Speed Design
sergeychernyshev
33
1.6k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
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