diff --git a/testcases/new/CSM_Unittest_README/CSM_Unittest_README(en-us).html b/testcases/new/CSM_Unittest_README/CSM_Unittest_README(en-us).html
new file mode 100644
index 000000000..7136909ff
--- /dev/null
+++ b/testcases/new/CSM_Unittest_README/CSM_Unittest_README(en-us).html
@@ -0,0 +1,1317 @@
+
+
+
+ The following two images show the LabVIEW project structure and the JKI VI Tester interface respectively:
+The unit tests are categorized according to CSM framework functionalities and mainly include the following test classes:
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ CSM1 sends a synchronous message to CSM2, CSM2 returns the correct reply, CSM1 enters Response Case to process the reply info |
+ test1-SyncMessage.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1 sends a synchronous message to CSM2, CSM2 encounters an error, CSM1 enters Response Case carrying the Response and error information |
+ test2-SycnMessageWithError.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ CSM1 uses API to send a synchronous message to CSM2, CSM2 returns the correct Response, CSM1 obtains the return via API |
+ test3-SyncMessage_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ CSM1 uses API to send a synchronous message to CSM2, CSM2 encounters an error, CSM1 obtains the Response and error information via API |
+ test4-SyncMessageWithError_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ CSM1 sends an asynchronous message with reply to CSM2, CSM2 returns the correct Response, CSM1 enters Async Response to process the reply |
+ test5-AsyncMessageWithReply.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ CSM1 sends an asynchronous message with reply to CSM2, CSM2 encounters an error, CSM1 enters Async Response carrying the Response and error information |
+ test6-AsyncMessageWithReplyWithError.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ CSM1 sends an asynchronous message without reply to CSM2, verifies that CSM2 executes, CSM1 does not process the reply |
+ test7-AsyncMessageWithoutReply.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ CSM1 uses API to send an asynchronous message without reply to CSM, verifies that the caller executes asynchronously, does not process the reply |
+ test8-AsyncMessageWithoutReply_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ |
+ Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are covered.
+ |
+
+
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ Basic message response function, already tested in message test class, including Sync/Async/AsyncNoRep |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1 sends a message to CSM2, single message response. When an error occurs, it first enters the Error Handler, but still returns the Response of the message execution case. |
+ test1-ResponseWithError.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ Macro message execution returns the response of the last SubMessage |
+ test2-MacroWithSubMessages.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ Macro message execution with PostStep messages returns the response of the last SubMessage |
+ test3-MacroWithSubAndPostMessages.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5¹ |
+ Macro message execution: if the last SubMessage sends a message to another module (sync/async with response/async no response), the final return value is empty |
+ test4-MacroWithNonLocalSubMessages.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ Message response: Sync message API carries the name of the executing module, already tested in test3-SyncMessage_API.vi of the message test class |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ In Response/Async Response, the source module name, message name, and message parameters can be obtained, already tested in Sync/Async/AsyncNoRep message test cases. |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ Message response with Error, already tested in Sync/Async/AsyncNoRep message test cases |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+
+ ¹ Related issue tracking:
+
+ https://github.com/NEVSTOP-LAB/Communicable-State-Machine/issues/547
+
+
+ Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are included.
+ |
+
+
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ CSM1 throws Status, can use Register/Unregister internally or externally to control Status triggering the State bound to CSM2 |
+ test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1 throws Status, can use API internally or externally to control Status triggering the State bound to CSM2 |
+ test2-LocalExternalStatusRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ CSM1 throws Status, can use API internally or externally to control Status triggering the State bound to CSM2 |
+ test24-MappingRelationshipByExternalRegistration_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ CSM1 throws Status, when subscribing externally with string syntax, the subscription does not disappear after CSM exits |
+ test25-MappingRelationshipByExternalRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ CSM1 throws Status, when subscribing internally to its own State: if the subscriber name is explicitly written as CSM1, the subscription does not disappear after exit; if the subscriber name is omitted, the subscription is automatically removed after exit. |
+ test26-MappingRelationshipByLocalRegistration_WithSubcriberName.vi
+
+test27-MappingRelationshipByLocalRegistration_WithoutSubcriberName.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ CSM1 throws Status, can be subscribed to multiple States in multiple modules, all will be triggered automatically after throwing |
+ test3-1ToNBroadcastStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ CSM1 throws Status, can be subscribed in non-CSM using UserEvent |
+ test4-RegisterStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ CSM1/CSM3 throw different Statuses, can be subscribed to CSM2's State, both can trigger CSM2 to execute State |
+ test5-RegisterMultipleStatusesToOneState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ When subscribing, Source Module Name can use * as a wildcard to subscribe to the same Status from multiple modules at once; unsubscribing from one module's Status does not affect others |
+ test6-AsteriskWildcardStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ After successful subscription, CSM1 throws Status multiple times, the subscriber receives all State triggers without loss |
+ test15-LosslessRegisterStatusMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ After successful subscription, CSM1 throws Status multiple times, the subscriber receives all State triggers without loss (subscribed in non-CSM using UserEvent) |
+ test16-LosslessRegisterStatusMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ The Argument of Status is the Argument of the triggered State |
+ Tested, see test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ The triggered Status can obtain Source State Name/Source module from Argument Info |
+ test7-TestArgumentInfoOfTriggeredState_Status.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ CSM1 throws Interrupt, can be subscribed to multiple States in multiple modules, all will be triggered automatically after throwing |
+ test19-1ToNInterruptStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ CSM1 throws Interrupt, can be subscribed in non-CSM using Interrupt User Event; Status User Event will not trigger |
+ test21-RegisterInterruptFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ CSM1 throws Status, subscribed as interrupt, can be subscribed in non-CSM using Interrupt User Event; Status User Event will not trigger |
+ test20-RegisterStatusAsInterruptFromNonCSM.vi
+ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ CSM1 throws Interrupt, subscribed as Status, can be subscribed in non-CSM using Status User Event; Interrupt User Event will not trigger |
+ test22-RegisterInterruptAsStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ CSM1 does not throw Status, its State can use Register/Unregister internally or externally to control Status triggering the State bound to CSM2 |
+ test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 19 |
+ CSM1 does not throw Status, its State can use API internally or externally to control Status triggering the State bound to CSM2 |
+ test9-LocalExternalStateRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 20 |
+ CSM1 does not throw Status, when subscribing externally to its State with string syntax, the subscription does not disappear after exit |
+ test29-MappingRelationshipByExternalRegistration_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 21 |
+ CSM1 does not throw Status, when subscribing externally to its State via API, the subscription does not disappear after exit |
+ test28-MappingRelationshipByExternalRegistration_API_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 22 |
+ CSM1 does not throw Status, when subscribing internally to its own State: if the subscriber name is explicitly written as CSM1, the subscription does not disappear after exit; if the subscriber name is omitted, the subscription is automatically removed after exit. |
+ test30-MappingRelationshipByLocalRegistration_WIthSubscriberName_State.vi
+
+test31-MappingRelationshipByLocalRegistration_WIthoutSubscriberName_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 23 |
+ CSM1 does not throw Status, its State can be subscribed to multiple States in multiple modules, all will be triggered automatically after throwing |
+ test10-1ToNBroadcastState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 24 |
+ CSM1 does not throw Status, its State can be subscribed in non-CSM using UserEvent |
+ test11-RegisterStatesFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 25 |
+ CSM1/CSM3 have different States, can be subscribed to CSM2's State, both can trigger CSM2 to execute State |
+ test12-RegisterMultipleStatesToOneState.vi/td>
+ | ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 26 |
+ When subscribing, Source Module Name can use * as a wildcard to subscribe to the same State from multiple modules at once; unsubscribing from one module's State does not affect others |
+ test13-AsteriskWildcardStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 27 |
+ After successful subscription, CSM1 throws State multiple times, the subscriber receives all State triggers without loss |
+ test17-LosslessRegisterStateMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 28 |
+ After successful subscription, CSM1 throws State multiple times, the subscriber receives all State triggers without loss (subscribed in non-CSM using UserEvent) |
+ test16-LosslessRegisterStateMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 29 |
+ The Response of State is the Argument of the triggered State |
+ Tested, see test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 30 |
+ The triggered State can obtain Source State Name/Source module from Argument Info |
+ test14-TestArgumentInfoOfTriggeredState_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 31 |
+ Subscribe State as interrupt, in Non-CSM mode, events can only be obtained in interrupt User Event, not in Status User Event |
+ test23-RegisterStatusAsInterruptFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+
+¹: The unit test VIs of this class are not sorted from top to bottom according to this table, but are sorted according to the actual test machine, especially the performance of the actual running machine for Git CI/CD.
+
+ Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are included.
+ |
+
+
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ Module creation and destruction logs (module created/module destroyed) can be obtained through the global log queue, and the number of logs can be checked for correctness |
+ test1-ModuleCreatedDestroyed_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ Module state change logs (state change) can be obtained through the global log queue: sending a message via external API triggers an internal state change in the CSM module. Both the triggering message and the resulting state change can be seen in the global log. |
+ test2-StateChange_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ Subscription and unsubscription logs can be obtained through the global log queue. CSM module names in Worker and Chain modes must not have suffixes. |
+ test3-RegisterUnregister_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ Module message communication logs (message) can be obtained through the global log queue: sending a synchronous message via external API triggers an internal state in CSM1, which then sends a synchronous message to CSM2. Both messages should be strictly logged in the correct format. |
+ test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ Module broadcast logs (broadcast) can be obtained through the global log queue |
+ test5-Broadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ Module high-priority broadcast logs (interrupt) can be obtained through the global log queue |
+ test6-Interrupt_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ Module state broadcast logs (state) can be obtained through the global log queue |
+ test7-StateBroadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ Module custom user message logs can be obtained through the global log queue |
+ test8-UserLog_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ Module Sync/Async/NoRep-Async message logs can be obtained through the global log queue |
+ Tested, see test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ Module creation and destruction logs (module created/module destroyed) can be obtained through global log custom events, and the number of logs can be checked for correctness |
+ test9-ModuleCreatedDestroyed_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ Module state change logs (state change) can be obtained through global log custom events: sending a message via external API triggers an internal state change in the CSM module. Both the triggering message and the resulting state change can be seen in the global log. |
+ test10-StateChange_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ Subscription and unsubscription logs can be obtained through global log custom events. CSM module names in Worker and Chain modes must not have suffixes. |
+ test11-RegisterUnregister_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ Module message communication logs (message) can be obtained through global log custom events |
+ test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ Module broadcast logs (broadcast) can be obtained through global log custom events |
+ test13-Broadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ Module high-priority broadcast logs (interrupt) can be obtained through global log custom events |
+ test14-Interrupt_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ Module state broadcast logs (state) can be obtained through global log custom events |
+ test15-StateBroadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ Module custom user message logs can be obtained through global log custom events |
+ test16-UserLog_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ Module Sync/Async/NoRep-Async message logs can be obtained through global log custom events |
+ Tested, see test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ |
+ Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are included.
+ |
+
+
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Chain Mode |
+
+
+ | 1 |
+ All nodes share the same CSM Attribute data space. Data written externally is read identically by all internal modules. |
+ test1-AllChainNodesShareTheSameData.vi |
+ ✔ |
+
+
+ | 2 |
+ Three nodes (A->B->C), each with different Allowed Messages. Messages are sent to the corresponding allowed module; using the API to send synchronous messages returns the correct parameters. |
+ test2-DifferentChainNodesProcessDifferentAllowedMessages.vi |
+ ✔ |
+
+
+ | 3 |
+ Three nodes (A->B->C), with Allowed Messages combinations of AB, BC, AC, and ABC. Messages should be executed by the first node in the chain. Using the API to send synchronous messages returns the correct parameters. |
+ test3-FirstChainNodeProcessesAllowedMessages.vi |
+ ✔ |
+
+
+ | 4 |
+ Three nodes (A->B->C), with Allowed Messages defined. If no module can execute the message, the sender reports an error. |
+ test4-EndNodeHandlesErrorForNotAllowedMessages.vi |
+ ✔ |
+
+
+ | 5 |
+ Three nodes (A->B->C), each node broadcasts a message. After subscribing, the corresponding module's API is triggered; after unsubscribing, none can be triggered. |
+ test5-ChainNodeBroadcast.vi |
+ ✔ |
+
+
+ | 6 |
+ Three nodes (A->B->C). If the "Macro: Exit" command does not specify a node (i.e., uses the core name without the $ suffix), nodes should exit in order from the end to the head of the chain. If the command specifies a node, only that node exits and others are unaffected. |
+ test6-ChainNodeExitSequenceCheck.vi |
+ ✔ |
+
+
+
+To ensure the long-term maintenance and stable operation of this unit test suite, please read the following:
+This project follows the MIT License.
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ CSM1 sends a synchronous message to CSM2, CSM2 returns the correct reply, CSM1 enters Response Case to process the reply info |
+ test1-SyncMessage.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1 sends a synchronous message to CSM2, CSM2 encounters an error, CSM1 enters Response Case carrying the Response and error information |
+ test2-SycnMessageWithError.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ CSM1 uses API to send a synchronous message to CSM2, CSM2 returns the correct Response, CSM1 obtains the return via API |
+ test3-SyncMessage_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ CSM1 uses API to send a synchronous message to CSM2, CSM2 encounters an error, CSM1 obtains the Response and error information via API |
+ test4-SyncMessageWithError_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ CSM1 sends an asynchronous message with reply to CSM2, CSM2 returns the correct Response, CSM1 enters Async Response to process the reply |
+ test5-AsyncMessageWithReply.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ CSM1 sends an asynchronous message with reply to CSM2, CSM2 encounters an error, CSM1 enters Async Response carrying the Response and error information |
+ test6-AsyncMessageWithReplyWithError.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ CSM1 sends an asynchronous message without reply to CSM2, verifies that CSM2 executes, CSM1 does not process the reply |
+ test7-AsyncMessageWithoutReply.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ CSM1 uses API to send an asynchronous message without reply to CSM, verifies that the caller executes asynchronously, does not process the reply |
+ test8-AsyncMessageWithoutReply_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ |
+ Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are covered.
+ |
+
+
+
+
+
+2. **Argument**
+ Based on message test class, further verify whether arguments/parameters carried by messages can be transmitted normally between different CSM modes (Normal Mode, SubModule Mode, System Level Mode, Worker Mode, Chain Mode, lilvbp Mode).
+ Specific test case description is explained in the table below and test code is in `testcase-CSMArgument.lvclass`.
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ Basic message response function, already tested in message test class, including Sync/Async/AsyncNoRep |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1 sends a message to CSM2, single message response. When an error occurs, it first enters the Error Handler, but still returns the Response of the message execution case. |
+ test1-ResponseWithError.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ Macro message execution returns the response of the last SubMessage |
+ test2-MacroWithSubMessages.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ Macro message execution with PostStep messages returns the response of the last SubMessage |
+ test3-MacroWithSubAndPostMessages.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5¹ |
+ Macro message execution: if the last SubMessage sends a message to another module (sync/async with response/async no response), the final return value is empty |
+ test4-MacroWithNonLocalSubMessages.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ Message response: Sync message API carries the name of the executing module, already tested in test3-SyncMessage_API.vi of the message test class |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ In Response/Async Response, the source module name, message name, and message parameters can be obtained, already tested in Sync/Async/AsyncNoRep message test cases. |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ Message response with Error, already tested in Sync/Async/AsyncNoRep message test cases |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+
+ ¹ Related issue tracking:
+
+ https://github.com/NEVSTOP-LAB/Communicable-State-Machine/issues/547
+
+
+ Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are included.
+ |
+
+
+
+4. **Broadcast**
+ Test status, interrupt (high priority), and state change broadcast (state change is a unique broadcast mechanism provided by CSM) across different modes (Normal Mode, SubModule Mode, System Level Mode, Worker Mode, Chain Mode, Packed Project Library Mode), including registration, unregistration, and selective registration (both senders and receivers can flexibly decide priority). Additionally test scenarios where broadcast functionality is called outside the CSM framework, extending cross-framework compatibility.
+ Specific test case description is explained in the table below and test code is in `testcase-CSMBroadcast.lvclass`.
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ CSM1 throws Status, can use Register/Unregister internally or externally to control Status triggering the State bound to CSM2 |
+ test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1 throws Status, can use API internally or externally to control Status triggering the State bound to CSM2 |
+ test2-LocalExternalStatusRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ CSM1 throws Status, can use API internally or externally to control Status triggering the State bound to CSM2 |
+ test24-MappingRelationshipByExternalRegistration_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ CSM1 throws Status, when subscribing externally with string syntax, the subscription does not disappear after CSM exits |
+ test25-MappingRelationshipByExternalRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ CSM1 throws Status, when subscribing internally to its own State: if the subscriber name is explicitly written as CSM1, the subscription does not disappear after exit; if the subscriber name is omitted, the subscription is automatically removed after exit. |
+ test26-MappingRelationshipByLocalRegistration_WithSubcriberName.vi
+
+test27-MappingRelationshipByLocalRegistration_WithoutSubcriberName.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ CSM1 throws Status, can be subscribed to multiple States in multiple modules, all will be triggered automatically after throwing |
+ test3-1ToNBroadcastStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ CSM1 throws Status, can be subscribed in non-CSM using UserEvent |
+ test4-RegisterStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ CSM1/CSM3 throw different Statuses, can be subscribed to CSM2's State, both can trigger CSM2 to execute State |
+ test5-RegisterMultipleStatusesToOneState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ When subscribing, Source Module Name can use * as a wildcard to subscribe to the same Status from multiple modules at once; unsubscribing from one module's Status does not affect others |
+ test6-AsteriskWildcardStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ After successful subscription, CSM1 throws Status multiple times, the subscriber receives all State triggers without loss |
+ test15-LosslessRegisterStatusMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ After successful subscription, CSM1 throws Status multiple times, the subscriber receives all State triggers without loss (subscribed in non-CSM using UserEvent) |
+ test16-LosslessRegisterStatusMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ The Argument of Status is the Argument of the triggered State |
+ Tested, see test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ The triggered Status can obtain Source State Name/Source module from Argument Info |
+ test7-TestArgumentInfoOfTriggeredState_Status.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ CSM1 throws Interrupt, can be subscribed to multiple States in multiple modules, all will be triggered automatically after throwing |
+ test19-1ToNInterruptStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ CSM1 throws Interrupt, can be subscribed in non-CSM using Interrupt User Event; Status User Event will not trigger |
+ test21-RegisterInterruptFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ CSM1 throws Status, subscribed as interrupt, can be subscribed in non-CSM using Interrupt User Event; Status User Event will not trigger |
+ test20-RegisterStatusAsInterruptFromNonCSM.vi
+ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ CSM1 throws Interrupt, subscribed as Status, can be subscribed in non-CSM using Status User Event; Interrupt User Event will not trigger |
+ test22-RegisterInterruptAsStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ CSM1 does not throw Status, its State can use Register/Unregister internally or externally to control Status triggering the State bound to CSM2 |
+ test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 19 |
+ CSM1 does not throw Status, its State can use API internally or externally to control Status triggering the State bound to CSM2 |
+ test9-LocalExternalStateRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 20 |
+ CSM1 does not throw Status, when subscribing externally to its State with string syntax, the subscription does not disappear after exit |
+ test29-MappingRelationshipByExternalRegistration_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 21 |
+ CSM1 does not throw Status, when subscribing externally to its State via API, the subscription does not disappear after exit |
+ test28-MappingRelationshipByExternalRegistration_API_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 22 |
+ CSM1 does not throw Status, when subscribing internally to its own State: if the subscriber name is explicitly written as CSM1, the subscription does not disappear after exit; if the subscriber name is omitted, the subscription is automatically removed after exit. |
+ test30-MappingRelationshipByLocalRegistration_WIthSubscriberName_State.vi
+
+test31-MappingRelationshipByLocalRegistration_WIthoutSubscriberName_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 23 |
+ CSM1 does not throw Status, its State can be subscribed to multiple States in multiple modules, all will be triggered automatically after throwing |
+ test10-1ToNBroadcastState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 24 |
+ CSM1 does not throw Status, its State can be subscribed in non-CSM using UserEvent |
+ test11-RegisterStatesFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 25 |
+ CSM1/CSM3 have different States, can be subscribed to CSM2's State, both can trigger CSM2 to execute State |
+ test12-RegisterMultipleStatesToOneState.vi/td>
+ | ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 26 |
+ When subscribing, Source Module Name can use * as a wildcard to subscribe to the same State from multiple modules at once; unsubscribing from one module's State does not affect others |
+ test13-AsteriskWildcardStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 27 |
+ After successful subscription, CSM1 throws State multiple times, the subscriber receives all State triggers without loss |
+ test17-LosslessRegisterStateMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 28 |
+ After successful subscription, CSM1 throws State multiple times, the subscriber receives all State triggers without loss (subscribed in non-CSM using UserEvent) |
+ test16-LosslessRegisterStateMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 29 |
+ The Response of State is the Argument of the triggered State |
+ Tested, see test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 30 |
+ The triggered State can obtain Source State Name/Source module from Argument Info |
+ test14-TestArgumentInfoOfTriggeredState_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 31 |
+ Subscribe State as interrupt, in Non-CSM mode, events can only be obtained in interrupt User Event, not in Status User Event |
+ test23-RegisterStatusAsInterruptFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+
+¹: The unit test VIs of this class are not sorted from top to bottom according to this table, but are sorted according to the actual test machine, especially the performance of the actual running machine for Git CI/CD.
+
+ Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are included.
+ |
+
+
+
+5. **Global Log**
+ Test global logging functionality across different modes (Normal Mode, SubModule Mode, System Level Mode, Worker Mode, Chain Mode, lilvbp), including module creation and destruction, state change, registration and unregistration, syn messages, async messages with reply, async messages without reply, broadcast, and user-defined log.
+ The CSM programming framework provides two implementation methods: Global Log Queue and Global Log User Event. This unit test class covers all possible scenarios for both implementations.
+ Specific test case description is explained in the table below and test code is in `testcase-CSMGlobalLog.lvclass`.
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ Module creation and destruction logs (module created/module destroyed) can be obtained through the global log queue, and the number of logs can be checked for correctness |
+ test1-ModuleCreatedDestroyed_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ Module state change logs (state change) can be obtained through the global log queue: sending a message via external API triggers an internal state change in the CSM module. Both the triggering message and the resulting state change can be seen in the global log. |
+ test2-StateChange_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ Subscription and unsubscription logs can be obtained through the global log queue. CSM module names in Worker and Chain modes must not have suffixes. |
+ test3-RegisterUnregister_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ Module message communication logs (message) can be obtained through the global log queue: sending a synchronous message via external API triggers an internal state in CSM1, which then sends a synchronous message to CSM2. Both messages should be strictly logged in the correct format. |
+ test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ Module broadcast logs (broadcast) can be obtained through the global log queue |
+ test5-Broadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ Module high-priority broadcast logs (interrupt) can be obtained through the global log queue |
+ test6-Interrupt_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ Module state broadcast logs (state) can be obtained through the global log queue |
+ test7-StateBroadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ Module custom user message logs can be obtained through the global log queue |
+ test8-UserLog_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ Module Sync/Async/NoRep-Async message logs can be obtained through the global log queue |
+ Tested, see test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ Module creation and destruction logs (module created/module destroyed) can be obtained through global log custom events, and the number of logs can be checked for correctness |
+ test9-ModuleCreatedDestroyed_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ Module state change logs (state change) can be obtained through global log custom events: sending a message via external API triggers an internal state change in the CSM module. Both the triggering message and the resulting state change can be seen in the global log. |
+ test10-StateChange_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ Subscription and unsubscription logs can be obtained through global log custom events. CSM module names in Worker and Chain modes must not have suffixes. |
+ test11-RegisterUnregister_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ Module message communication logs (message) can be obtained through global log custom events |
+ test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ Module broadcast logs (broadcast) can be obtained through global log custom events |
+ test13-Broadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ Module high-priority broadcast logs (interrupt) can be obtained through global log custom events |
+ test14-Interrupt_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ Module state broadcast logs (state) can be obtained through global log custom events |
+ test15-StateBroadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ Module custom user message logs can be obtained through global log custom events |
+ test16-UserLog_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ Module Sync/Async/NoRep-Async message logs can be obtained through global log custom events |
+ Tested, see test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ |
+
+Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are included.
+ |
+
+
+
+6. **System Level Module**
+ Test the `CSM List Module.vi` API functionality by modifying the input Scope parameter to identify scenarios that include or exclude system-level modules. Other related system-level module functionalities have been covered in the Message class tests.
+ Specific test case description is explained in the table below and test code is in `testcase-CSMSystemLevelModule.lvclass`.
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Chain Mode |
+
+
+ | 1 |
+ All nodes share the same CSM Attribute data space. Data written externally is read identically by all internal modules. |
+ test1-AllChainNodesShareTheSameData.vi |
+ ✔ |
+
+
+ | 2 |
+ Three nodes (A->B->C), each with different Allowed Messages. Messages are sent to the corresponding allowed module; using the API to send synchronous messages returns the correct parameters. |
+ test2-DifferentChainNodesProcessDifferentAllowedMessages.vi |
+ ✔ |
+
+
+ | 3 |
+ Three nodes (A->B->C), with Allowed Messages combinations of AB, BC, AC, and ABC. Messages should be executed by the first node in the chain. Using the API to send synchronous messages returns the correct parameters. |
+ test3-FirstChainNodeProcessesAllowedMessages.vi |
+ ✔ |
+
+
+ | 4 |
+ Three nodes (A->B->C), with Allowed Messages defined. If no module can execute the message, the sender reports an error. |
+ test4-EndNodeHandlesErrorForNotAllowedMessages.vi |
+ ✔ |
+
+
+ | 5 |
+ Three nodes (A->B->C), each node broadcasts a message. After subscribing, the corresponding module's API is triggered; after unsubscribing, none can be triggered. |
+ test5-ChainNodeBroadcast.vi |
+ ✔ |
+
+
+ | 6 |
+ Three nodes (A->B->C). If the "Macro: Exit" command does not specify a node (i.e., uses the core name without the $ suffix), nodes should exit in order from the end to the head of the chain. If the command specifies a node, only that node exits and others are unaffected. |
+ test6-ChainNodeExitSequenceCheck.vi |
+ ✔ |
+
+
+
+
+
+10. **Management API**
+ Test CSM built-in management APIs, such as `Module Status.vi`, verifying if they can correctly read module information (name, node count, etc.), and test the polymorphic VI with various filtering functions. Other related functionalities have been covered in the Message class tests.
+ Specific test case description is explained in the table below and test code is in `testcase-CSMManagementAPI.lvclass`.
+
+
+ | 测试项序号 |
+ 测试项内容 |
+ 对应测试项VI¹ |
+ 普通模式 |
+ 子模块模式 |
+ 系统级模式 |
+ 协作者模式 |
+ 责任链模式 |
+ 打包项目库模式 |
+
+
+ | 1 |
+ CSM1抛出Status, 可以通过 Register/Unregister 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1抛出Status, 可以通过 API 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test2-LocalExternalStatusRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ CSM1抛出Status, 可以通过 API 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test24-MappingRelationshipByExternalRegistration_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ CSM1抛出Status, 在外部使用语句订阅时,CSM退出后,订阅关系不会消失 |
+ test25-MappingRelationshipByExternalRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ CSM1抛出Status, 在内部使用语句订阅到本模块的State时:如果明确写出订阅者名字为CSM1,退出后,订阅关系不会消失;如果省略订阅者名字,退出后,订阅关系会自动被移除; |
+ test26-MappingRelationshipByLocalRegistration_WithSubcriberName.vi
+
+test27-MappingRelationshipByLocalRegistration_WithoutSubcriberName.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ CSM1抛出Status, 可以被订阅到多个模块的多个状态,抛出后全部会自动触发 |
+ test3-1ToNBroadcastStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ CSM1抛出Status, 可以在非CSM中,使用UserEvent 进行订阅 |
+ test4-RegisterStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ CSM1/CSM3 抛出不同的Status, 可以订阅到 CSM2 的State, 都能触发 CSM2 执行 State |
+ test5-RegisterMultipleStatusesToOneState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ 订阅时Source Module Name 可以使用 * 作为通配符,一次性订阅多个模块的同一个Status,可以取消订阅某一个module 的该Status,其他模块的不被影响 |
+ test6-AsteriskWildcardStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ 订阅成功后,CSM1 抛出多次 Status, 订阅方会收到所有的State 触发,不会丢失 |
+ test15-LosslessRegisterStatusMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ 订阅成功后,CSM1 抛出多次Status, 订阅方会收到所有的State 触发,不会丢失(非CSM中,使用UserEvent 进行订阅) |
+ test16-LosslessRegisterStatusMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ Status 的 Argument, 就是触发后的State 的Argument |
+ 已测试,见test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ 被触发的Status ,可以通过 Argument Info 中获取 Source State Name/ Source module |
+ test7-TestArgumentInfoOfTriggeredState_Status.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ CSM1抛出Interrupt, 可以被订阅到多个模块的多个状态,抛出后全部会自动触发 |
+ test19-1ToNInterruptStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ CSM1抛出Interrupt, 可以在非CSM 中,使用 Interrupt User Event 进行订阅获取,Status User Event 不会触发 |
+ test21-RegisterInterruptFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ CSM1抛出Status, 订阅为 interrupt, 可以在非CSM 中,使用 Interrupt User Event 进行订阅获取,Status User Event 不会触发 |
+ test20-RegisterStatusAsInterruptFromNonCSM.vi
+ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ CSM1抛出Interrupt, 订阅为 Status, 可以在非CSM 中,使用Status User Event 进行订阅获取,Interrupt User Event 不会触发 |
+ test22-RegisterInterruptAsStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ CSM1不抛出Status,它的State, 可以通过 Regiseter/Unregister 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 19 |
+ CSM1不抛出Status,它的State, 可以通过 API 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test9-LocalExternalStateRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 20 |
+ CSM1不抛出Status,它的State, 在外部使用语句订阅时,推出后,订阅关系不会消失 |
+ test29-MappingRelationshipByExternalRegistration_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 21 |
+ CSM1不抛出Status,它的State, 在外部使用API订阅时,推出后,订阅关系不会消失 |
+ test28-MappingRelationshipByExternalRegistration_API_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 22 |
+ CSM1不抛出Status,它的State, 在内部使用语句订阅到本模块的State时:如果明确写出订阅者名字为CSM1,退出后,订阅关系不会消失;如果省略订阅者名字,退出后,订阅关系会自动被移除; |
+ test30-MappingRelationshipByLocalRegistration_WIthSubscriberName_State.vi
+
+test31-MappingRelationshipByLocalRegistration_WIthoutSubscriberName_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 23 |
+ CSM1不抛出Status,它的State, 可以被订阅到多个模块的多个状态,抛出后全部会自动触发 |
+ test10-1ToNBroadcastState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 24 |
+ CSM1不抛出Status,它的State, 可以在非CSM中,使用UserEvent 进行订阅 |
+ test11-RegisterStatesFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 25 |
+ CSM1/CSM3 不同的State, 可以订阅到 CSM2 的State, 都能触发 CSM2 执行 State |
+ test12-RegisterMultipleStatesToOneState.vi/td>
+ | ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 26 |
+ 订阅时Source Module Name 可以使用 * 作为通配符,一次性订阅多个模块的同一个State,可以取消订阅某一个module 的该State,其他模块的不被影响 |
+ test13-AsteriskWildcardStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 27 |
+ 订阅成功后,CSM1 抛出多次 State, 订阅方会收到所有State 触发,不会丢失 |
+ test17-LosslessRegisterStateMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 28 |
+ 订阅成功后,CSM1 抛出多次 State, 订阅方会收到所有State 触发,不会丢失(非CSM中,使用UserEvent 进行订阅) |
+ test16-LosslessRegisterStateMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 29 |
+ State 的 Response, 就是触发后的State 的Argument |
+ 已测试,见test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 30 |
+ 被触发的State ,可以通过 Argument Info 中获取 Source State Name/ Source module |
+ test14-TestArgumentInfoOfTriggeredState_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 31 |
+ 将state 订阅为 interrupt, Non-CSM 模式下,只能在interrupt User Event 中获取事件,在 Status User Event 中无法获取队列 |
+ test23-RegisterStatusAsInterruptFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+
+¹:该类的单元测试vi未按照该表格从上至下顺序排序,而是按照实际测试机台,特别是Git CI/CD实际运行机台性能而做的排序。
+
+ 备注:CSM模式包含普通模式、子模块模式、系统级模式、协作者模式、责任链模式、打包项目库模式,CSM1和CSM2之间包含所有可能的CSM模式对应关系。
+ |
+
+
+
+
+ | 测试项序号 |
+ 测试项内容 |
+ 对应测试项VI |
+ 普通模式 |
+ 子模块模式 |
+ 系统级模式 |
+ 协作者模式 |
+ 责任链模式 |
+ 打包项目库模式 |
+
+
+ | 1 |
+ 可以通过全局日志队列获取模块创建和销毁的日志(module created/module destroyed),并检查日志数量是否符合预期 |
+ test1-ModuleCreatedDestroyed_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ 可以通过全局日志队列获取模块状态轮转的日志(state change): 通过外部API发送一条消息触发CSM模块内部状态变化(State Change), 可以在全局日志里既看到触发消息的日志,又可以看到被触发的状态变化 |
+ test2-StateChange_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ 可以通过全局日志队列获取订阅、取消订阅的日志, 协作者和责任链模式的CSM模块名不能带有后缀 |
+ test3-RegisterUnregister_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ 可以通过全局日志队列获得模块消息通讯的日志(messasge): 通过外部API发送一条同步消息触发CSM1模块内部状态,该内部状态里再发送一条同步消息给CSM2,检查这两条特定消息都按照严格的格式记录在日志里。 |
+ test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ 可以通过全局日志队列获得模块发布广播的日志(broadcast) |
+ test5-Broadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ 可以通过全局日志队列获得模块发布高优先级广播的日志(interrupt) |
+ test6-Interrupt_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ 可以通过全局日志队列获得模块状态广播(state)的日志 |
+ test7-StateBroadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ 可以通过全局日志队列获得模块自定义用户消息的日志 |
+ test8-UserLog_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ 可以通过全局日志队列获得模块Sync/Async/NoRep-Async消息的日志 |
+ 已测试,见test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ 可以通过全局日志自定义事件获取模块创建和销毁的日志(module created/module destroyed),并检查日志数量是否符合预期 |
+ test9-ModuleCreatedDestroyed_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ 可以通过全局日志自定义事件获取模块状态轮转的日志(state change): 通过外部API发送一条消息触发CSM模块内部状态变化(State Change), 可以在全局日志里既看到触发消息的日志,又可以看到被触发的状态变化 |
+ test10-StateChange_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ 可以通过全局日志自定义事件获取订阅、取消订阅的日志, 协作者和责任链模式的CSM模块名不能带有后缀 |
+ test11-RegisterUnregister_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ 可以通过全局日志自定义事件获得模块消息通讯的日志(messasge) |
+ test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ 可以通过全局日志自定义事件获得模块发布广播的日志(broadcast) |
+ test13-Broadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ 可以通过全局日志自定义事件获得模块发布高优先级广播的日志(interrupt) |
+ test14-Interrupt_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ 可以通过全局日志自定义事件获得模块状态广播(state)的日志 |
+ test15-StateBroadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ 可以通过全局日志自定义事件获得模块自定义用户消息的日志 |
+ test16-UserLog_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ 可以通过全局日志自定义事件获得模块Sync/Async/NoRep-Async消息的日志 |
+ 已测试,见test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ |
+ 备注:CSM模式包含普通模式、子模块模式、系统级模式、协作者模式、责任链模式、打包项目库模式,CSM1和CSM2之间包含所有可能的CSM模式对应关系。
+ |
+
+
+
+
+ | 测试项序号 |
+ 测试项内容 |
+ 对应测试项VI¹ |
+ 普通模式 |
+ 子模块模式 |
+ 系统级模式 |
+ 协作者模式 |
+ 责任链模式 |
+ 打包项目库模式 |
+
+
+ | 1 |
+ CSM1抛出Status, 可以通过 Register/Unregister 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1抛出Status, 可以通过 API 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test2-LocalExternalStatusRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ CSM1抛出Status, 可以通过 API 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test24-MappingRelationshipByExternalRegistration_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ CSM1抛出Status, 在外部使用语句订阅时,CSM退出后,订阅关系不会消失 |
+ test25-MappingRelationshipByExternalRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ CSM1抛出Status, 在内部使用语句订阅到本模块的State时:如果明确写出订阅者名字为CSM1,退出后,订阅关系不会消失;如果省略订阅者名字,退出后,订阅关系会自动被移除; |
+ test26-MappingRelationshipByLocalRegistration_WithSubcriberName.vi
+
+test27-MappingRelationshipByLocalRegistration_WithoutSubcriberName.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ CSM1抛出Status, 可以被订阅到多个模块的多个状态,抛出后全部会自动触发 |
+ test3-1ToNBroadcastStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ CSM1抛出Status, 可以在非CSM中,使用UserEvent 进行订阅 |
+ test4-RegisterStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ CSM1/CSM3 抛出不同的Status, 可以订阅到 CSM2 的State, 都能触发 CSM2 执行 State |
+ test5-RegisterMultipleStatusesToOneState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ 订阅时Source Module Name 可以使用 * 作为通配符,一次性订阅多个模块的同一个Status,可以取消订阅某一个module 的该Status,其他模块的不被影响 |
+ test6-AsteriskWildcardStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ 订阅成功后,CSM1 抛出多次 Status, 订阅方会收到所有的State 触发,不会丢失 |
+ test15-LosslessRegisterStatusMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ 订阅成功后,CSM1 抛出多次Status, 订阅方会收到所有的State 触发,不会丢失(非CSM中,使用UserEvent 进行订阅) |
+ test16-LosslessRegisterStatusMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ Status 的 Argument, 就是触发后的State 的Argument |
+ 已测试,见test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ 被触发的Status ,可以通过 Argument Info 中获取 Source State Name/ Source module |
+ test7-TestArgumentInfoOfTriggeredState_Status.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ CSM1抛出Interrupt, 可以被订阅到多个模块的多个状态,抛出后全部会自动触发 |
+ test19-1ToNInterruptStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ CSM1抛出Interrupt, 可以在非CSM 中,使用 Interrupt User Event 进行订阅获取,Status User Event 不会触发 |
+ test21-RegisterInterruptFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ CSM1抛出Status, 订阅为 interrupt, 可以在非CSM 中,使用 Interrupt User Event 进行订阅获取,Status User Event 不会触发 |
+ test20-RegisterStatusAsInterruptFromNonCSM.vi
+ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ CSM1抛出Interrupt, 订阅为 Status, 可以在非CSM 中,使用Status User Event 进行订阅获取,Interrupt User Event 不会触发 |
+ test22-RegisterInterruptAsStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ CSM1不抛出Status,它的State, 可以通过 Regiseter/Unregister 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 19 |
+ CSM1不抛出Status,它的State, 可以通过 API 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test9-LocalExternalStateRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 20 |
+ CSM1不抛出Status,它的State, 在外部使用语句订阅时,推出后,订阅关系不会消失 |
+ test29-MappingRelationshipByExternalRegistration_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 21 |
+ CSM1不抛出Status,它的State, 在外部使用API订阅时,推出后,订阅关系不会消失 |
+ test28-MappingRelationshipByExternalRegistration_API_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 22 |
+ CSM1不抛出Status,它的State, 在内部使用语句订阅到本模块的State时:如果明确写出订阅者名字为CSM1,退出后,订阅关系不会消失;如果省略订阅者名字,退出后,订阅关系会自动被移除; |
+ test30-MappingRelationshipByLocalRegistration_WIthSubscriberName_State.vi
+
+test31-MappingRelationshipByLocalRegistration_WIthoutSubscriberName_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 23 |
+ CSM1不抛出Status,它的State, 可以被订阅到多个模块的多个状态,抛出后全部会自动触发 |
+ test10-1ToNBroadcastState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 24 |
+ CSM1不抛出Status,它的State, 可以在非CSM中,使用UserEvent 进行订阅 |
+ test11-RegisterStatesFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 25 |
+ CSM1/CSM3 不同的State, 可以订阅到 CSM2 的State, 都能触发 CSM2 执行 State |
+ test12-RegisterMultipleStatesToOneState.vi/td>
+ | ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 26 |
+ 订阅时Source Module Name 可以使用 * 作为通配符,一次性订阅多个模块的同一个State,可以取消订阅某一个module 的该State,其他模块的不被影响 |
+ test13-AsteriskWildcardStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 27 |
+ 订阅成功后,CSM1 抛出多次 State, 订阅方会收到所有State 触发,不会丢失 |
+ test17-LosslessRegisterStateMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 28 |
+ 订阅成功后,CSM1 抛出多次 State, 订阅方会收到所有State 触发,不会丢失(非CSM中,使用UserEvent 进行订阅) |
+ test16-LosslessRegisterStateMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 29 |
+ State 的 Response, 就是触发后的State 的Argument |
+ 已测试,见test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 30 |
+ 被触发的State ,可以通过 Argument Info 中获取 Source State Name/ Source module |
+ test14-TestArgumentInfoOfTriggeredState_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 31 |
+ 将state 订阅为 interrupt, Non-CSM 模式下,只能在interrupt User Event 中获取事件,在 Status User Event 中无法获取队列 |
+ test23-RegisterStatusAsInterruptFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+
+¹:该类的单元测试vi未按照该表格从上至下顺序排序,而是按照实际测试机台,特别是Git CI/CD实际运行机台性能而做的排序。
+
+ 备注:CSM模式包含普通模式、子模块模式、系统级模式、协作者模式、责任链模式、打包项目库模式,CSM1和CSM2之间包含所有可能的CSM模式对应关系。
+ |
+
+
+
+
+5. **全局日志 (Global Log)**
+ 测试不同模式下(普通模式、子模块模式、系统级模式、协作者模式、责任链模式、打包项目库模式)的全局日志功能,包括模块创建与销毁、状态轮转、注册与反注册、同步与异步消息、广播及用户自定义事件。
+ CSM编程框架提供两种实现方式:全局日志队列 (Global Log Queue) 与用户事件 (Global Log User Event),该类单元测试覆盖了以上两种实现方式的所有可能场景。
+ 具体测试项请见下方表格,代码详见 `testcase-CSMGlobalLog.lvclass`。
+
+
+ | 测试项序号 |
+ 测试项内容 |
+ 对应测试项VI |
+ 普通模式 |
+ 子模块模式 |
+ 系统级模式 |
+ 协作者模式 |
+ 责任链模式 |
+ 打包项目库模式 |
+
+
+ | 1 |
+ 可以通过全局日志队列获取模块创建和销毁的日志(module created/module destroyed),并检查日志数量是否符合预期 |
+ test1-ModuleCreatedDestroyed_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ 可以通过全局日志队列获取模块状态轮转的日志(state change): 通过外部API发送一条消息触发CSM模块内部状态变化(State Change), 可以在全局日志里既看到触发消息的日志,又可以看到被触发的状态变化 |
+ test2-StateChange_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ 可以通过全局日志队列获取订阅、取消订阅的日志, 协作者和责任链模式的CSM模块名不能带有后缀 |
+ test3-RegisterUnregister_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ 可以通过全局日志队列获得模块消息通讯的日志(messasge): 通过外部API发送一条同步消息触发CSM1模块内部状态,该内部状态里再发送一条同步消息给CSM2,检查这两条特定消息都按照严格的格式记录在日志里。 |
+ test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ 可以通过全局日志队列获得模块发布广播的日志(broadcast) |
+ test5-Broadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ 可以通过全局日志队列获得模块发布高优先级广播的日志(interrupt) |
+ test6-Interrupt_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ 可以通过全局日志队列获得模块状态广播(state)的日志 |
+ test7-StateBroadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ 可以通过全局日志队列获得模块自定义用户消息的日志 |
+ test8-UserLog_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ 可以通过全局日志队列获得模块Sync/Async/NoRep-Async消息的日志 |
+ 已测试,见test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ 可以通过全局日志自定义事件获取模块创建和销毁的日志(module created/module destroyed),并检查日志数量是否符合预期 |
+ test9-ModuleCreatedDestroyed_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ 可以通过全局日志自定义事件获取模块状态轮转的日志(state change): 通过外部API发送一条消息触发CSM模块内部状态变化(State Change), 可以在全局日志里既看到触发消息的日志,又可以看到被触发的状态变化 |
+ test10-StateChange_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ 可以通过全局日志自定义事件获取订阅、取消订阅的日志, 协作者和责任链模式的CSM模块名不能带有后缀 |
+ test11-RegisterUnregister_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ 可以通过全局日志自定义事件获得模块消息通讯的日志(messasge) |
+ test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ 可以通过全局日志自定义事件获得模块发布广播的日志(broadcast) |
+ test13-Broadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ 可以通过全局日志自定义事件获得模块发布高优先级广播的日志(interrupt) |
+ test14-Interrupt_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ 可以通过全局日志自定义事件获得模块状态广播(state)的日志 |
+ test15-StateBroadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ 可以通过全局日志自定义事件获得模块自定义用户消息的日志 |
+ test16-UserLog_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ 可以通过全局日志自定义事件获得模块Sync/Async/NoRep-Async消息的日志 |
+ 已测试,见test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ |
+
+备注:CSM模式包含普通模式、子模块模式、系统级模式、协作者模式、责任链模式、打包项目库模式,CSM1和CSM2之间包含所有可能的CSM模式对应关系。
+ |
+
+
+
+6. **系统级模块 (System Level Module)**
+ 测试 `CSM List Module.vi`API 功能,通过修改输入 Scope参数,识别包含或不包含系统级模块的场景。其它相关系统级模块功能已包含在消息(Message)类测试过。
+ 具体测试项请见下方表格,代码详见 `testcase-CSMSystemLevelModule.lvclass`。
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ CSM1 sends a synchronous message to CSM2, CSM2 returns the correct reply, CSM1 enters Response Case to process the reply info |
+ test1-SyncMessage.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1 sends a synchronous message to CSM2, CSM2 encounters an error, CSM1 enters Response Case carrying the Response and error information |
+ test2-SycnMessageWithError.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ CSM1 uses API to send a synchronous message to CSM2, CSM2 returns the correct Response, CSM1 obtains the return via API |
+ test3-SyncMessage_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ CSM1 uses API to send a synchronous message to CSM2, CSM2 encounters an error, CSM1 obtains the Response and error information via API |
+ test4-SyncMessageWithError_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ CSM1 sends an asynchronous message with reply to CSM2, CSM2 returns the correct Response, CSM1 enters Async Response to process the reply |
+ test5-AsyncMessageWithReply.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ CSM1 sends an asynchronous message with reply to CSM2, CSM2 encounters an error, CSM1 enters Async Response carrying the Response and error information |
+ test6-AsyncMessageWithReplyWithError.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ CSM1 sends an asynchronous message without reply to CSM2, verifies that CSM2 executes, CSM1 does not process the reply |
+ test7-AsyncMessageWithoutReply.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ CSM1 uses API to send an asynchronous message without reply to CSM, verifies that the caller executes asynchronously, does not process the reply |
+ test8-AsyncMessageWithoutReply_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ |
+ Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are covered.
+ |
+
+
diff --git a/testcases/new/CSM_Unittest_README/Tables/table1_Message(zh-cn) - Copy.md b/testcases/new/CSM_Unittest_README/Tables/table1_Message(zh-cn) - Copy.md
new file mode 100644
index 000000000..f665faa74
--- /dev/null
+++ b/testcases/new/CSM_Unittest_README/Tables/table1_Message(zh-cn) - Copy.md
@@ -0,0 +1,106 @@
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ Basic message response function, already tested in message test class, including Sync/Async/AsyncNoRep |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1 sends a message to CSM2, single message response. When an error occurs, it first enters the Error Handler, but still returns the Response of the message execution case. |
+ test1-ResponseWithError.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ Macro message execution returns the response of the last SubMessage |
+ test2-MacroWithSubMessages.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ Macro message execution with PostStep messages returns the response of the last SubMessage |
+ test3-MacroWithSubAndPostMessages.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5¹ |
+ Macro message execution: if the last SubMessage sends a message to another module (sync/async with response/async no response), the final return value is empty |
+ test4-MacroWithNonLocalSubMessages.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ Message response: Sync message API carries the name of the executing module, already tested in test3-SyncMessage_API.vi of the message test class |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ In Response/Async Response, the source module name, message name, and message parameters can be obtained, already tested in Sync/Async/AsyncNoRep message test cases. |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ Message response with Error, already tested in Sync/Async/AsyncNoRep message test cases |
+ Tested |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+
+ ¹ Related issue tracking:
+
+ https://github.com/NEVSTOP-LAB/Communicable-State-Machine/issues/547
+
+
+ Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are included.
+ |
+
+
diff --git a/testcases/new/CSM_Unittest_README/Tables/table3_Response(zh-cn).md b/testcases/new/CSM_Unittest_README/Tables/table3_Response(zh-cn).md
new file mode 100644
index 000000000..331bfa237
--- /dev/null
+++ b/testcases/new/CSM_Unittest_README/Tables/table3_Response(zh-cn).md
@@ -0,0 +1,112 @@
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ CSM1 throws Status, can use Register/Unregister internally or externally to control Status triggering the State bound to CSM2 |
+ test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1 throws Status, can use API internally or externally to control Status triggering the State bound to CSM2 |
+ test2-LocalExternalStatusRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ CSM1 throws Status, can use API internally or externally to control Status triggering the State bound to CSM2 |
+ test24-MappingRelationshipByExternalRegistration_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ CSM1 throws Status, when subscribing externally with string syntax, the subscription does not disappear after CSM exits |
+ test25-MappingRelationshipByExternalRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ CSM1 throws Status, when subscribing internally to its own State: if the subscriber name is explicitly written as CSM1, the subscription does not disappear after exit; if the subscriber name is omitted, the subscription is automatically removed after exit. |
+ test26-MappingRelationshipByLocalRegistration_WithSubcriberName.vi
+
+test27-MappingRelationshipByLocalRegistration_WithoutSubcriberName.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ CSM1 throws Status, can be subscribed to multiple States in multiple modules, all will be triggered automatically after throwing |
+ test3-1ToNBroadcastStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ CSM1 throws Status, can be subscribed in non-CSM using UserEvent |
+ test4-RegisterStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ CSM1/CSM3 throw different Statuses, can be subscribed to CSM2's State, both can trigger CSM2 to execute State |
+ test5-RegisterMultipleStatusesToOneState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ When subscribing, Source Module Name can use * as a wildcard to subscribe to the same Status from multiple modules at once; unsubscribing from one module's Status does not affect others |
+ test6-AsteriskWildcardStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ After successful subscription, CSM1 throws Status multiple times, the subscriber receives all State triggers without loss |
+ test15-LosslessRegisterStatusMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ After successful subscription, CSM1 throws Status multiple times, the subscriber receives all State triggers without loss (subscribed in non-CSM using UserEvent) |
+ test16-LosslessRegisterStatusMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ The Argument of Status is the Argument of the triggered State |
+ Tested, see test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ The triggered Status can obtain Source State Name/Source module from Argument Info |
+ test7-TestArgumentInfoOfTriggeredState_Status.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ CSM1 throws Interrupt, can be subscribed to multiple States in multiple modules, all will be triggered automatically after throwing |
+ test19-1ToNInterruptStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ CSM1 throws Interrupt, can be subscribed in non-CSM using Interrupt User Event; Status User Event will not trigger |
+ test21-RegisterInterruptFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ CSM1 throws Status, subscribed as interrupt, can be subscribed in non-CSM using Interrupt User Event; Status User Event will not trigger |
+ test20-RegisterStatusAsInterruptFromNonCSM.vi
+ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ CSM1 throws Interrupt, subscribed as Status, can be subscribed in non-CSM using Status User Event; Interrupt User Event will not trigger |
+ test22-RegisterInterruptAsStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ CSM1 does not throw Status, its State can use Register/Unregister internally or externally to control Status triggering the State bound to CSM2 |
+ test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 19 |
+ CSM1 does not throw Status, its State can use API internally or externally to control Status triggering the State bound to CSM2 |
+ test9-LocalExternalStateRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 20 |
+ CSM1 does not throw Status, when subscribing externally to its State with string syntax, the subscription does not disappear after exit |
+ test29-MappingRelationshipByExternalRegistration_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 21 |
+ CSM1 does not throw Status, when subscribing externally to its State via API, the subscription does not disappear after exit |
+ test28-MappingRelationshipByExternalRegistration_API_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 22 |
+ CSM1 does not throw Status, when subscribing internally to its own State: if the subscriber name is explicitly written as CSM1, the subscription does not disappear after exit; if the subscriber name is omitted, the subscription is automatically removed after exit. |
+ test30-MappingRelationshipByLocalRegistration_WIthSubscriberName_State.vi
+
+test31-MappingRelationshipByLocalRegistration_WIthoutSubscriberName_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 23 |
+ CSM1 does not throw Status, its State can be subscribed to multiple States in multiple modules, all will be triggered automatically after throwing |
+ test10-1ToNBroadcastState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 24 |
+ CSM1 does not throw Status, its State can be subscribed in non-CSM using UserEvent |
+ test11-RegisterStatesFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 25 |
+ CSM1/CSM3 have different States, can be subscribed to CSM2's State, both can trigger CSM2 to execute State |
+ test12-RegisterMultipleStatesToOneState.vi/td>
+ | ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 26 |
+ When subscribing, Source Module Name can use * as a wildcard to subscribe to the same State from multiple modules at once; unsubscribing from one module's State does not affect others |
+ test13-AsteriskWildcardStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 27 |
+ After successful subscription, CSM1 throws State multiple times, the subscriber receives all State triggers without loss |
+ test17-LosslessRegisterStateMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 28 |
+ After successful subscription, CSM1 throws State multiple times, the subscriber receives all State triggers without loss (subscribed in non-CSM using UserEvent) |
+ test16-LosslessRegisterStateMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 29 |
+ The Response of State is the Argument of the triggered State |
+ Tested, see test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 30 |
+ The triggered State can obtain Source State Name/Source module from Argument Info |
+ test14-TestArgumentInfoOfTriggeredState_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 31 |
+ Subscribe State as interrupt, in Non-CSM mode, events can only be obtained in interrupt User Event, not in Status User Event |
+ test23-RegisterStatusAsInterruptFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+
+¹: The unit test VIs of this class are not sorted from top to bottom according to this table, but are sorted according to the actual test machine, especially the performance of the actual running machine for Git CI/CD.
+
+ Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are included.
+ |
+
+
diff --git a/testcases/new/CSM_Unittest_README/Tables/table4_Broadcast(zh-cn).md b/testcases/new/CSM_Unittest_README/Tables/table4_Broadcast(zh-cn).md
new file mode 100644
index 000000000..b08d02738
--- /dev/null
+++ b/testcases/new/CSM_Unittest_README/Tables/table4_Broadcast(zh-cn).md
@@ -0,0 +1,366 @@
+
+
+ | 测试项序号 |
+ 测试项内容 |
+ 对应测试项VI¹ |
+ 普通模式 |
+ 子模块模式 |
+ 系统级模式 |
+ 协作者模式 |
+ 责任链模式 |
+ 打包项目库模式 |
+
+
+ | 1 |
+ CSM1抛出Status, 可以通过 Register/Unregister 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ CSM1抛出Status, 可以通过 API 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test2-LocalExternalStatusRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ CSM1抛出Status, 可以通过 API 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test24-MappingRelationshipByExternalRegistration_API.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ CSM1抛出Status, 在外部使用语句订阅时,CSM退出后,订阅关系不会消失 |
+ test25-MappingRelationshipByExternalRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ CSM1抛出Status, 在内部使用语句订阅到本模块的State时:如果明确写出订阅者名字为CSM1,退出后,订阅关系不会消失;如果省略订阅者名字,退出后,订阅关系会自动被移除; |
+ test26-MappingRelationshipByLocalRegistration_WithSubcriberName.vi
+
+test27-MappingRelationshipByLocalRegistration_WithoutSubcriberName.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ CSM1抛出Status, 可以被订阅到多个模块的多个状态,抛出后全部会自动触发 |
+ test3-1ToNBroadcastStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ CSM1抛出Status, 可以在非CSM中,使用UserEvent 进行订阅 |
+ test4-RegisterStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ CSM1/CSM3 抛出不同的Status, 可以订阅到 CSM2 的State, 都能触发 CSM2 执行 State |
+ test5-RegisterMultipleStatusesToOneState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ 订阅时Source Module Name 可以使用 * 作为通配符,一次性订阅多个模块的同一个Status,可以取消订阅某一个module 的该Status,其他模块的不被影响 |
+ test6-AsteriskWildcardStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ 订阅成功后,CSM1 抛出多次 Status, 订阅方会收到所有的State 触发,不会丢失 |
+ test15-LosslessRegisterStatusMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ 订阅成功后,CSM1 抛出多次Status, 订阅方会收到所有的State 触发,不会丢失(非CSM中,使用UserEvent 进行订阅) |
+ test16-LosslessRegisterStatusMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ Status 的 Argument, 就是触发后的State 的Argument |
+ 已测试,见test1-LocalExternalStatusRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ 被触发的Status ,可以通过 Argument Info 中获取 Source State Name/ Source module |
+ test7-TestArgumentInfoOfTriggeredState_Status.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ CSM1抛出Interrupt, 可以被订阅到多个模块的多个状态,抛出后全部会自动触发 |
+ test19-1ToNInterruptStatus.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ CSM1抛出Interrupt, 可以在非CSM 中,使用 Interrupt User Event 进行订阅获取,Status User Event 不会触发 |
+ test21-RegisterInterruptFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ CSM1抛出Status, 订阅为 interrupt, 可以在非CSM 中,使用 Interrupt User Event 进行订阅获取,Status User Event 不会触发 |
+ test20-RegisterStatusAsInterruptFromNonCSM.vi
+ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ CSM1抛出Interrupt, 订阅为 Status, 可以在非CSM 中,使用Status User Event 进行订阅获取,Interrupt User Event 不会触发 |
+ test22-RegisterInterruptAsStatusFromNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ CSM1不抛出Status,它的State, 可以通过 Regiseter/Unregister 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 19 |
+ CSM1不抛出Status,它的State, 可以通过 API 在内部、外部,控制Status 触发 CSM2绑定的State |
+ test9-LocalExternalStateRegistrationViaAPI.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 20 |
+ CSM1不抛出Status,它的State, 在外部使用语句订阅时,推出后,订阅关系不会消失 |
+ test29-MappingRelationshipByExternalRegistration_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 21 |
+ CSM1不抛出Status,它的State, 在外部使用API订阅时,推出后,订阅关系不会消失 |
+ test28-MappingRelationshipByExternalRegistration_API_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 22 |
+ CSM1不抛出Status,它的State, 在内部使用语句订阅到本模块的State时:如果明确写出订阅者名字为CSM1,退出后,订阅关系不会消失;如果省略订阅者名字,退出后,订阅关系会自动被移除; |
+ test30-MappingRelationshipByLocalRegistration_WIthSubscriberName_State.vi
+
+test31-MappingRelationshipByLocalRegistration_WIthoutSubscriberName_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 23 |
+ CSM1不抛出Status,它的State, 可以被订阅到多个模块的多个状态,抛出后全部会自动触发 |
+ test10-1ToNBroadcastState.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 24 |
+ CSM1不抛出Status,它的State, 可以在非CSM中,使用UserEvent 进行订阅 |
+ test11-RegisterStatesFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 25 |
+ CSM1/CSM3 不同的State, 可以订阅到 CSM2 的State, 都能触发 CSM2 执行 State |
+ test12-RegisterMultipleStatesToOneState.vi/td>
+ | ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 26 |
+ 订阅时Source Module Name 可以使用 * 作为通配符,一次性订阅多个模块的同一个State,可以取消订阅某一个module 的该State,其他模块的不被影响 |
+ test13-AsteriskWildcardStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 27 |
+ 订阅成功后,CSM1 抛出多次 State, 订阅方会收到所有State 触发,不会丢失 |
+ test17-LosslessRegisterStateMultipleTimes.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 28 |
+ 订阅成功后,CSM1 抛出多次 State, 订阅方会收到所有State 触发,不会丢失(非CSM中,使用UserEvent 进行订阅) |
+ test16-LosslessRegisterStateMultipleTimesNonCSM.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 29 |
+ State 的 Response, 就是触发后的State 的Argument |
+ 已测试,见test8-LocalExternalStateRegistration.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 30 |
+ 被触发的State ,可以通过 Argument Info 中获取 Source State Name/ Source module |
+ test14-TestArgumentInfoOfTriggeredState_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 31 |
+ 将state 订阅为 interrupt, Non-CSM 模式下,只能在interrupt User Event 中获取事件,在 Status User Event 中无法获取队列 |
+ test23-RegisterStatusAsInterruptFromNonCSM_State.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+
+¹:该类的单元测试vi未按照该表格从上至下顺序排序,而是按照实际测试机台,特别是Git CI/CD实际运行机台性能而做的排序。
+
+ 备注:CSM模式包含普通模式、子模块模式、系统级模式、协作者模式、责任链模式、打包项目库模式,CSM1和CSM2之间包含所有可能的CSM模式对应关系。
+ |
+
+
diff --git a/testcases/new/CSM_Unittest_README/Tables/table5_GlobalLog(en-us).md b/testcases/new/CSM_Unittest_README/Tables/table5_GlobalLog(en-us).md
new file mode 100644
index 000000000..334902ab0
--- /dev/null
+++ b/testcases/new/CSM_Unittest_README/Tables/table5_GlobalLog(en-us).md
@@ -0,0 +1,217 @@
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Normal Mode |
+ Submodule Mode |
+ System-Level Mode |
+ Worker Mode |
+ Chain Mode |
+ lvlibp |
+
+
+ | 1 |
+ Module creation and destruction logs (module created/module destroyed) can be obtained through the global log queue, and the number of logs can be checked for correctness |
+ test1-ModuleCreatedDestroyed_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ Module state change logs (state change) can be obtained through the global log queue: sending a message via external API triggers an internal state change in the CSM module. Both the triggering message and the resulting state change can be seen in the global log. |
+ test2-StateChange_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ Subscription and unsubscription logs can be obtained through the global log queue. CSM module names in Worker and Chain modes must not have suffixes. |
+ test3-RegisterUnregister_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ Module message communication logs (message) can be obtained through the global log queue: sending a synchronous message via external API triggers an internal state in CSM1, which then sends a synchronous message to CSM2. Both messages should be strictly logged in the correct format. |
+ test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ Module broadcast logs (broadcast) can be obtained through the global log queue |
+ test5-Broadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ Module high-priority broadcast logs (interrupt) can be obtained through the global log queue |
+ test6-Interrupt_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ Module state broadcast logs (state) can be obtained through the global log queue |
+ test7-StateBroadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ Module custom user message logs can be obtained through the global log queue |
+ test8-UserLog_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ Module Sync/Async/NoRep-Async message logs can be obtained through the global log queue |
+ Tested, see test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ Module creation and destruction logs (module created/module destroyed) can be obtained through global log custom events, and the number of logs can be checked for correctness |
+ test9-ModuleCreatedDestroyed_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ Module state change logs (state change) can be obtained through global log custom events: sending a message via external API triggers an internal state change in the CSM module. Both the triggering message and the resulting state change can be seen in the global log. |
+ test10-StateChange_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ Subscription and unsubscription logs can be obtained through global log custom events. CSM module names in Worker and Chain modes must not have suffixes. |
+ test11-RegisterUnregister_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ Module message communication logs (message) can be obtained through global log custom events |
+ test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ Module broadcast logs (broadcast) can be obtained through global log custom events |
+ test13-Broadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ Module high-priority broadcast logs (interrupt) can be obtained through global log custom events |
+ test14-Interrupt_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ Module state broadcast logs (state) can be obtained through global log custom events |
+ test15-StateBroadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ Module custom user message logs can be obtained through global log custom events |
+ test16-UserLog_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ Module Sync/Async/NoRep-Async message logs can be obtained through global log custom events |
+ Tested, see test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ |
+
+Note: CSM modes include Normal Mode, Submodule Mode, System-Level Mode, Worker Mode, Chain Mode, and lvlibp. All possible CSM mode relationships between CSM1 and CSM2 are included.
+ |
+
+
diff --git a/testcases/new/CSM_Unittest_README/Tables/table5_GlobalLog(zh-cn).md b/testcases/new/CSM_Unittest_README/Tables/table5_GlobalLog(zh-cn).md
new file mode 100644
index 000000000..98d4365cb
--- /dev/null
+++ b/testcases/new/CSM_Unittest_README/Tables/table5_GlobalLog(zh-cn).md
@@ -0,0 +1,217 @@
+
+
+ | 测试项序号 |
+ 测试项内容 |
+ 对应测试项VI |
+ 普通模式 |
+ 子模块模式 |
+ 系统级模式 |
+ 协作者模式 |
+ 责任链模式 |
+ 打包项目库模式 |
+
+
+ | 1 |
+ 可以通过全局日志队列获取模块创建和销毁的日志(module created/module destroyed),并检查日志数量是否符合预期 |
+ test1-ModuleCreatedDestroyed_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 2 |
+ 可以通过全局日志队列获取模块状态轮转的日志(state change): 通过外部API发送一条消息触发CSM模块内部状态变化(State Change), 可以在全局日志里既看到触发消息的日志,又可以看到被触发的状态变化 |
+ test2-StateChange_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 3 |
+ 可以通过全局日志队列获取订阅、取消订阅的日志, 协作者和责任链模式的CSM模块名不能带有后缀 |
+ test3-RegisterUnregister_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 4 |
+ 可以通过全局日志队列获得模块消息通讯的日志(messasge): 通过外部API发送一条同步消息触发CSM1模块内部状态,该内部状态里再发送一条同步消息给CSM2,检查这两条特定消息都按照严格的格式记录在日志里。 |
+ test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 5 |
+ 可以通过全局日志队列获得模块发布广播的日志(broadcast) |
+ test5-Broadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 6 |
+ 可以通过全局日志队列获得模块发布高优先级广播的日志(interrupt) |
+ test6-Interrupt_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 7 |
+ 可以通过全局日志队列获得模块状态广播(state)的日志 |
+ test7-StateBroadcast_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 8 |
+ 可以通过全局日志队列获得模块自定义用户消息的日志 |
+ test8-UserLog_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 9 |
+ 可以通过全局日志队列获得模块Sync/Async/NoRep-Async消息的日志 |
+ 已测试,见test4-Message_Queue.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 10 |
+ 可以通过全局日志自定义事件获取模块创建和销毁的日志(module created/module destroyed),并检查日志数量是否符合预期 |
+ test9-ModuleCreatedDestroyed_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 11 |
+ 可以通过全局日志自定义事件获取模块状态轮转的日志(state change): 通过外部API发送一条消息触发CSM模块内部状态变化(State Change), 可以在全局日志里既看到触发消息的日志,又可以看到被触发的状态变化 |
+ test10-StateChange_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 12 |
+ 可以通过全局日志自定义事件获取订阅、取消订阅的日志, 协作者和责任链模式的CSM模块名不能带有后缀 |
+ test11-RegisterUnregister_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 13 |
+ 可以通过全局日志自定义事件获得模块消息通讯的日志(messasge) |
+ test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 14 |
+ 可以通过全局日志自定义事件获得模块发布广播的日志(broadcast) |
+ test13-Broadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 15 |
+ 可以通过全局日志自定义事件获得模块发布高优先级广播的日志(interrupt) |
+ test14-Interrupt_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 16 |
+ 可以通过全局日志自定义事件获得模块状态广播(state)的日志 |
+ test15-StateBroadcast_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 17 |
+ 可以通过全局日志自定义事件获得模块自定义用户消息的日志 |
+ test16-UserLog_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ | 18 |
+ 可以通过全局日志自定义事件获得模块Sync/Async/NoRep-Async消息的日志 |
+ 已测试,见test12-Message_Event.vi |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+ ✔ |
+
+
+ |
+
+备注:CSM模式包含普通模式、子模块模式、系统级模式、协作者模式、责任链模式、打包项目库模式,CSM1和CSM2之间包含所有可能的CSM模式对应关系。
+ |
+
+
diff --git a/testcases/new/CSM_Unittest_README/Tables/table6_SystemLevelModule(en-us).md b/testcases/new/CSM_Unittest_README/Tables/table6_SystemLevelModule(en-us).md
new file mode 100644
index 000000000..f6fadaf7c
--- /dev/null
+++ b/testcases/new/CSM_Unittest_README/Tables/table6_SystemLevelModule(en-us).md
@@ -0,0 +1,35 @@
+
+
+ | Test Case No. |
+ Test Case Description |
+ Test Case VI |
+ Chain Mode |
+
+
+ | 1 |
+ All nodes share the same CSM Attribute data space. Data written externally is read identically by all internal modules. |
+ test1-AllChainNodesShareTheSameData.vi |
+ ✔ |
+
+
+ | 2 |
+ Three nodes (A->B->C), each with different Allowed Messages. Messages are sent to the corresponding allowed module; using the API to send synchronous messages returns the correct parameters. |
+ test2-DifferentChainNodesProcessDifferentAllowedMessages.vi |
+ ✔ |
+
+
+ | 3 |
+ Three nodes (A->B->C), with Allowed Messages combinations of AB, BC, AC, and ABC. Messages should be executed by the first node in the chain. Using the API to send synchronous messages returns the correct parameters. |
+ test3-FirstChainNodeProcessesAllowedMessages.vi |
+ ✔ |
+
+
+ | 4 |
+ Three nodes (A->B->C), with Allowed Messages defined. If no module can execute the message, the sender reports an error. |
+ test4-EndNodeHandlesErrorForNotAllowedMessages.vi |
+ ✔ |
+
+
+ | 5 |
+ Three nodes (A->B->C), each node broadcasts a message. After subscribing, the corresponding module's API is triggered; after unsubscribing, none can be triggered. |
+ test5-ChainNodeBroadcast.vi |
+ ✔ |
+
+
+ | 6 |
+ Three nodes (A->B->C). If the "Macro: Exit" command does not specify a node (i.e., uses the core name without the $ suffix), nodes should exit in order from the end to the head of the chain. If the command specifies a node, only that node exits and others are unaffected. |
+ test6-ChainNodeExitSequenceCheck.vi |
+ ✔ |
+
+
+
+
diff --git a/testcases/new/CSM_Unittest_README/Tables/table9_ChainMode(zh-cn).md b/testcases/new/CSM_Unittest_README/Tables/table9_ChainMode(zh-cn).md
new file mode 100644
index 000000000..7572e5723
--- /dev/null
+++ b/testcases/new/CSM_Unittest_README/Tables/table9_ChainMode(zh-cn).md
@@ -0,0 +1,46 @@
+