SessionDecorator、SiteProfiler の使い方(チュートリアル)
(1) SessionDecorator 、SiteProfiler が正しくインストールされていれば、Fiddler を起動したときに以下のような画面が表示されれます。
![tutorial_01.png](http://hagurese.net/blog/File.aspx?key=58f7bd3b-a726-4c42-812e-8686670c85fb&=x200&y=200)
※それぞれの配布場所はこちら→SessionDecorator、SiteProfiler
(2) SessionDecorator を使って画面遷移を記録してみましょう。
ブラウザに遷移元画面を表示して、画面のイメージをキャプチャーします。
![tutorial_02.png](http://hagurese.net/blog/File.aspx?key=0e541ede-7343-46ef-8f33-36b1fa0171cb&=x200&y=200)
画面のイメージをFiddler のセッションに記録します。
![tutorial_03.png](http://hagurese.net/blog/File.aspx?key=3e3d270e-bfbd-4ca0-8a3f-e975785d9c5f&=x200&y=200)
![tutorial_04.png](http://hagurese.net/blog/File.aspx?key=678a0b48-bdf6-4923-bca4-98492243104d&=x200&y=200)
ブラウザを操作して画面を遷移します。画面のイメージをキャプチャーします。
![tutorial_05.png](http://hagurese.net/blog/File.aspx?key=db4224c5-527f-4bd7-9193-a23842073960&=x200&y=200)
画面のイメージをFiddler のセッションに記録します。
![tutorial_06.png](http://hagurese.net/blog/File.aspx?key=ef45a8a7-755b-419c-ae81-a157ab3d5c59&=x200&y=200)
![tutorial_07.png](http://hagurese.net/blog/File.aspx?key=ea25a160-2fed-4ddf-9b92-24d51e87e1fa&=x200&y=200)
区切り線を入れて見やすくしましょう。
![tutorial_08.png](http://hagurese.net/blog/File.aspx?key=9aad597d-24bf-42e5-b2d8-f41fbdb60d90&=x200&y=200)
![tutorial_09.png](http://hagurese.net/blog/File.aspx?key=8b21362c-cf0a-4fb6-9a1c-936ac5eb0b7f&=x200&y=200)
上記の要領で画面遷移を記録していきます。
![tutorial_10.png](http://hagurese.net/blog/File.aspx?key=8788e851-2173-42c9-95e2-d15f2f36c03c&=x200&y=200)
(3) セッションに書式を設定してみましょう。
文字色を選択します。
![tutorial_11.png](http://hagurese.net/blog/File.aspx?key=5aad6467-19bc-45aa-8854-f0486f078d9d&=x200&y=200)
※「A」の文字をダブルクリックして次の色を選択することができます。
背景色を選択します。
![tutorial_12.png](http://hagurese.net/blog/File.aspx?key=22972c70-8952-4a6c-bb23-52057a8d5251&=x200&y=200)
※「■」の文字をダブルクリックして次の色を選択することができます。
セッションを選択して書式を設定します。
![tutorial_13.png](http://hagurese.net/blog/File.aspx?key=b3f98a58-3b42-47e5-8d70-098e74b65343&=x200&y=200)
![tutorial_14.png](http://hagurese.net/blog/File.aspx?key=dfbb8943-6724-4ce3-bebb-653a0d72b340&=x200&y=200)
※色だけでなく太字、斜体やセッションコメントを設定することができます。
※「Immediate」をチェック状態にしておくと、以降に記録されるセッションに対して自動的に書式を設定します。
※「Erase」で設定された書式を消去します。
(4) SiteProfiler を使って画面遷移情報を作成しましょう。
![tutorial_15.png](http://hagurese.net/blog/File.aspx?key=3eefa3ae-7378-4c23-b8a1-9c2f207cf8ee&=x200&y=200)
![tutorial_16.png](http://hagurese.net/blog/File.aspx?key=f0f9bc0f-2f4e-4d6b-956d-42ae8250dfc1&=x200&y=200)
![tutorial_17.png](http://hagurese.net/blog/File.aspx?key=80ec13cc-0a69-4896-92e6-71b298af19dc&=x200&y=200)
※Fiddler のセッションはドラッグ&ドロップ操作で取り込みます。
※画面イメージをファイルから取り込みたいときは右クリック
次の画面遷移情報を作成します。
![tutorial_18.png](http://hagurese.net/blog/File.aspx?key=85753b17-05f8-4fdc-b3cb-0e2cbff86c1b&=x200&y=200)
登録済みの画面名、アクション名はリストから選択することができます。
![tutorial_19.png](http://hagurese.net/blog/File.aspx?key=d7e0a29b-16f0-491a-a493-eef47211117d&=x200&y=200)
全部入力したら、画面遷移の一覧を表示して調整します。
![tutorial_20.png](http://hagurese.net/blog/File.aspx?key=d8fe1966-c75f-4ec0-bd4a-34681ef2e071&=x200&y=200)
![tutorial_21.png](http://hagurese.net/blog/File.aspx?key=d418a156-c1ed-482f-ae9e-fea5e67d65f3&=x200&y=200)
セッションの詳細を表示して調整します。
![tutorial_22.png](http://hagurese.net/blog/File.aspx?key=884eefd1-c2d1-44ce-8479-9e4b9def5648&=x200&y=200)
![tutorial_23.png](http://hagurese.net/blog/File.aspx?key=ff8990f4-7657-4968-bb8c-6273912d8a8b&=x200&y=200)
![tutorial_24.png](http://hagurese.net/blog/File.aspx?key=4123cb33-8a42-4ff6-91e2-b34935d530dd&=x200&y=200)
![tutorial_25.png](http://hagurese.net/blog/File.aspx?key=7a094032-40bf-4389-b3a5-138a57b22752&=x200&y=200)
※MIMETypeや文字セットは「Content-Type」ヘッダーで判断していますが、ヘッダー情報がない場合や誤りがある場合には、こちらで個別に指定してください。
(5) レポートを出力してみましょう。
![tutorial_26.png](http://hagurese.net/blog/File.aspx?key=6e68e589-0e31-45ee-922a-e689cbc5469f&=x200&y=200)
![tutorial_27.png](http://hagurese.net/blog/File.aspx?key=db189d19-b3aa-4b67-b672-a97b63cb6cc5&=x200&y=200)
HTML形式で以下のようなサンプルレポートが出力されます。
![tutorial_28.png](http://hagurese.net/blog/File.aspx?key=32d39d5d-80e0-47bd-bad1-44a711ea8dcc&=x200&y=200)
(6) データを保存してみましょう。
![tutorial_29.png](http://hagurese.net/blog/File.aspx?key=0d766a84-8793-4966-aead-0d1425f3a281&=x200&y=200)
(7) カスタマイズしてみましょう。
![tutorial_30.png](http://hagurese.net/blog/File.aspx?key=2ecee3bc-077c-45a1-9635-8364a345bddc&=x200&y=200)
よく使う画面名、アクション名はこちらに登録しておくとリストから選択できます。
![tutorial_31.png](http://hagurese.net/blog/File.aspx?key=a0c03ed9-35e3-437a-b30d-69f6339aa562&=x200&y=200)
レポート出力の処理はC#のスクリプトで記述されています。サンプルレポートを参考にしてカスタマイズしてみましょう。
![tutorial_32.png](http://hagurese.net/blog/File.aspx?key=73b9cfa6-fdb4-4147-8074-f55260c905d4&=x200&y=200)
最後に
前作「DropObjects」の「TargetExport」機能で出力していたExcelファイルとほぼ同等のものを出力するスクリプトをご用意しました。
SiteProfilerスクリプト集の「確認項目表(Excel)作成スクリプト.txt」です。・・・(2015/07/11 GitHubにて公開しました。)
※こちらも自己責任でご自由にお使いください。