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

Simple example of colcon test

asked 2020-04-26 19:54:06 -0500

Kansai gravatar image

I am just starting to use ROS2. I have built a talker and a listener.

I also have a much more complex project that I have to understand.

so far I have understood about colcon build, but I would really appreciate if someone can point me to a simple way to use colcon test.

What is the general procedure if say I write a talker and listener in C++ and want to do some testing? Do my test have to be written in C++? or python?

I believe the way to understand complex things is to start simple so I would appreciate some help here. Later perhaps I could ask more specific questions.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-27 13:58:44 -0500

Dirk Thomas gravatar image

colcon test simply invokes the tests of the package. For CMake-based packages that is using CTest, for Python packages it is pytest. For tests involving more than one executable you probably want to look into launch_testing(https://github.com/ros2/launch/tree/m...) and launch_testing_ros(https://github.com/ros2/launch_ros/tr...).

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-04-26 19:54:06 -0500

Seen: 2,240 times

Last updated: Apr 26 '20