robosoft-ai / SMACC2

An Event-Driven, Asynchronous, Behavioral State Machine Library for ROS2 (Robotic Operating System) applications written in C++
https://smacc.dev
Apache License 2.0
237 stars 40 forks source link

Unit and Integration Testing in SMACC2 #550

Open NithishkumarS opened 3 months ago

NithishkumarS commented 3 months ago

I have been exploring the SMACC2 framework and am looking for some guidance on the best practices for testing, specifically regarding unit testing and functional testing. I have a few questions:

Unit Testing:

1.How should unit tests be structured in SMACC2, especially when there are dependencies on orthogonals, clients, or other components?

  1. Are there any recommended approaches or tools for mocking these dependencies to isolate the unit under test?

Integration Testing:

  1. What is the recommended way to conduct functional tests that involve multiple orthogonals, clients, and their interactions?
  2. How can transitions between states be tested effectively in a functional test? Are there specific frameworks or tools that are particularly useful for this purpose in the context of SMACC2?

Any examples, documentation, or tips you can provide would be greatly appreciated. Thank you for your support.

Environment (please complete the following information):

ROS DETAILS

NithishkumarS commented 1 month ago

Are there any recommendations for testing in SMACC2?