"No","テストID","対象クラス","対象メソッド","テスト観点","テストケース名","前提条件","入力値","期待結果","優先度","備考"
"1","UT-MCH-001","machine.models.MachineConfig","__str__","正常系","文字列表現でマシン名が返却されること","MachineConfigインスタンスが存在","name=""TestMachine""","TestMachineが返却される","低","表示用メソッド"
"2","UT-MCH-002","machine.models.MachineConfig","save","正常系","新規作成時にレジストリへ追加されること","MachineConfigが新規作成される","name=""NewMachine"", machine_type=""label-printer"", driver=""test-driver""","registry.add_machineが呼ばれる","高","レジストリ連携"
"3","UT-MCH-003","machine.models.MachineConfig","save","正常系","更新時にレジストリ更新フックが呼ばれること","既存MachineConfigが存在","activeをTrueからFalseに変更","registry.update_machineが呼ばれる","高","レジストリ連携"
"4","UT-MCH-004","machine.models.MachineConfig","delete","正常系","削除時にレジストリから削除されること","MachineConfigとmachineインスタンスが存在","MachineConfig.delete()を呼び出し","registry.remove_machineが呼ばれる","高","レジストリ連携"
"5","UT-MCH-005","machine.models.MachineConfig","to_dict","正常系","設定を含むdictが返却されること","MachineConfigとMachineSettingが存在","to_dict()を呼び出し","フィールドとsettingsを含むdictが返却される","中","シリアライズ"
"6","UT-MCH-006","machine.models.MachineConfig","machine","正常系","レジストリからマシンインスタンスが取得できること","MachineConfigがレジストリに登録済み","machineプロパティにアクセス","BaseMachineTypeインスタンスが返却される","中","プロパティ"
"7","UT-MCH-007","machine.models.MachineConfig","machine","異常系","レジストリに未登録の場合Noneが返却されること","MachineConfigがレジストリ未登録","machineプロパティにアクセス","Noneが返却される","中","プロパティ"
"8","UT-MCH-008","machine.models.MachineConfig","errors","正常系","マシンエラー一覧が取得できること","machineインスタンスにエラーが存在","errorsプロパティにアクセス","エラーリストが返却される","中","プロパティ"
"9","UT-MCH-009","machine.models.MachineConfig","errors","異常系","machineがNoneの場合空リストが返却されること","machineインスタンスが存在しない","errorsプロパティにアクセス","空リストが返却される","中","プロパティ"
"10","UT-MCH-010","machine.models.MachineConfig","is_driver_available","正常系","ドライバーが利用可能な場合Trueが返却されること","machineとdriverが存在","is_driver_available()を呼び出し","Trueが返却される","中","ステータス確認"
"11","UT-MCH-011","machine.models.MachineConfig","is_driver_available","異常系","machineがNoneの場合Falseが返却されること","machineが存在しない","is_driver_available()を呼び出し","Falseが返却される","中","ステータス確認"
"12","UT-MCH-012","machine.models.MachineConfig","is_driver_available","異常系","driverがNoneの場合Falseが返却されること","machineは存在するがdriverがない","is_driver_available()を呼び出し","Falseが返却される","中","ステータス確認"
"13","UT-MCH-013","machine.models.MachineConfig","no_errors","正常系","エラーがない場合Trueが返却されること","errorsが空リスト","no_errors()を呼び出し","Trueが返却される","中","ステータス確認"
"14","UT-MCH-014","machine.models.MachineConfig","no_errors","異常系","エラーがある場合Falseが返却されること","errorsに要素が存在","no_errors()を呼び出し","Falseが返却される","中","ステータス確認"
"15","UT-MCH-015","machine.models.MachineConfig","initialized","正常系","初期化済みの場合Trueが返却されること","machineが初期化済み","initialized()を呼び出し","Trueが返却される","中","ステータス確認"
"16","UT-MCH-016","machine.models.MachineConfig","initialized","異常系","未初期化の場合Falseが返却されること","machineが未初期化","initialized()を呼び出し","Falseが返却される","中","ステータス確認"
"17","UT-MCH-017","machine.models.MachineConfig","get_admin_errors","正常系","HTML形式でエラーが表示されること","errorsに複数のエラーが存在","get_admin_errors()を呼び出し","HTMLフォーマットのエラー文字列が返却される","低","管理画面表示"
"18","UT-MCH-018","machine.models.MachineConfig","get_admin_errors","境界値","エラーがない場合「No errors」が表示されること","errorsが空リスト","get_admin_errors()を呼び出し","「No errors」のHTML文字列が返却される","低","管理画面表示"
"19","UT-MCH-019","machine.models.MachineConfig","get_machine_status","正常系","ステータスがHTML形式で表示されること","machineにステータスが設定済み","get_machine_status()を呼び出し","HTMLフォーマットのステータス文字列が返却される","低","管理画面表示"
"20","UT-MCH-020","machine.models.MachineConfig","get_machine_status","異常系","machineがNoneの場合Noneが返却されること","machineが存在しない","get_machine_status()を呼び出し","Noneが返却される","低","管理画面表示"
"21","UT-MCH-021","machine.models.MachineSetting","to_native_value","正常系","ネイティブ値が正しく返却されること","MachineSettingが存在","to_native_value()を呼び出し","設定の実際の値が返却される","中","値変換"
"22","UT-MCH-022","machine.models.MachineSetting","save","正常系","保存時にレジストリ更新が呼ばれること","MachineSettingが存在","MachineSettingを保存","registry.update_machineが呼ばれる","高","レジストリ連携"
"23","UT-MCH-023","machine.models.MachineSetting","get_config_type","正常系","Mを渡すとMACHINEが返却されること","なし","config_type_str=""M""","ConfigType.MACHINEが返却される","中","ヘルパーメソッド"
"24","UT-MCH-024","machine.models.MachineSetting","get_config_type","正常系","Dを渡すとDRIVERが返却されること","なし","config_type_str=""D""","ConfigType.DRIVERが返却される","中","ヘルパーメソッド"
"25","UT-MCH-025","machine.models.MachineSetting","get_setting_definition","正常系","ドライバー設定が取得できること","machine_configとdriverが存在","key=""DRIVER_KEY"", config_type=DRIVER","ドライバー設定定義が返却される","中","設定定義取得"
"26","UT-MCH-026","machine.models.MachineSetting","get_setting_definition","正常系","マシン設定が取得できること","machine_configとmachine_settingsが存在","key=""MACHINE_KEY"", config_type=MACHINE","マシン設定定義が返却される","中","設定定義取得"
"27","UT-MCH-027","machine.models.MachineSetting","Meta.unique_together","制約","同一machine_config, config_type, keyの重複が禁止されること","同一組み合わせのMachineSettingが存在","同一組み合わせで新規作成を試行","IntegrityErrorが発生する","高","データ整合性"
"28","UT-MCH-028","machine.machine_type.BaseDriver","__init__","正常系","ドライバーインスタンスが正しく初期化されること","BaseDriverのサブクラスが定義済み","BaseDriverサブクラスをインスタンス化","インスタンスが生成される","中","初期化"
"29","UT-MCH-029","machine.machine_type.BaseDriver","init_driver","正常系","ドライバー初期化メソッドが呼び出せること","BaseDriverのサブクラスが定義済み","init_driver()を呼び出し","エラーなく完了する","中","初期化"
"30","UT-MCH-030","machine.machine_type.BaseDriver","init_machine","正常系","マシン初期化メソッドが呼び出せること","BaseDriverのサブクラスが定義済み","init_machine(machine)を呼び出し","エラーなく完了する","中","初期化"
"31","UT-MCH-031","machine.machine_type.BaseDriver","update_machine","正常系","マシン更新メソッドが呼び出せること","BaseDriverのサブクラスが定義済み","update_machine(old_state, machine)を呼び出し","エラーなく完了する","中","更新処理"
"32","UT-MCH-032","machine.machine_type.BaseDriver","restart_machine","正常系","マシン再起動メソッドが呼び出せること","BaseDriverのサブクラスが定義済み","restart_machine(machine)を呼び出し","エラーなく完了する","中","再起動処理"
"33","UT-MCH-033","machine.machine_type.BaseDriver","get_machines","正常系","ドライバーを使用するマシン一覧が取得できること","複数のマシンがドライバーを使用","get_machines()を呼び出し","マシンリストが返却される","中","マシン取得"
"34","UT-MCH-034","machine.machine_type.BaseDriver","get_machines","境界値","マシンがない場合空リストが返却されること","ドライバーを使用するマシンがない","get_machines()を呼び出し","空リストが返却される","中","マシン取得"
"35","UT-MCH-035","machine.machine_type.BaseDriver","handle_error","正常系","エラーがエラーリストに追加されること","errorsが空","handle_error(""test error"")を呼び出し","errorsにエラーが追加される","中","エラー処理"
"36","UT-MCH-036","machine.machine_type.BaseDriver","handle_error","境界値","同一エラーが重複追加されないこと","errorsに同一エラーが存在","同一エラーでhandle_error()を呼び出し","errorsの要素数が変わらない","中","エラー処理"
"37","UT-MCH-037","machine.machine_type.BaseDriver","errors","正常系","エラーリストが取得できること","errorsにエラーが存在","errorsプロパティにアクセス","エラーリストが返却される","中","プロパティ"
"38","UT-MCH-038","machine.machine_type.BaseMachineType","__init__","正常系","マシンインスタンスが正しく初期化されること","MachineConfigが存在","BaseMachineTypeサブクラス(machine_config)をインスタンス化","インスタンスが生成される","高","初期化"
"39","UT-MCH-039","machine.machine_type.BaseMachineType","__init__","異常系","ドライバーが見つからない場合エラーが登録されること","存在しないドライバー名のMachineConfig","BaseMachineTypeサブクラス(machine_config)をインスタンス化","errorsにドライバー未発見エラーが追加される","高","初期化エラー"
"40","UT-MCH-040","machine.machine_type.BaseMachineType","__init__","異常系","互換性のないドライバーの場合エラーが登録されること","base_driverと異なるドライバーのMachineConfig","BaseMachineTypeサブクラス(machine_config)をインスタンス化","errorsに互換性エラーが追加される","高","初期化エラー"
"41","UT-MCH-041","machine.machine_type.BaseMachineType","__str__","正常系","マシン名が文字列表現で返却されること","machine_configが存在","str(machine)を呼び出し","マシン名が返却される","低","表示用メソッド"
"42","UT-MCH-042","machine.machine_type.BaseMachineType","__repr__","正常系","Python表現が返却されること","machine_configが存在","repr(machine)を呼び出し","<クラス名: マシン名>形式が返却される","低","表示用メソッド"
"43","UT-MCH-043","machine.machine_type.BaseMachineType","machine_config","正常系","MachineConfigインスタンスが取得できること","データベースにMachineConfigが存在","machine_configプロパティにアクセス","MachineConfigインスタンスが返却される","中","プロパティ"
"44","UT-MCH-044","machine.machine_type.BaseMachineType","name","正常系","マシン名が取得できること","machine_configが存在","nameプロパティにアクセス","マシン名が返却される","中","プロパティ"
"45","UT-MCH-045","machine.machine_type.BaseMachineType","name","異常系","machine_configがNoneの場合Noneが返却されること","machine_configが存在しない","nameプロパティにアクセス","Noneが返却される","中","プロパティ"
"46","UT-MCH-046","machine.machine_type.BaseMachineType","active","正常系","アクティブ状態が取得できること","machine_configが存在しactiveがTrue","activeプロパティにアクセス","Trueが返却される","中","プロパティ"
"47","UT-MCH-047","machine.machine_type.BaseMachineType","active","異常系","machine_configがNoneの場合Falseが返却されること","machine_configが存在しない","activeプロパティにアクセス","Falseが返却される","中","プロパティ"
"48","UT-MCH-048","machine.machine_type.BaseMachineType","initialize","正常系","ドライバーのinit_machineが呼ばれること","driverが存在し設定が完備","initialize()を呼び出し","driver.init_machineが呼ばれinitializedがTrueになる","高","初期化"
"49","UT-MCH-049","machine.machine_type.BaseMachineType","initialize","異常系","ドライバーがNoneの場合処理がスキップされること","driverがNone","initialize()を呼び出し","処理がreturnで終了する","中","初期化"
"50","UT-MCH-050","machine.machine_type.BaseMachineType","initialize","異常系","必須設定が未定義の場合エラーが登録されること","必須設定が未定義","initialize()を呼び出し","errorsにMissing settingsエラーが追加される","高","初期化エラー"
"51","UT-MCH-051","machine.machine_type.BaseMachineType","initialize","異常系","init_machineで例外発生時エラーが登録されること","init_machineが例外をスロー","initialize()を呼び出し","errorsに例外が追加される","高","初期化エラー"
"52","UT-MCH-052","machine.machine_type.BaseMachineType","update","正常系","ドライバーのupdate_machineが呼ばれること","driverが存在","update(old_state)を呼び出し","driver.update_machineが呼ばれる","中","更新処理"
"53","UT-MCH-053","machine.machine_type.BaseMachineType","update","正常系","非アクティブからアクティブになった場合初期化されること","activeがFalseからTrueに変更","update(old_state)を呼び出し","initialize()が呼ばれる","高","状態遷移"
"54","UT-MCH-054","machine.machine_type.BaseMachineType","update","正常系","アクティブから非アクティブになった場合initializedがFalseになること","activeがTrueからFalseに変更","update(old_state)を呼び出し","initializedがFalseになる","高","状態遷移"
"55","UT-MCH-055","machine.machine_type.BaseMachineType","update","異常系","driverがNoneの場合処理がスキップされること","driverがNone","update(old_state)を呼び出し","処理がreturnで終了する","中","更新処理"
"56","UT-MCH-056","machine.machine_type.BaseMachineType","update","異常系","update_machineで例外発生時エラーが登録されること","update_machineが例外をスロー","update(old_state)を呼び出し","errorsに例外が追加される","中","更新エラー"
"57","UT-MCH-057","machine.machine_type.BaseMachineType","restart","正常系","状態がリセットされドライバーのrestart_machineが呼ばれること","driverが存在","restart()を呼び出し","restart_required=False, errors=[], statusがデフォルト, driver.restart_machineが呼ばれる","高","再起動処理"
"58","UT-MCH-058","machine.machine_type.BaseMachineType","restart","異常系","driverがNoneの場合処理がスキップされること","driverがNone","restart()を呼び出し","処理がreturnで終了する","中","再起動処理"
"59","UT-MCH-059","machine.machine_type.BaseMachineType","restart","異常系","restart_machineで例外発生時エラーが登録されること","restart_machineが例外をスロー","restart()を呼び出し","errorsに例外が追加される","中","再起動エラー"
"60","UT-MCH-060","machine.machine_type.BaseMachineType","handle_error","正常系","エラーがエラーリストに追加されること","errorsが空","handle_error(""test error"")を呼び出し","errorsにエラーが追加される","中","エラー処理"
"61","UT-MCH-061","machine.machine_type.BaseMachineType","handle_error","境界値","同一エラーが重複追加されないこと","errorsに同一エラーが存在","同一エラーでhandle_error()を呼び出し","errorsの要素数が変わらない","中","エラー処理"
"62","UT-MCH-062","machine.machine_type.BaseMachineType","reset_errors","正常系","エラーリストが空にリセットされること","errorsにエラーが存在","reset_errors()を呼び出し","errorsが空リストになる","中","エラー処理"
"63","UT-MCH-063","machine.machine_type.BaseMachineType","get_setting","正常系","マシン設定値が取得できること","MachineSettingが存在","get_setting(""KEY"", ""M"")を呼び出し","設定値が返却される","中","設定取得"
"64","UT-MCH-064","machine.machine_type.BaseMachineType","get_setting","正常系","ドライバー設定値が取得できること","MachineSettingが存在","get_setting(""KEY"", ""D"")を呼び出し","設定値が返却される","中","設定取得"
"65","UT-MCH-065","machine.machine_type.BaseMachineType","set_setting","正常系","マシン設定値が保存できること","なし","set_setting(""KEY"", ""M"", ""value"")を呼び出し","設定値が保存される","中","設定保存"
"66","UT-MCH-066","machine.machine_type.BaseMachineType","set_setting","正常系","ドライバー設定値が保存できること","なし","set_setting(""KEY"", ""D"", ""value"")を呼び出し","設定値が保存される","中","設定保存"
"67","UT-MCH-067","machine.machine_type.BaseMachineType","check_settings","正常系","全必須設定が定義済みの場合(True, 空dict)が返却されること","全必須設定が定義済み","check_settings()を呼び出し","(True, {MACHINE: [], DRIVER: []})が返却される","高","設定検証"
"68","UT-MCH-068","machine.machine_type.BaseMachineType","check_settings","異常系","必須設定が未定義の場合(False, 未定義キー)が返却されること","必須設定が未定義","check_settings()を呼び出し","(False, {config_type: [missing_keys]})が返却される","高","設定検証"
"69","UT-MCH-069","machine.machine_type.BaseMachineType","set_status","正常系","ステータスコードが設定されること","なし","set_status(MachineStatus.CONNECTED)を呼び出し","statusがCONNECTEDに設定される","中","ステータス設定"
"70","UT-MCH-070","machine.machine_type.BaseMachineType","set_status_text","正常系","ステータステキストが設定されること","なし","set_status_text(""Processing"")を呼び出し","status_textが""Processing""に設定される","中","ステータス設定"
"71","UT-MCH-071","machine.machine_type.BaseMachineType","set_properties","正常系","プロパティが設定されること","なし","set_properties([{""key"": ""model"", ""value"": ""ABC""}])を呼び出し","propertiesが設定される","中","プロパティ設定"
"72","UT-MCH-072","machine.machine_type.BaseMachineType","set_properties","正常系","typeが未指定の場合strがデフォルト設定されること","なし","set_properties([{""key"": ""k"", ""value"": ""v""}])を呼び出し","type=""str""が設定される","中","プロパティ設定"
"73","UT-MCH-073","machine.machine_type.BaseMachineType","set_properties","正常系","progressタイプでmax_progress未指定の場合100がデフォルト設定されること","なし","set_properties([{""key"": ""k"", ""value"": 50, ""type"": ""progress""}])を呼び出し","max_progress=100が設定される","中","プロパティ設定"
"74","UT-MCH-074","machine.machine_type.BaseMachineType","initialized","正常系","初期化状態が取得・設定できること","なし","initialized = True後にアクセス","Trueが返却される","中","状態プロパティ"
"75","UT-MCH-075","machine.machine_type.BaseMachineType","restart_required","正常系","再起動要求状態が取得・設定できること","なし","restart_required = True後にアクセス","Trueが返却される","中","状態プロパティ"
"76","UT-MCH-076","machine.machine_type.BaseMachineType","errors","正常系","エラーリストが取得できること","errorsにエラーが存在","errorsプロパティにアクセス","エラーリストが返却される","中","状態プロパティ"
"77","UT-MCH-077","machine.machine_type.BaseMachineType","status","正常系","現在のステータスが取得できること","statusが設定済み","statusプロパティにアクセス","MachineStatusインスタンスが返却される","中","状態プロパティ"
"78","UT-MCH-078","machine.machine_type.BaseMachineType","status_text","正常系","ステータステキストが取得できること","status_textが設定済み","status_textプロパティにアクセス","設定された文字列が返却される","中","状態プロパティ"
"79","UT-MCH-079","machine.machine_type.BaseMachineType","properties","正常系","プロパティリストが取得できること","propertiesが設定済み","propertiesプロパティにアクセス","プロパティリストが返却される","中","状態プロパティ"
"80","UT-MCH-080","machine.machine_type.BaseMachineType","properties_dict","正常系","keyをキーとしたdictが取得できること","propertiesが設定済み","properties_dictプロパティにアクセス","{key: MachineProperty}形式のdictが返却される","中","状態プロパティ"
"81","UT-MCH-081","machine.registry.MachineRegistry","__init__","正常系","レジストリが正しく初期化されること","なし","MachineRegistry()をインスタンス化","空のdict/listが初期化される","中","初期化"
"82","UT-MCH-082","machine.registry.MachineRegistry","errors","正常系","エラーリストが取得できること","errorsにエラーが存在","errorsプロパティにアクセス","エラーリストが返却される","中","プロパティ"
"83","UT-MCH-083","machine.registry.MachineRegistry","is_ready","正常系","レジストリ準備状態が取得できること","readyがTrue","is_readyプロパティにアクセス","Trueが返却される","中","プロパティ"
"84","UT-MCH-084","machine.registry.MachineRegistry","handle_error","正常系","エラーがエラーリストに追加されること","errorsが空","handle_error(""test error"")を呼び出し","errorsにエラーが追加される","中","エラー処理"
"85","UT-MCH-085","machine.registry.MachineRegistry","handle_error","境界値","同一エラーが重複追加されないこと","errorsに同一エラーが存在","同一エラーでhandle_error()を呼び出し","errorsの要素数が変わらない","中","エラー処理"
"86","UT-MCH-086","machine.registry.MachineRegistry","initialize","正常系","レジストリが初期化されマシンがロードされること","なし","initialize(main=True)を呼び出し","ready=Trueになりマシンがロードされる","高","初期化"
"87","UT-MCH-087","machine.registry.MachineRegistry","discover_machine_types","正常系","プラグインからマシンタイプが発見されること","Machineミックスインを持つプラグインが存在","discover_machine_types()を呼び出し","machine_typesにタイプが登録される","高","ディスカバリ"
"88","UT-MCH-088","machine.registry.MachineRegistry","discover_machine_types","異常系","無効なマシンタイプがスキップされること","無効なマシンタイプを返すプラグインが存在","discover_machine_types()を呼び出し","無効なタイプがスキップされログ出力される","中","ディスカバリ"
"89","UT-MCH-089","machine.registry.MachineRegistry","discover_machine_types","異常系","重複SLUGのマシンタイプでエラーが登録されること","同一SLUGのマシンタイプが複数存在","discover_machine_types()を呼び出し","errorsにValueErrorが追加される","高","ディスカバリ"
"90","UT-MCH-090","machine.registry.MachineRegistry","discover_drivers","正常系","プラグインからドライバーが発見されること","Machineミックスインを持つプラグインが存在","discover_drivers()を呼び出し","driversにドライバーが登録される","高","ディスカバリ"
"91","UT-MCH-091","machine.registry.MachineRegistry","discover_drivers","異常系","無効なドライバーがスキップされること","無効なドライバーを返すプラグインが存在","discover_drivers()を呼び出し","無効なドライバーがスキップされログ出力される","中","ディスカバリ"
"92","UT-MCH-092","machine.registry.MachineRegistry","discover_drivers","異常系","重複SLUGのドライバーでエラーが登録されること","同一SLUGのドライバーが複数存在","discover_drivers()を呼び出し","errorsにValueErrorが追加される","高","ディスカバリ"
"93","UT-MCH-093","machine.registry.MachineRegistry","get_driver_instance","正常系","ドライバーインスタンスが取得または作成されること","driversにドライバーが登録済み","get_driver_instance(""driver-slug"")を呼び出し","ドライバーインスタンスが返却される","中","インスタンス取得"
"94","UT-MCH-094","machine.registry.MachineRegistry","get_driver_instance","異常系","存在しないドライバーの場合Noneが返却されること","driversにドライバーが未登録","get_driver_instance(""nonexistent"")を呼び出し","Noneが返却される","中","インスタンス取得"
"95","UT-MCH-095","machine.registry.MachineRegistry","load_machines","正常系","データベースから全マシンがロードされること","MachineConfigがデータベースに存在","load_machines(main=True)を呼び出し","machinesにマシンが登録され初期化される","高","マシンロード"
"96","UT-MCH-096","machine.registry.MachineRegistry","load_machines","異常系","データベース未準備の場合警告ログが出力されること","データベースが未準備","load_machines()を呼び出し","警告ログが出力される","中","マシンロード"
"97","UT-MCH-097","machine.registry.MachineRegistry","reload_machines","正常系","レジストリがリセットされマシンが再ロードされること","machinesにマシンが存在","reload_machines()を呼び出し","machines/drivers/driver_instancesが空になり再ロードされる","高","リロード"
"98","UT-MCH-098","machine.registry.MachineRegistry","add_machine","正常系","マシンがレジストリに追加されること","machine_typesにタイプが登録済み","add_machine(machine_config)を呼び出し","machinesにマシンが追加される","高","マシン追加"
"99","UT-MCH-099","machine.registry.MachineRegistry","add_machine","異常系","存在しないマシンタイプの場合エラーが登録されること","machine_typesにタイプが未登録","add_machine(machine_config)を呼び出し","errorsにエラーが追加される","高","マシン追加"
"100","UT-MCH-100","machine.registry.MachineRegistry","update_machine","正常系","マシンの更新フックが呼ばれること","machinesにマシンが存在","update_machine(old_state, machine_config)を呼び出し","machine.update()が呼ばれる","中","マシン更新"
"101","UT-MCH-101","machine.registry.MachineRegistry","restart_machine","正常系","マシンの再起動メソッドが呼ばれること","machinesにマシンが存在","restart_machine(machine)を呼び出し","machine.restart()が呼ばれる","中","マシン再起動"
"102","UT-MCH-102","machine.registry.MachineRegistry","remove_machine","正常系","マシンがレジストリから削除されること","machinesにマシンが存在","remove_machine(machine)を呼び出し","machinesからマシンが削除される","高","マシン削除"
"103","UT-MCH-103","machine.registry.MachineRegistry","get_machines","正常系","フィルター条件に合うマシンリストが返却されること","複数のマシンが存在","get_machines(active=True)を呼び出し","activeなマシンのみ返却される","中","マシン取得"
"104","UT-MCH-104","machine.registry.MachineRegistry","get_machines","正常系","initialized=Noneで全マシンが返却されること","初期化済み・未初期化のマシンが混在","get_machines(initialized=None)を呼び出し","全マシンが返却される","中","マシン取得"
"105","UT-MCH-105","machine.registry.MachineRegistry","get_machines","異常系","無効なフィルターフィールドでValueErrorが発生すること","なし","get_machines(invalid_field=True)を呼び出し","ValueErrorが発生する","中","マシン取得"
"106","UT-MCH-106","machine.registry.MachineRegistry","get_machine_types","正常系","マシンタイプリストが返却されること","machine_typesにタイプが登録済み","get_machine_types()を呼び出し","マシンタイプリストが返却される","中","タイプ取得"
"107","UT-MCH-107","machine.registry.MachineRegistry","get_machine","正常系","pkでマシンが取得できること","machinesにマシンが存在","get_machine(pk)を呼び出し","マシンインスタンスが返却される","中","マシン取得"
"108","UT-MCH-108","machine.registry.MachineRegistry","get_machine","異常系","存在しないpkの場合Noneが返却されること","machinesにマシンが未存在","get_machine(""nonexistent-pk"")を呼び出し","Noneが返却される","中","マシン取得"
"109","UT-MCH-109","machine.registry.MachineRegistry","get_driver_types","正常系","ドライバータイプリストが返却されること","driversにドライバーが登録済み","get_driver_types()を呼び出し","ドライバータイプリストが返却される","中","ドライバー取得"
"110","UT-MCH-110","machine.registry.MachineRegistry","get_driver_types","正常系","machine_typeでフィルターできること","複数タイプのドライバーが存在","get_driver_types(machine_type=""label-printer"")を呼び出し","指定タイプのドライバーのみ返却される","中","ドライバー取得"
"111","UT-MCH-111","machine.registry.MachineRegistry","get_drivers","正常系","ドライバーインスタンスリストが返却されること","driver_instancesにドライバーが存在","get_drivers()を呼び出し","ドライバーインスタンスリストが返却される","中","ドライバー取得"
"112","UT-MCH-112","machine.registry.MachineRegistry","call_machine_function","正常系","マシンのドライバー関数が呼び出されること","マシンとドライバーが存在","call_machine_function(machine_id, ""function_name"")を呼び出し","関数の戻り値が返却される","高","関数呼び出し"
"113","UT-MCH-113","machine.registry.MachineRegistry","call_machine_function","異常系","マシンが存在しない場合AttributeErrorが発生すること","マシンが存在しない","call_machine_function(""invalid-id"", ""func"")を呼び出し","AttributeErrorが発生する","高","関数呼び出し"
"114","UT-MCH-114","machine.registry.MachineRegistry","call_machine_function","異常系","ドライバーがない場合AttributeErrorが発生すること","マシンは存在するがドライバーがない","call_machine_function(machine_id, ""func"")を呼び出し","AttributeErrorが発生する","高","関数呼び出し"
"115","UT-MCH-115","machine.registry.MachineRegistry","call_machine_function","異常系","関数が存在しない場合AttributeErrorが発生すること","マシンとドライバーは存在するが関数がない","call_machine_function(machine_id, ""nonexistent"")を呼び出し","AttributeErrorが発生する","高","関数呼び出し"
"116","UT-MCH-116","machine.registry.MachineRegistry","call_machine_function","正常系","raise_error=Falseの場合エラー時にNoneが返却されること","マシンが存在しない","call_machine_function(""invalid-id"", ""func"", raise_error=False)を呼び出し","Noneが返却される","中","関数呼び出し"
"117","UT-MCH-117","machine.registry.MachineRegistry","_calculate_registry_hash","正常系","レジストリ状態のハッシュが計算されること","machinesにマシンが存在","_calculate_registry_hash()を呼び出し","MD5ハッシュ文字列が返却される","中","ハッシュ計算"
"118","UT-MCH-118","machine.registry.MachineRegistry","_check_reload","正常系","ハッシュ変更時にリロードが実行されること","保存済みハッシュと現在のハッシュが異なる","_check_reload()を呼び出し","reload_machinesが呼ばれTrueが返却される","中","リロードチェック"
"119","UT-MCH-119","machine.registry.MachineRegistry","_update_registry_hash","正常系","レジストリハッシュが保存されること","なし","_update_registry_hash()を呼び出し","グローバル設定にハッシュが保存される","中","ハッシュ更新"
"120","UT-MCH-120","machine.tasks.ping_machines","","正常系","全ドライバーのping_machinesが呼ばれること","MACHINE_PING_ENABLEDがTrue","ping_machines()を呼び出し","各ドライバーのping_machinesが呼ばれる","中","定期タスク"
"121","UT-MCH-121","machine.tasks.ping_machines","","異常系","MACHINE_PING_ENABLEDがFalseの場合処理がスキップされること","MACHINE_PING_ENABLEDがFalse","ping_machines()を呼び出し","何も実行されずreturnする","中","定期タスク"
"122","UT-MCH-122","machine.machine_types.label_printer.LabelPrinterBaseDriver","print_label","正常系","ラベル印刷メソッドが呼び出せること","LabelPrinterBaseDriverのサブクラス","print_label(machine, label, item)を呼び出し","エラーなく完了する","高","印刷処理"
"123","UT-MCH-123","machine.machine_types.label_printer.LabelPrinterBaseDriver","print_labels","正常系","複数アイテムに対してprint_labelが呼ばれること","LabelPrinterBaseDriverのサブクラス","print_labels(machine, label, items)を呼び出し","各アイテムに対してprint_labelが呼ばれる","高","印刷処理"
"124","UT-MCH-124","machine.machine_types.label_printer.LabelPrinterBaseDriver","get_printers","正常系","ドライバーを使用するプリンターリストが返却されること","複数のLabelPrinterMachineが存在","get_printers(label, items)を呼び出し","LabelPrinterMachineリストが返却される","中","プリンター取得"
"125","UT-MCH-125","machine.machine_types.label_printer.LabelPrinterBaseDriver","get_printing_options_serializer","正常系","PrintingOptionsSerializerインスタンスが返却されること","なし","get_printing_options_serializer(request)を呼び出し","PrintingOptionsSerializerインスタンスが返却される","中","シリアライザ取得"
"126","UT-MCH-126","machine.machine_types.label_printer.LabelPrinterBaseDriver","machine_plugin","正常系","ラベル印刷プラグインが取得できること","inventreelabelmachineプラグインが登録済み","machine_pluginプロパティにアクセス","LabelPrintingMixinインスタンスが返却される","中","プロパティ"
"127","UT-MCH-127","machine.machine_types.label_printer.LabelPrinterBaseDriver","render_to_pdf","正常系","PDF形式でラベルがレンダリングされること","ラベルテンプレートとアイテムが存在","render_to_pdf(label, item)を呼び出し","HttpResponseが返却される","中","レンダリング"
"128","UT-MCH-128","machine.machine_types.label_printer.LabelPrinterBaseDriver","render_to_html","正常系","HTML形式でラベルがレンダリングされること","ラベルテンプレートとアイテムが存在","render_to_html(label, item)を呼び出し","HTML文字列が返却される","中","レンダリング"
"129","UT-MCH-129","machine.machine_types.label_printer.LabelPrinterBaseDriver","render_to_png","正常系","PNG形式でラベルがレンダリングされること","ラベルテンプレートとアイテムが存在","render_to_png(label, item)を呼び出し","PIL Imageオブジェクトが返却される","中","レンダリング"
"130","UT-MCH-130","machine.machine_types.label_printer.LabelPrinterMachine","__init__","正常系","LabelPrinterMachineが正しく初期化されること","MachineConfigが存在","LabelPrinterMachine(machine_config)をインスタンス化","インスタンスが生成されMACHINE_SETTINGSが設定される","高","初期化"
"131","UT-MCH-131","machine.machine_types.label_printer.LabelPrinterMachine","location","正常系","設定されたStockLocationが取得できること","LOCATION設定が存在","locationプロパティにアクセス","StockLocationインスタンスが返却される","中","プロパティ"
"132","UT-MCH-132","machine.machine_types.label_printer.LabelPrinterMachine","location","境界値","LOCATION未設定の場合Noneが返却されること","LOCATION設定が未設定","locationプロパティにアクセス","Noneが返却される","中","プロパティ"
"133","UT-MCH-133","machine.machine_types.label_printer.LabelPrinterStatus","Enum値","正常系","CONNECTEDが100であること","なし","LabelPrinterStatus.CONNECTED.valueを確認","100が返却される","低","Enum定義"
"134","UT-MCH-134","machine.machine_types.label_printer.LabelPrinterStatus","Enum値","正常系","UNKNOWNが101であること","なし","LabelPrinterStatus.UNKNOWN.valueを確認","101が返却される","低","Enum定義"
"135","UT-MCH-135","machine.machine_types.label_printer.LabelPrinterStatus","Enum値","正常系","PRINTINGが110であること","なし","LabelPrinterStatus.PRINTING.valueを確認","110が返却される","低","Enum定義"
"136","UT-MCH-136","machine.machine_types.label_printer.LabelPrinterStatus","Enum値","正常系","DISCONNECTEDが400であること","なし","LabelPrinterStatus.DISCONNECTED.valueを確認","400が返却される","低","Enum定義"
"137","UT-MCH-137","machine.machine_types.label_printer.LabelPrinterStatus","Enum値","正常系","ERRORが500であること","なし","LabelPrinterStatus.ERROR.valueを確認","500が返却される","低","Enum定義"
"138","UT-MCH-138","machine.serializers.MachineConfigSerializer","get_initialized","正常系","マシンの初期化状態が返却されること","machineが初期化済み","get_initialized(obj)を呼び出し","Trueが返却される","中","シリアライザ"
"139","UT-MCH-139","machine.serializers.MachineConfigSerializer","get_status","正常系","マシンステータスコードが返却されること","machineにステータスが設定済み","get_status(obj)を呼び出し","ステータスコード(int)が返却される","中","シリアライザ"
"140","UT-MCH-140","machine.serializers.MachineConfigSerializer","get_status","異常系","machineがNoneの場合-1が返却されること","machineが存在しない","get_status(obj)を呼び出し","-1が返却される","中","シリアライザ"
"141","UT-MCH-141","machine.serializers.MachineConfigSerializer","get_status_model","正常系","ステータスモデル名が返却されること","machineにMACHINE_STATUSが設定済み","get_status_model(obj)を呼び出し","ステータスクラス名(str)が返却される","中","シリアライザ"
"142","UT-MCH-142","machine.serializers.MachineConfigSerializer","get_status_text","正常系","ステータステキストが返却されること","machineにstatus_textが設定済み","get_status_text(obj)を呼び出し","ステータステキストが返却される","中","シリアライザ"
"143","UT-MCH-143","machine.serializers.MachineConfigSerializer","get_errors","正常系","エラーリストが文字列リストで返却されること","errorsにエラーが存在","get_errors(obj)を呼び出し","文字列リストが返却される","中","シリアライザ"
"144","UT-MCH-144","machine.serializers.MachineConfigSerializer","get_is_driver_available","正常系","ドライバー利用可否が返却されること","machineとdriverが存在","get_is_driver_available(obj)を呼び出し","Trueが返却される","中","シリアライザ"
"145","UT-MCH-145","machine.serializers.MachineConfigSerializer","get_restart_required","正常系","再起動要求状態が返却されること","machineにrestart_required=True","get_restart_required(obj)を呼び出し","Trueが返却される","中","シリアライザ"
"146","UT-MCH-146","machine.serializers.MachineDriverSerializer","get_errors","正常系","ドライバーエラーが文字列リストで返却されること","driver_instanceにエラーが存在","get_errors(obj)を呼び出し","文字列リストが返却される","中","シリアライザ"
"147","UT-MCH-147","machine.serializers.MachineDriverSerializer","get_errors","境界値","driver_instanceがNoneの場合空リストが返却されること","driver_instanceが存在しない","get_errors(obj)を呼び出し","空リストが返却される","中","シリアライザ"
"148","UT-MCH-148","machine.serializers.BaseMachineClassSerializer","get_provider_file","正常系","クラス定義ファイルパスが返却されること","BaseMachineTypeサブクラス","get_provider_file(obj)を呼び出し","ファイルパス文字列が返却される","低","シリアライザ"
"149","UT-MCH-149","machine.serializers.BaseMachineClassSerializer","get_provider_plugin","正常系","プラグイン情報dictが返却されること","プラグインがクラスを提供","get_provider_plugin(obj)を呼び出し","{slug, name, pk}のdictが返却される","低","シリアライザ"
"150","UT-MCH-150","machine.serializers.BaseMachineClassSerializer","get_provider_plugin","境界値","プラグインがない場合Noneが返却されること","ビルトインクラス","get_provider_plugin(obj)を呼び出し","Noneが返却される","低","シリアライザ"
"151","UT-MCH-151","machine.serializers.BaseMachineClassSerializer","get_is_builtin","正常系","ビルトインフラグが返却されること","ビルトインクラス","get_is_builtin(obj)を呼び出し","Trueが返却される","低","シリアライザ"
"152","UT-MCH-152","machine.api.get_machine","","正常系","レジストリからマシンが取得できること","machineがレジストリに存在","get_machine(pk)を呼び出し","BaseMachineTypeインスタンスが返却される","中","API関数"
"153","UT-MCH-153","machine.api.get_machine","","異常系","マシンが存在しない場合NotFoundが発生すること","machineがレジストリに未存在","get_machine(""invalid-pk"")を呼び出し","NotFound例外が発生する","中","API関数"
"154","UT-MCH-154","machine.api.MachineList","get","正常系","マシン一覧が返却されること","MachineConfigが複数存在","GET /api/machine/","マシン一覧がJSON形式で返却される","中","APIエンドポイント"
"155","UT-MCH-155","machine.api.MachineList","post","正常系","新規マシンが作成されること","有効なパラメータ","POST /api/machine/ {name, machine_type, driver}","201とマシン情報が返却される","高","APIエンドポイント"
"156","UT-MCH-156","machine.api.MachineDetail","get","正常系","マシン詳細が返却されること","MachineConfigが存在","GET /api/machine/{pk}/","マシン詳細がJSON形式で返却される","中","APIエンドポイント"
"157","UT-MCH-157","machine.api.MachineDetail","put","正常系","マシンが更新されること","MachineConfigが存在","PUT /api/machine/{pk}/ {name, active}","200と更新後のマシン情報が返却される","中","APIエンドポイント"
"158","UT-MCH-158","machine.api.MachineDetail","delete","正常系","マシンが削除されること","MachineConfigが存在","DELETE /api/machine/{pk}/","204が返却される","高","APIエンドポイント"
"159","UT-MCH-159","machine.api.MachineSettingList","get","正常系","マシン設定一覧が返却されること","MachineSettingが存在","GET /api/machine/{pk}/settings/","設定一覧がJSON形式で返却される","中","APIエンドポイント"
"160","UT-MCH-160","machine.api.MachineSettingDetail","get","正常系","マシン設定詳細が返却されること","MachineSettingが存在","GET /api/machine/{pk}/settings/{config_type}/{key}/","設定詳細がJSON形式で返却される","中","APIエンドポイント"
"161","UT-MCH-161","machine.api.MachineSettingDetail","get","異常系","存在しない設定の場合NotFoundが発生すること","設定が未定義","GET /api/machine/{pk}/settings/M/NONEXISTENT/","NotFound例外が発生する","中","APIエンドポイント"
"162","UT-MCH-162","machine.api.MachineRestart","post","正常系","マシン再起動が実行されること","マシンが存在","POST /api/machine/{pk}/restart/","{ok: true}が返却される","高","APIエンドポイント"
"163","UT-MCH-163","machine.api.MachineTypesList","get","正常系","マシンタイプ一覧が返却されること","マシンタイプが登録済み","GET /api/machine/types/","タイプ一覧がJSON形式で返却される","中","APIエンドポイント"
"164","UT-MCH-164","machine.api.MachineDriverList","get","正常系","ドライバー一覧が返却されること","ドライバーが登録済み","GET /api/machine/drivers/","ドライバー一覧がJSON形式で返却される","中","APIエンドポイント"
"165","UT-MCH-165","machine.api.MachineDriverList","get","正常系","machine_typeでフィルターできること","複数タイプのドライバーが存在","GET /api/machine/drivers/?machine_type=label-printer","指定タイプのドライバーのみ返却される","中","APIエンドポイント"
"166","UT-MCH-166","machine.api.RegistryStatusView","get","正常系","レジストリステータスが返却されること","なし","GET /api/machine/status/","{registry_errors: [...]}が返却される","中","APIエンドポイント"
