Verification ============ This section documents the test cases and their traceability to requirements. It is automatically generated from the source code. .. test:: test_01_root_endpoint :id: TEST_test_01_root_endpoint :status: verified :verifies: REQ_INTEROP_010 Test GET / returns server capabilities and entry points. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_01_root_endpoint``) .. test:: test_01b_version_info_endpoint :id: TEST_test_01b_version_info_endpoint :status: verified :verifies: REQ_INTEROP_001 Test GET /version-info returns gateway status and version. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_01b_version_info_endpoint``) .. test:: test_02_list_areas :id: TEST_test_02_list_areas :status: verified :verifies: REQ_INTEROP_003 Test GET /areas returns all discovered areas. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_02_list_areas``) .. test:: test_03_list_components :id: TEST_test_03_list_components :status: verified :verifies: REQ_INTEROP_003 Test GET /components returns all discovered components. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_03_list_components``) .. test:: test_04_automotive_areas_discovery :id: TEST_test_04_automotive_areas_discovery :status: verified :verifies: REQ_INTEROP_003 Test that automotive areas are properly discovered. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_04_automotive_areas_discovery``) .. test:: test_05_area_components_success :id: TEST_test_05_area_components_success :status: verified :verifies: REQ_INTEROP_006 Test GET /areas/{area_id}/components returns components for valid area. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_05_area_components_success``) .. test:: test_06_area_components_nonexistent_error :id: TEST_test_06_area_components_nonexistent_error :status: verified :verifies: REQ_INTEROP_006 Test GET /areas/{area_id}/components returns 404 for nonexistent area. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_06_area_components_nonexistent_error``) .. test:: test_07_component_data_powertrain_engine :id: TEST_test_07_component_data_powertrain_engine :status: verified :verifies: REQ_INTEROP_018 Test GET /components/{component_id}/data for engine component. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_07_component_data_powertrain_engine``) .. test:: test_08_component_data_chassis_brakes :id: TEST_test_08_component_data_chassis_brakes :status: verified :verifies: REQ_INTEROP_018 Test GET /components/{component_id}/data for brakes component. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_08_component_data_chassis_brakes``) .. test:: test_09_component_data_body_door :id: TEST_test_09_component_data_body_door :status: verified :verifies: REQ_INTEROP_018 Test GET /components/{component_id}/data for door component. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_09_component_data_body_door``) .. test:: test_10_component_data_structure :id: TEST_test_10_component_data_structure :status: verified :verifies: REQ_INTEROP_018 Test GET /components/{component_id}/data response structure. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_10_component_data_structure``) .. test:: test_11_component_nonexistent_error :id: TEST_test_11_component_nonexistent_error :status: verified :verifies: REQ_INTEROP_018 Test GET /components/{component_id}/data returns 404 for nonexistent component. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_11_component_nonexistent_error``) .. test:: test_12_component_no_topics :id: TEST_test_12_component_no_topics :status: verified :verifies: REQ_INTEROP_018 Test GET /components/{component_id}/data returns empty array. Verifies that components with no topics return an empty array. The calibration component typically has only services, no topics. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_12_component_no_topics``) .. test:: test_13_invalid_component_id_special_chars :id: TEST_test_13_invalid_component_id_special_chars :status: verified :verifies: REQ_INTEROP_018 Test GET /components/{component_id}/data rejects special characters. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_13_invalid_component_id_special_chars``) .. test:: test_14_invalid_area_id_special_chars :id: TEST_test_14_invalid_area_id_special_chars :status: verified :verifies: REQ_INTEROP_006 Test GET /areas/{area_id}/components rejects special characters. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_14_invalid_area_id_special_chars``) .. test:: test_15_valid_ids_with_underscores :id: TEST_test_15_valid_ids_with_underscores :status: verified :verifies: REQ_INTEROP_018 Test that valid IDs with underscores are accepted (ROS 2 naming). **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_15_valid_ids_with_underscores``) .. test:: test_16_invalid_ids_with_hyphens :id: TEST_test_16_invalid_ids_with_hyphens :status: verified :verifies: REQ_INTEROP_018 Test that IDs with hyphens are rejected (not allowed in ROS 2 names). **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_16_invalid_ids_with_hyphens``) .. test:: test_17_component_topic_temperature :id: TEST_test_17_component_topic_temperature :status: verified :verifies: REQ_INTEROP_019 Test GET /components/{component_id}/data/{topic_name} for temperature topic. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_17_component_topic_temperature``) .. test:: test_18_component_topic_rpm :id: TEST_test_18_component_topic_rpm :status: verified :verifies: REQ_INTEROP_019 Test GET /components/{component_id}/data/{topic_name} for RPM topic. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_18_component_topic_rpm``) .. test:: test_19_component_topic_pressure :id: TEST_test_19_component_topic_pressure :status: verified :verifies: REQ_INTEROP_019 Test GET /components/{component_id}/data/{topic_name} for pressure topic. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_19_component_topic_pressure``) .. test:: test_20_component_topic_data_structure :id: TEST_test_20_component_topic_data_structure :status: verified :verifies: REQ_INTEROP_019 Test GET /components/{component_id}/data/{topic_name} response structure. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_20_component_topic_data_structure``) .. test:: test_21_component_nonexistent_topic_error :id: TEST_test_21_component_nonexistent_topic_error :status: verified :verifies: REQ_INTEROP_019 Test GET /components/{component_id}/data/{topic_name} returns 404 for nonexistent topic. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_21_component_nonexistent_topic_error``) .. test:: test_22_component_topic_nonexistent_component_error :id: TEST_test_22_component_topic_nonexistent_component_error :status: verified :verifies: REQ_INTEROP_019 Test GET endpoint returns 404 for nonexistent component. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_22_component_topic_nonexistent_component_error``) .. test:: test_23_component_topic_with_slashes :id: TEST_test_23_component_topic_with_slashes :status: verified :verifies: REQ_INTEROP_019 Test GET with percent-encoded slashes in topic path. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_23_component_topic_with_slashes``) .. test:: test_24_component_topic_valid_names :id: TEST_test_24_component_topic_valid_names :status: verified :verifies: REQ_INTEROP_019 Test that valid topic names work correctly. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_24_component_topic_valid_names``) .. test:: test_25_publish_brake_command :id: TEST_test_25_publish_brake_command :status: verified :verifies: REQ_INTEROP_020 Test PUT /components/{component_id}/data/{topic_name} publishes data. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_25_publish_brake_command``) .. test:: test_26_publish_validation_missing_type :id: TEST_test_26_publish_validation_missing_type :status: verified :verifies: REQ_INTEROP_020 Test PUT /components/{component_id}/data/{topic_name} returns 400 when type missing. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_26_publish_validation_missing_type``) .. test:: test_27_publish_validation_missing_data :id: TEST_test_27_publish_validation_missing_data :status: verified :verifies: REQ_INTEROP_020 Test PUT /components/{component_id}/data/{topic_name} returns 400 when data missing. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_27_publish_validation_missing_data``) .. test:: test_28_publish_validation_invalid_type_format :id: TEST_test_28_publish_validation_invalid_type_format :status: verified :verifies: REQ_INTEROP_020 Test PUT /components/{component_id}/data/{topic_name} returns 400 for invalid type. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_28_publish_validation_invalid_type_format``) .. test:: test_29_publish_nonexistent_component :id: TEST_test_29_publish_nonexistent_component :status: verified :verifies: REQ_INTEROP_020 Test PUT /components/{component_id}/data/{topic_name} returns 404 for unknown component. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_29_publish_nonexistent_component``) .. test:: test_30_publish_invalid_json_body :id: TEST_test_30_publish_invalid_json_body :status: verified :verifies: REQ_INTEROP_020 Test PUT /components/{component_id}/data/{topic_name} returns 400 for invalid JSON. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_30_publish_invalid_json_body``) .. test:: test_31_operation_call_calibrate_service :id: TEST_test_31_operation_call_calibrate_service :status: verified :verifies: REQ_INTEROP_035 Test POST /components/{component_id}/operations/{operation_name} calls a service. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_31_operation_call_calibrate_service``) .. test:: test_32_operation_call_nonexistent_operation :id: TEST_test_32_operation_call_nonexistent_operation :status: verified :verifies: REQ_INTEROP_035 Test operation call returns 404 for unknown operation. POST /components/{component_id}/operations/{operation_name} **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_32_operation_call_nonexistent_operation``) .. test:: test_33_operation_call_nonexistent_component :id: TEST_test_33_operation_call_nonexistent_component :status: verified :verifies: REQ_INTEROP_035 Test operation call returns 404 for unknown component. POST /components/{component_id}/operations/{operation_name} **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_33_operation_call_nonexistent_component``) .. test:: test_34_operation_call_invalid_component_id :id: TEST_test_34_operation_call_invalid_component_id :status: verified :verifies: REQ_INTEROP_035 Test operation call rejects invalid component ID. POST /components/{component_id}/operations/{operation_name} **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_34_operation_call_invalid_component_id``) .. test:: test_35_operation_call_invalid_operation_name :id: TEST_test_35_operation_call_invalid_operation_name :status: verified :verifies: REQ_INTEROP_021 Test operation call rejects invalid operation name. POST /components/{component_id}/operations/{operation_name} **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_35_operation_call_invalid_operation_name``) .. test:: test_36_operation_call_with_invalid_json :id: TEST_test_36_operation_call_with_invalid_json :status: verified :verifies: REQ_INTEROP_021 Test operation call returns 400 for invalid JSON body. POST /components/{component_id}/operations/{operation_name} **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_36_operation_call_with_invalid_json``) .. test:: test_37_operations_listed_in_component_discovery :id: TEST_test_37_operations_listed_in_component_discovery :status: verified :verifies: REQ_INTEROP_021 Test that operations (services) are listed in component discovery response. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_37_operations_listed_in_component_discovery``) .. test:: test_38_root_endpoint_includes_operations :id: TEST_test_38_root_endpoint_includes_operations :status: verified :verifies: REQ_INTEROP_021 Test that root endpoint lists operations endpoint and capability. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_38_root_endpoint_includes_operations``) .. test:: test_39_action_send_goal_and_get_id :id: TEST_test_39_action_send_goal_and_get_id :status: verified :verifies: REQ_INTEROP_022 Test POST /components/{component_id}/operations/{operation_name} sends action goal. Sends a goal to the long_calibration action and verifies goal_id is returned. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_39_action_send_goal_and_get_id``) .. test:: test_40_action_status_endpoint :id: TEST_test_40_action_status_endpoint :status: verified :verifies: REQ_INTEROP_022 Test GET /components/{component_id}/operations/{operation_name}/status returns goal status. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_40_action_status_endpoint``) .. test:: test_41_action_status_after_completion :id: TEST_test_41_action_status_after_completion :status: verified :verifies: REQ_INTEROP_022 Test that action status is updated to succeeded after completion via native subscription. The native status subscription updates goal status in real-time. After an action completes, polling the status endpoint should show 'succeeded'. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_41_action_status_after_completion``) .. test:: test_42_action_cancel_endpoint :id: TEST_test_42_action_cancel_endpoint :status: verified :verifies: REQ_INTEROP_022 Test DELETE /components/{component_id}/operations/{operation_name} cancels action. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_42_action_cancel_endpoint``) .. test:: test_43_action_listed_in_component_discovery :id: TEST_test_43_action_listed_in_component_discovery :status: verified :verifies: REQ_INTEROP_022 Test that actions are listed in component discovery response. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_43_action_listed_in_component_discovery``) .. test:: test_44_action_status_without_goal_id_returns_latest :id: TEST_test_44_action_status_without_goal_id_returns_latest :status: verified :verifies: REQ_INTEROP_022 Test action status without goal_id returns latest goal. GET /components/{component_id}/operations/{operation_name}/status Returns the most recent goal status when no goal_id is provided. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_44_action_status_without_goal_id_returns_latest``) .. test:: test_45_list_configurations :id: TEST_test_45_list_configurations :status: verified :verifies: REQ_INTEROP_023 Test GET /components/{component_id}/configurations lists all parameters. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_45_list_configurations``) .. test:: test_46_get_configuration :id: TEST_test_46_get_configuration :status: verified :verifies: REQ_INTEROP_023 Test GET /components/{component_id}/configurations/{param_name} gets parameter. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_46_get_configuration``) .. test:: test_47_set_configuration :id: TEST_test_47_set_configuration :status: verified :verifies: REQ_INTEROP_024 Test PUT /components/{component_id}/configurations/{param_name} sets parameter. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_47_set_configuration``) .. test:: test_48_delete_configuration_resets_to_default :id: TEST_test_48_delete_configuration_resets_to_default :status: verified :verifies: REQ_INTEROP_025 Test DELETE /components/{component_id}/configurations/{param_name} resets to default. The DELETE method resets the parameter to its default value. It first changes the value, then resets it, then verifies the reset. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_48_delete_configuration_resets_to_default``) .. test:: test_49_configurations_nonexistent_component :id: TEST_test_49_configurations_nonexistent_component :status: verified :verifies: REQ_INTEROP_023 Test GET /components/{component_id}/configurations returns 404 for unknown component. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_49_configurations_nonexistent_component``) .. test:: test_50_configuration_nonexistent_parameter :id: TEST_test_50_configuration_nonexistent_parameter :status: verified :verifies: REQ_INTEROP_023 Test GET configurations/{param_name} returns 404 for unknown param. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_50_configuration_nonexistent_parameter``) .. test:: test_51_set_configuration_missing_value :id: TEST_test_51_set_configuration_missing_value :status: verified :verifies: REQ_INTEROP_024 Test PUT configurations/{param_name} returns 400 when value missing. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_51_set_configuration_missing_value``) .. test:: test_52_root_endpoint_includes_configurations :id: TEST_test_52_root_endpoint_includes_configurations :status: verified :verifies: REQ_INTEROP_023 Test that root endpoint lists configurations endpoints and capability. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_52_root_endpoint_includes_configurations``) .. test:: test_53_service_operation_has_type_info_schema :id: TEST_test_53_service_operation_has_type_info_schema :status: verified :verifies: REQ_INTEROP_025 Test that service operations include type_info with request/response schemas. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_53_service_operation_has_type_info_schema``) .. test:: test_54_action_operation_has_type_info_schema :id: TEST_test_54_action_operation_has_type_info_schema :status: verified :verifies: REQ_INTEROP_025 Test that action operations include type_info with goal/result/feedback schemas. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_54_action_operation_has_type_info_schema``) .. test:: test_55_root_endpoint_includes_faults :id: TEST_test_55_root_endpoint_includes_faults :status: verified :verifies: REQ_INTEROP_012 Test that root endpoint lists faults endpoints and capability. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_55_root_endpoint_includes_faults``) .. test:: test_56_list_faults_response_structure :id: TEST_test_56_list_faults_response_structure :status: verified :verifies: REQ_INTEROP_012 Test GET /components/{component_id}/faults returns valid response structure. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_56_list_faults_response_structure``) .. test:: test_57_faults_nonexistent_component :id: TEST_test_57_faults_nonexistent_component :status: verified :verifies: REQ_INTEROP_012 Test GET /components/{component_id}/faults returns 404 for unknown component. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_57_faults_nonexistent_component``) .. test:: test_58_get_nonexistent_fault :id: TEST_test_58_get_nonexistent_fault :status: verified :verifies: REQ_INTEROP_013 Test GET /components/{component_id}/faults/{fault_code} returns 404. **Implementation:** ``src/ros2_medkit_gateway/test/test_integration.test.py`` (Test: ``test_58_get_nonexistent_fault``) .. test:: test_list_areas_endpoint :id: TEST_test_list_areas_endpoint :status: verified :verifies: REQ_INTEROP_003 **Implementation:** ``src/ros2_medkit_gateway/test/test_gateway_node.cpp`` (Test: ``test_list_areas_endpoint``) .. test:: test_list_components_endpoint :id: TEST_test_list_components_endpoint :status: verified :verifies: REQ_INTEROP_003 **Implementation:** ``src/ros2_medkit_gateway/test/test_gateway_node.cpp`` (Test: ``test_list_components_endpoint``) .. test:: test_root_endpoint :id: TEST_test_root_endpoint :status: verified :verifies: REQ_INTEROP_010 **Implementation:** ``src/ros2_medkit_gateway/test/test_gateway_node.cpp`` (Test: ``test_root_endpoint``) .. test:: test_version_info_endpoint :id: TEST_test_version_info_endpoint :status: verified :verifies: REQ_INTEROP_001 **Implementation:** ``src/ros2_medkit_gateway/test/test_gateway_node.cpp`` (Test: ``test_version_info_endpoint``) .. needtable:: :filter: type == 'test' :columns: id, title, status, verifies :style: table