ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ros2 unit testing

asked 2022-07-06 02:29:13 -0500

MaxDio gravatar image

Hi there,

I am new to automated testing and I find it quite difficult to find a resource to write my first unit test for CPP files. Is there a tutorial with the general procedure (What commands?: just colcon test??, How should the Cmakelists.txt and the test.cpp look like?) or a minimal framework I can have a look at?

I would really appreciate the help. Thanks a lot.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-07-06 09:22:37 -0500

ljaniec gravatar image

You can try to base your tests on the nav2_system_tests like there, they use gtests.

E.g. planning folder has a nice example here:

https://github.com/ros-planning/navig...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-07-06 02:29:13 -0500

Seen: 128 times

Last updated: Jul 06 '22