[Discourse.ros.org] [Next Generation ROS] Grey-box node/nodelet unit testing with ROS2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] Grey-box node/nodelet unit testing with ROS2

Saurabh Bansal via ros-users


Is it possible to implement grey-box unit tests for nodes/nodelets with the built-in test infrastructure of ROS2?

A [grey-box test](https://en.wikipedia.org/wiki/Gray_box_testing) is a mixture of a black-box and a white-box test. I would consider e.g. supplying a node with input data via its interface (actions, services, topics, parameters) and assert something in the nodes library level (e.g. if mocked functions in the nodes library level have been called) as node grey-box test. (In a black-box node test the output data is captured via the nodes interface only and asserted in test nodes. In a white-box node test the nodes library level code is verified separate from the nodes interface.)





---
[Visit Topic](https://discourse.ros.org/t/grey-box-node-nodelet-unit-testing-with-ros2/3037/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] Grey-box node/nodelet unit testing with ROS2

Saurabh Bansal via ros-users


I am not sure I understand your use case and "grey-box tests" enough. In order to use mock functions I assume you will compile a custom version of component. You should then be able to use that in test however you like.

It would probably best if you try to implement a simple test as you have it in mind using the ROS 2 tools. If you run into problems please don't hesitate to ask and we are happy to help.





---
[Visit Topic](https://discourse.ros.org/t/grey-box-node-nodelet-unit-testing-with-ros2/3037/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>