6 STOMP Test Cases
6.1 Support of Required Profiles
Purpose
The purpose of this test is to ensure the EUT supports the required STOMP profiles.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Setup
- Ensure that the EUT and test equipment have the necessary information to send and receive USP records to each other.
Test Procedure
Send a GetSupportedDM message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET_SUPPORTED_DM } body { request { get_supported_dm { obj_paths: 'Device.STOMP.' obj_paths: 'Device.LocalAgent.' return_params: true first_level_only: false } } }
Wait for the GetSupportedDMResponse.
Test Metrics
- The EUT sends a GetSupportedDMResponse.
- The GetSupportedDMResponse from the EUT contains the following parameters: * Device.LocalAgent.Controller.{i}.MTP.{i}.STOMP.Reference * Device.LocalAgent.Controller.{i}.MTP.{i}.STOMP.Destination * Device.STOMP.ConnectionNumberOfEntries * Device.STOMP.Connection.{i}.Alias * Device.STOMP.Connection.{i}.Enable * Device.STOMP.Connection.{i}.Status * Device.STOMP.Connection.{i}.Host * Device.STOMP.Connection.{i}.Port * Device.STOMP.Connection.{i}.VirtualHost * Device.STOMP.Connection.{i}.ServerRetryInitialInterval * Device.STOMP.Connection.{i}.ServerRetryIntervalMultiplier * Device.STOMP.Connection.{i}.ServerRetryMaxInterval
6.2 STOMP session establishment
Purpose
The purpose of this test is to ensure the EUT can properly start a STOMP session.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Setup
- Ensure that the EUT is configured to use a STOMP server that exists in the test environment.
Test Procedure
- Reboot the EUT.
- Wait for the EUT to reconnect to the STOMP server and subscribe to a destination.
Test Metrics
- The EUT sends a STOMP frame to the STOMP server to initiate the STOMP session.
6.3 STOMP Connection Retry
Purpose
The purpose of this test is to ensure the EUT properly enters a retry state when it fails to connect to the STOMP server.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Setup
- Ensure that the EUT is configured to use a STOMP server that exists in the test environment.
Test Procedure
Send a Get message to the EUT with the following structure
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.STOMP.Connection.' } } }
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.Reboot()' } } }
Disable the STOMP server.
Allow the EUT to attempt to start a STOMP session with the STOMP server.
Reenable the STOMP server after the EUT fails to connect to the STOMP server twice.
Test Metrics
- The EUT retries connecting to the STOMP server within the
ServerRetryInitialInterval
of the connection instance. - The EUT retries a second time in accordance with
ServerRetryInitialInterval
andServerRetryIntervalMultiplier
.
6.4 Successful USP message over STOMP with required headers
Purpose
The purpose of this test is to ensure the EUT can communicate over STOMP using the correct headers.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Setup
- Ensure that the EUT is configured to use a STOMP server that exists in the test environment.
Test Procedure
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo.' } } }
Allow the EUT to send a GetResponse.
Test Metrics
- In the STOMP frame transporting the GetResponse the
content-length
header is present and contains the length of the included body of the message. - In the STOMP frame transporting the GetResponse the
content-type
header is present and containsapplication/vnd.bbf.usp.msg
. - In the STOMP frame transporting the GetResponse the
reply-to-dest
header is present and contains the STOMP destination of the EUT.
6.5 STOMP destination - provided in subscribe-dest
Purpose
The purpose of this test is to ensure the EUT correct subscribe to a
destination found in the subscribe-dest
header in a
CONNECTED frame.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Setup
- Ensure the EUT is configured to use a STOMP server that is part of the test environment.
Test Procedure
Configure the STOMP server to send an unused destination via the
subscribe-dest
header in the CONNECTED frames.Reboot the EUT.
Allow the EUT to reconnect to the STOMP server.
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.LocalAgent.' } } }
Allow the EUT to respond to the Get message.
Test Metrics
- The EUT subscribes to the destination configured in step 1.
- The STOMP frame containing the GetResponse has a
reply-to-dest
header which matches the destination configured in step 1.
6.6 STOMP destination - configured in USP data model
Purpose
The purpose of this test is to ensure the EUT can use the
Device.LocalAgent.MTP.{i}.STOMP.Destination
parameter to
select a STOMP destination.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Steps
- Ensure the EUT is configured to use a STOMP server that is part of the test environment.
Test Procedure
Send a Set message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: SET } body { request { set { update_objs { obj_path: 'Device.LocalAgent.MTP.<active MTP instance>.STOMP.' param_settings { param: 'Destination' value: '<new unused destination>' } } } } }
Reboot the EUT.
Wait for the EUT to reconnect to the STOMP server.
Allow the STOMP server to send a CONNECTED frame that does NOT include the subscribe-dest field.
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo.' } } }
Wait for a GetResponse from the EUT.
Test Metrics
- The EUT subscribes to the destination configured in step 1.
- The STOMP frame containing the GetResponse has a
reply-to-dest
header which contains the STOMP destination configured in step 1.
6.7 STOMP Destination - terminates unconfigured session
Purpose
The purpose of this test is to ensure the EUT terminates a STOMP session when no destination id configured.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Setup
- The EUT is configured to use a STOMP server which exists in the test environment.
- Configure the STOMP server to not provide a
subscribe-dest
header in the CONNECTED frame.
Test Procedure
Send a Set message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: SET } body { request { set { update_objs { obj_path: 'Device.LocalAgent.MTP.<active MTP instance>.STOMP.' param_settings { param: 'Destination' value: '' } } } } }
Reboot the EUT.
Wait for the EUT to attempt to reconnect to the STOMP server.
Test Metrics
- The EUT terminates the STOMP session after the STOMP server sends a CONNECTION to the EUT.
6.8 Use of STOMP heartbeat mechanism
Purpose
The purpose of this test is to ensure the EUT can correctly implements the STOMP heartbeat mechanism and the relevant parameters in the data model.
Functionality Tags
Conditional Mandatory (supports STOMPHeartbeat:1 profile)
Test Setup
- The EUT is configured to use a STOMP server which exists in the test environment.
- Ensure the STOMP server supports heartbeats.
Test Procedure
Send a Set message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: SET } body { request { set { update_objs { obj_path: 'Device.STOMP.Connection.<STOMP server in use>.' param_settings { param: 'EnableHeartbeats' value: 'true' } param_settings { param: 'IncomingHeartbeat' value: '10000' } param_settings { param: 'OutgoingHeartbeat' value: '15000' } } } } }
Reboot the EUT.
Wait for the EUT to reconnect to the STOMP server.
Wait for 60 seconds
Test Metrics
- In the STOMP frame sent to the STOMP server during step 2, the
heart-beat
header sent by the EUT contains ‘15000, 10000’. - After the EUT is connected to the STOMP server, the EUT sends heartbeat messages every 15 seconds.
6.9 Error Handling - Unprocessed Record
Purpose
The purpose of this test is to ensure the EUT will correctly send an ERROR STOMP frame when a malformed USP record is received.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Setup
- Ensure the EUT is configured to use a STOMP server that exists in the test environment.
Test Procedure
- Send a malformed USP record to the EUT.
- Wait 60 seconds for the EUT to send a response.
Test Metrics
- The EUT either ignores the malformed record or sends a USP Record Error.
6.10 Agent’s STOMP destination is changed
Purpose
The purpose of this test is to ensure that when the EUT destination is altered it properly unsubscribes and subscribes to the new destination.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Setup
- Ensure the EUT is configured to use a STOMP server that exists in the test environment.
- Ensure the STOMP server is configured to not provide a destination
via the
subscribe-dest
header.
Test Procedure
Send a Set message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: SET } body { request { set { update_objs { obj_path: 'Device.LocalAgent.MTP.<active MTP instance>.STOMP.' param_settings { param: 'Destination' value: '<new destination>' } } } } }
Test Metrics
- After the STOMP destination was changed the EUT sent an UNSUBSCRIBE message message to the STOMP server.
- After the EUT sent an UNSUBSCRIBE to the STOMP server it sent a SUBSCRIBE message with the new destination to the STOMP server.
6.11 STOMP - Use of TLS
Purpose
The purpose of this test is to ensure the EUT can establish secure STOMP communication via TLS.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Setup
- Ensure the EUT is configured to the use a STOMP server that exists in the test environment.
- Ensure the EUT and STOMP server are configured with the appropriate certificates to communicate over TLS.
Test Procedure
Reboot the EUT
Wait for the EUT to reconnect to the STOMP server
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo' } } }
Wait for the EUT to send a GetResponse
Test Metrics
- All communication between the EUT and STOMP server after step 1 are encrypted using TLS
6.12 STOMP - Use of Connect Record
Purpose
The purpose of this test is to ensure the EUT correctly sends a Connect record after it has established a communications channel to the controller.
Functionality Tags
Conditional Mandatory (supports the STOMP MTP)
Test Setup
- Ensure the EUT is configured to use a STOMP server that exists in the test environment.
Test Procedure
- Reboot the EUT.
- Wait for the EUT to reconnect to the STOMP server.
Test Metrics
- After reconnecting to the STOMP server the EUT transmits a STOMPConnectRecord to the test controller within 30 seconds.
- The version in the received STOMPConnectRecord matches the expected version.
- The subscribed_destination string in the received STOMPConnectRecord matches the destination the EUT is subscribed to.