"No","テストID","対象ファイル","対象クラス/関数","対象メソッド","テスト観点","テストケース名","前提条件","入力値","期待結果","優先度","備考"
"1","UT-BBK-001","sp_BlitzBackups.sql","sp_BlitzBackups","メインプロシージャ","正常系","ヘルプモードでの実行","SQL Server接続済み","@Help = 1","ヘルプテキストが出力される","低","ヘルプ表示機能"
"2","UT-BBK-002","sp_BlitzBackups.sql","sp_BlitzBackups","メインプロシージャ","正常系","バージョンチェックモードでの実行","SQL Server接続済み","@VersionCheckMode = 1","@Versionと@VersionDateがOUTPUTに設定され、即時RETURN","中","バージョン確認機能"
"3","UT-BBK-003","sp_BlitzBackups.sql","sp_BlitzBackups","メインプロシージャ","正常系","デフォルトパラメータでの実行","msdbにバックアップ履歴あり","パラメータなし（デフォルト値）","#Backups、#Recoverability、#Warningsの結果セットが返却される","高","基本動作の確認"
"4","UT-BBK-004","sp_BlitzBackups.sql","sp_BlitzBackups","メインプロシージャ","正常系","指定時間範囲でのバックアップ解析","msdbに過去24時間のバックアップ履歴あり","@HoursBack = 24","過去24時間のバックアップ情報のみが解析される","高","時間範囲フィルタ機能"
"5","UT-BBK-005","sp_BlitzBackups.sql","sp_BlitzBackups","メインプロシージャ","正常系","カスタムMSDBデータベース名での実行","別名のMSDBクローンが存在","@MSDBName = 'msdb_copy'","指定されたデータベースからバックアップ情報を取得","中","代替MSDB参照機能"
"6","UT-BBK-006","sp_BlitzBackups.sql","sp_BlitzBackups","メインプロシージャ","正常系","カスタムリストア速度パラメータでの実行","msdbにバックアップ履歴あり","@RestoreSpeedFullMBps = 100, @RestoreSpeedDiffMBps = 150, @RestoreSpeedLogMBps = 200","指定されたリストア速度でRTO計算が実行される","中","カスタムリストア速度でのRTO計算"
"7","UT-BBK-007","sp_BlitzBackups.sql","sp_BlitzBackups","メインプロシージャ","正常系","デバッグモードでの実行","msdbにバックアップ履歴あり","@Debug = 1","動的SQLがPRINTで出力される","低","デバッグ機能"
"8","UT-BBK-008","sp_BlitzBackups.sql","sp_BlitzBackups","メインプロシージャ","異常系","存在しないMSDBデータベース名の指定","該当データベースが存在しない","@MSDBName = 'nonexistent_db'","RAISERROR 16が発生し、処理が終了","高","存在しないDB参照時のエラーハンドリング"
"9","UT-BBK-009","sp_BlitzBackups.sql","sp_BlitzBackups","RPO計算","正常系","RPOワーストケースの計算","複数のバックアップが異なる間隔で存在","デフォルトパラメータ","バックアップ間の最大ギャップ（分）がRPOWorstCaseMinutesに設定される","高","RPO計算の正確性"
"10","UT-BBK-010","sp_BlitzBackups.sql","sp_BlitzBackups","RPO計算","境界値","バックアップが1件のみ存在","1件のフルバックアップのみ存在","デフォルトパラメータ","RPOWorstCaseMinutesがNULLまたは適切な値","中","最小バックアップ数での動作"
"11","UT-BBK-011","sp_BlitzBackups.sql","sp_BlitzBackups","RPO計算","境界値","バックアップが存在しない","msdb.dbo.backupsetが空","デフォルトパラメータ","空の結果セットが返却される","中","データなし時の動作"
"12","UT-BBK-012","sp_BlitzBackups.sql","sp_BlitzBackups","RTO計算","正常系","RTOワーストケースの計算","フル、差分、ログバックアップが存在","デフォルトパラメータ","リストアに必要な合計時間（分）がRTOWorstCaseMinutesに設定される","高","RTO計算の正確性"
"13","UT-BBK-013","sp_BlitzBackups.sql","sp_BlitzBackups","RTO計算","正常系","フルバックアップのみでのRTO計算","フルバックアップのみ存在（差分・ログなし）","デフォルトパラメータ","フルバックアップのみでRTOが計算される","高","フルバックアップのみの場合"
"14","UT-BBK-014","sp_BlitzBackups.sql","sp_BlitzBackups","RTO計算","正常系","カスタムリストア速度でのRTO計算","フルバックアップが存在","@RestoreSpeedFullMBps = 50","指定された速度に基づいてRTOが計算される","中","カスタム速度でのRTO"
"15","UT-BBK-015","sp_BlitzBackups.sql","sp_BlitzBackups","バックアップ統計","正常系","フルバックアップの統計計算","複数のフルバックアップが存在","デフォルトパラメータ","FullMBpsAvg、FullMBpsMin、FullMBpsMaxが正しく計算される","高","フルバックアップ統計"
"16","UT-BBK-016","sp_BlitzBackups.sql","sp_BlitzBackups","バックアップ統計","正常系","差分バックアップの統計計算","複数の差分バックアップが存在","デフォルトパラメータ","DiffMBpsAvg、DiffMBpsMin、DiffMBpsMaxが正しく計算される","高","差分バックアップ統計"
"17","UT-BBK-017","sp_BlitzBackups.sql","sp_BlitzBackups","バックアップ統計","正常系","ログバックアップの統計計算","複数のログバックアップが存在","デフォルトパラメータ","LogMBpsAvg、LogMBpsMin、LogMBpsMaxが正しく計算される","高","ログバックアップ統計"
"18","UT-BBK-018","sp_BlitzBackups.sql","sp_BlitzBackups","回復可能性分析","正常系","最新リカバリモデルの取得","FULL、SIMPLEリカバリモデルのDBが存在","デフォルトパラメータ","LastBackupRecoveryModelに正しいリカバリモデルが設定される","高","リカバリモデル取得"
"19","UT-BBK-019","sp_BlitzBackups.sql","sp_BlitzBackups","回復可能性分析","正常系","最初と最後のフルバックアップ情報の取得","複数のフルバックアップが存在","デフォルトパラメータ","FirstFullBackupDate、LastFullBackupDateが正しく設定される","高","バックアップ日付範囲"
"20","UT-BBK-020","sp_BlitzBackups.sql","sp_BlitzBackups","回復可能性分析","正常系","平均バックアップスループットの計算","バックアップ履歴が存在","デフォルトパラメータ","AvgFullBackupThroughputMB、AvgDiffBackupThroughputMB、AvgLogBackupThroughputMBが計算される","中","スループット計算"
"21","UT-BBK-021","sp_BlitzBackups.sql","sp_BlitzBackups","トレンド分析","正常系","12ヶ月間のトレンドデータ取得","@MSDBName = 'msdb'で1年分のバックアップ履歴あり","@MSDBName = 'msdb'（デフォルト）","月別のデータベースサイズトレンドが#Trendingに格納される","中","サイズトレンド分析"
"22","UT-BBK-022","sp_BlitzBackups.sql","sp_BlitzBackups","トレンド分析","境界値","トレンド分析がmsdb以外で実行","カスタムMSDBを使用","@MSDBName = 'custom_msdb'","トレンド分析がスキップされる（backupfileがないため）","低","非msdbでのトレンド制限"
"23","UT-BBK-023","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック1","正常系","非エージェントバックアップの検出","SQL Agent以外のユーザーによるバックアップ履歴あり","デフォルトパラメータ","CheckId=1の警告が#Warningsに挿入される","高","非エージェントバックアップ警告"
"24","UT-BBK-024","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック2","正常系","互換性レベル変更の検出","互換性レベルが3回以上変更されたDB","デフォルトパラメータ","CheckId=2の警告が#Warningsに挿入される","中","互換性レベル変更警告"
"25","UT-BBK-025","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック3","正常系","パスワード保護バックアップの検出","is_password_protected=1のバックアップあり","デフォルトパラメータ","CheckId=3の警告が#Warningsに挿入される","中","パスワード保護バックアップ警告"
"26","UT-BBK-026","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック4","正常系","スナップショットバックアップの検出","is_snapshot=1のバックアップあり","デフォルトパラメータ","CheckId=4の警告が#Warningsに挿入される","低","スナップショットバックアップ情報"
"27","UT-BBK-027","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック5","正常系","読み取り専用状態でのバックアップ検出","is_readonly=1のバックアップあり","デフォルトパラメータ","CheckId=5の警告が#Warningsに挿入される","低","読み取り専用バックアップ警告"
"28","UT-BBK-028","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック6","正常系","シングルユーザーモードでのバックアップ検出","is_single_user=1のバックアップあり","デフォルトパラメータ","CheckId=6の警告が#Warningsに挿入される","中","シングルユーザーモード警告"
"29","UT-BBK-029","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック7","正常系","CHECKSUM未使用バックアップの検出","has_backup_checksums=0のバックアップあり（過去30日）","デフォルトパラメータ","CheckId=7の警告が#Warningsに挿入される","高","CHECKSUM未使用警告"
"30","UT-BBK-030","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック8","正常系","破損バックアップの検出","is_damaged=1のバックアップあり","デフォルトパラメータ","CheckId=8の警告が#Warningsに挿入される","高","破損バックアップ警告"
"31","UT-BBK-031","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック9","正常系","暗号化バックアップの検出（SQL 2014以降）","encryptor_typeがNOT NULLのバックアップあり","デフォルトパラメータ、@ProductVersionMajor >= 12","CheckId=9の警告が#Warningsに挿入される","中","暗号化バックアップ情報"
"32","UT-BBK-032","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック9","境界値","暗号化バックアップチェックのスキップ（SQL 2012以前）","SQL Server 2012以前","@ProductVersionMajor < 12","CheckId=9のチェックがスキップされる","低","バージョン依存チェック"
"33","UT-BBK-033","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック10","正常系","BULK LOGGEDデータを含むバックアップの検出","has_bulk_logged_data=1のバックアップあり","デフォルトパラメータ","CheckId=10の警告が#Warningsに挿入される","中","BULK LOGGEDデータ警告"
"34","UT-BBK-034","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック11","正常系","リカバリモデル変更の検出","FULLとSIMPLE間で5回以上変更","デフォルトパラメータ","CheckId=11の警告が#Warningsに挿入される","高","リカバリモデル変更警告"
"35","UT-BBK-035","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック12","正常系","非圧縮バックアップの検出","backup_size = compressed_backup_sizeのバックアップあり（過去30日）","デフォルトパラメータ","CheckId=12の警告が#Warningsに挿入される","中","非圧縮バックアップ警告"
"36","UT-BBK-036","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック13","正常系","大きな差分バックアップの検出","差分バックアップがフルの40%以上（10GB以上のDB）","デフォルトパラメータ","CheckId=13（Big Diffs）の警告が#Warningsに挿入される","中","大きな差分バックアップ警告"
"37","UT-BBK-037","sp_BlitzBackups.sql","sp_BlitzBackups","警告チェック13","正常系","大きなログバックアップの検出","ログバックアップがフルの20%以上（10GB以上のDB）","デフォルトパラメータ","CheckId=13（Big Logs）の警告が#Warningsに挿入される","中","大きなログバックアップ警告"
"38","UT-BBK-038","sp_BlitzBackups.sql","sp_BlitzBackups","PushBackupHistoryToListener","正常系","リスナーへのバックアップ履歴プッシュ","リンクサーバーとターゲットDBが存在","@PushBackupHistoryToListener = 1, @WriteBackupsToListenerName = 'listener', @WriteBackupsToDatabaseName = 'backup_db'","バックアップ履歴がリスナーのDBにコピーされる","高","履歴プッシュ機能"
"39","UT-BBK-039","sp_BlitzBackups.sql","sp_BlitzBackups","PushBackupHistoryToListener","異常系","@WriteBackupsToDatabaseNameがNULL","@PushBackupHistoryToListener = 1","@WriteBackupsToDatabaseName = NULL","RAISERROR 16が発生し、処理が終了","高","必須パラメータ検証"
"40","UT-BBK-040","sp_BlitzBackups.sql","sp_BlitzBackups","PushBackupHistoryToListener","異常系","@WriteBackupsToDatabaseNameがmsdb","@PushBackupHistoryToListener = 1","@WriteBackupsToDatabaseName = 'msdb'","RAISERROR 16が発生（実msdbへの書き込み禁止）","高","msdb書き込み禁止検証"
"41","UT-BBK-041","sp_BlitzBackups.sql","sp_BlitzBackups","PushBackupHistoryToListener","異常系","リスナー名とAG名の両方がNULL","@PushBackupHistoryToListener = 1","@WriteBackupsToListenerName = NULL, @AGName = NULL","RAISERROR 16が発生し、処理が終了","高","パラメータ検証"
"42","UT-BBK-042","sp_BlitzBackups.sql","sp_BlitzBackups","PushBackupHistoryToListener","正常系","AG名からリスナー名を自動取得","AGが存在し@WriteBackupsToListenerName未指定","@AGName = 'MyAG', @WriteBackupsToListenerName = NULL","sys.availability_group_listenersからリスナー名が取得される","中","AG名からのリスナー解決"
"43","UT-BBK-043","sp_BlitzBackups.sql","sp_BlitzBackups","PushBackupHistoryToListener","異常系","リンクサーバーが存在しない","指定されたリスナー名のリンクサーバーなし","@WriteBackupsToListenerName = 'nonexistent_listener'","RAISERROR 16が発生し、処理が終了","高","リンクサーバー存在確認"
"44","UT-BBK-044","sp_BlitzBackups.sql","sp_BlitzBackups","PushBackupHistoryToListener","異常系","リモートDBが存在しない","リンクサーバーは存在するがDBが存在しない","@WriteBackupsToDatabaseName = 'nonexistent_db'","RAISERROR 16が発生し、処理が終了","高","リモートDB存在確認"
"45","UT-BBK-045","sp_BlitzBackups.sql","sp_BlitzBackups","PushBackupHistoryToListener","正常系","backupsetテーブルの自動作成","リモートDBにbackupsetテーブルが存在しない","@WriteBackupsToDatabaseName = 'new_backup_db'","dbo.backupsetテーブルとインデックスが自動作成される","中","テーブル自動作成機能"
"46","UT-BBK-046","sp_BlitzBackups.sql","sp_BlitzBackups","PushBackupHistoryToListener","正常系","インクリメンタル履歴挿入","一部のバックアップ履歴が既にリモートに存在","@WriteBackupsLastHours = 168","未同期のバックアップ履歴のみがリモートに挿入される","高","重複防止挿入"
"47","UT-BBK-047","sp_BlitzBackups.sql","sp_BlitzBackups","PushBackupHistoryToListener","境界値","同期対象データなし","全てのバックアップ履歴が既にリモートに存在","@WriteBackupsLastHours = 168","「No data to move」メッセージが出力され、早期終了","低","データなし時の動作"
"48","UT-BBK-048","sp_BlitzBackups.sql","sp_BlitzBackups","パラメータ処理","正常系","@HoursBackの負値変換","正の値が指定された場合","@HoursBack = 168","内部で-168に変換される","中","正値から負値への変換"
"49","UT-BBK-049","sp_BlitzBackups.sql","sp_BlitzBackups","パラメータ処理","正常系","@WriteBackupsLastHoursの負値変換","正の値が指定された場合","@WriteBackupsLastHours = 168","内部で-168に変換される","中","正値から負値への変換"
"50","UT-BBK-050","sp_BlitzBackups.sql","sp_BlitzBackups","パラメータ処理","境界値","@HoursBack = 0","ゼロが指定された場合","@HoursBack = 0","現在時刻からの解析が行われる","低","ゼロ値の処理"
"51","UT-BBK-051","sp_BlitzBackups.sql","sp_BlitzBackups","動的SQL","正常系","SQLインジェクション対策（QUOTENAME使用）","特殊文字を含むDB名","@MSDBName = 'msdb]; DROP TABLE test; --'","QUOTENAMEによりSQLインジェクションが防止される","高","セキュリティ検証"
"52","UT-BBK-052","sp_BlitzBackups.sql","sp_BlitzBackups","出力結果","正常系","#Backups結果セットの構造確認","バックアップ履歴が存在","デフォルトパラメータ","database_name、RPOWorstCaseMinutes、RTOWorstCaseMinutes等のカラムを含む結果セット","高","出力構造検証"
"53","UT-BBK-053","sp_BlitzBackups.sql","sp_BlitzBackups","出力結果","正常系","#Recoverability結果セットの構造確認","バックアップ履歴が存在","デフォルトパラメータ","DatabaseName、LastBackupRecoveryModel、トレンドデータ等のカラムを含む結果セット","高","出力構造検証"
"54","UT-BBK-054","sp_BlitzBackups.sql","sp_BlitzBackups","出力結果","正常系","#Warnings結果セットの構造確認","警告条件に該当するデータが存在","デフォルトパラメータ","CheckId、Priority、DatabaseName、Finding、Warningカラムを含む結果セット","高","出力構造検証"
"55","UT-BBK-055","sp_BlitzBackups.sql","sp_BlitzBackups","出力結果","正常系","バージョン情報の出力確認","任意の実行","デフォルトパラメータ","CheckId=2147483647で感謝メッセージとバージョン情報が出力される","低","バージョン情報出力"
"56","UT-BBK-056","sp_BlitzBackups.sql","sp_BlitzBackups","トランザクション分離","正常系","READ UNCOMMITTEDの設定確認","任意の実行","デフォルトパラメータ","トランザクション分離レベルがREAD UNCOMMITTEDに設定される","低","分離レベル設定"
"57","UT-BBK-057","sp_BlitzBackups.sql","sp_BlitzBackups","一時テーブル","正常系","一時テーブルのクリーンアップ","正常終了時","デフォルトパラメータ","#Backups、#Warnings、#Recoverability、#RTORecoveryPointsがDROPされる","中","リソースクリーンアップ"
"58","UT-BBK-058","sp_BlitzBackups.sql","sp_BlitzBackups","RPO計算","正常系","RPOWorstCaseMoreInfoQueryの生成確認","バックアップギャップが存在","デフォルトパラメータ","クリック可能なXMLクエリがRPOWorstCaseMoreInfoQueryに設定される","中","詳細クエリ生成"
"59","UT-BBK-059","sp_BlitzBackups.sql","sp_BlitzBackups","バックアップ統計","境界値","バックアップ所要時間が0秒の場合","瞬時完了のバックアップ","backup_finish_date = backup_start_date","0除算が回避され、1秒として計算される","高","0除算防止"
"60","UT-BBK-060","sp_BlitzBackups.sql","sp_BlitzBackups","統合テスト","正常系","複数データベースの同時解析","複数DBにバックアップ履歴あり","デフォルトパラメータ","全データベースのバックアップ情報が正しく解析される","高","複数DB対応"
