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

google test in fuerte

asked 2013-06-17 15:24:32 -0600

somudrog gravatar image

What's the recommended best way to integrate Google Test with fuerte/rosmake? I've looked at the wiki pages for gtest, rostest and rosunit, but I'm not sure which is the most up to date/best to use. Also, is there a good tutorial on how to set everything up and write a unit test in ROS?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-06-17 17:27:44 -0600

tfoote gravatar image

In general you should right unit tests using gtest directly. You will then just need to register them as unit tests with the buildsystem (rosbuild or catkin)

rosunit is a test runner which we use in the continuous integration process, but it requires gtest compatible unit tests. As a developer you can use it to run your tests, but it's not part of how you consider running your unit tests.

rostest is how you can write tests which run multiple processes and test ROS based communications. Within a rostest you should have a gtest node which is doing asserts, and other modules to fill out the other side of the communications. There's good focused tutorials for rostest on it's homepage.

edit flag offensive delete link more

Question Tools


Asked: 2013-06-17 15:24:32 -0600

Seen: 216 times

Last updated: Jun 17 '13