Ask Your Question

mock unit test framework for ROS

asked 2016-07-22 17:43:03 -0500

roboticom314 gravatar image

Is there a preferred framework for mocks in unit testing for ROS? It would seem that gmock would be used since gtest is the preferred framework for C++ unit testing. However, I've seen the following posts:

I'm assuming since unit tests are required for submission that some packages must have used some other mock framework or created their own mocks and/or stubs. It at least looks like RVIZ has created custom mock classes.

Any thoughts or ideas are appreciated.

edit retag flag offensive close merge delete


I'm using gmock in a way similar as @otamachan, but on Ubuntu 16.04 with ROS kinetic the paths are a bit different from the ones proposed in the other answer (gmock has been separated from gtest like on other linux distributions). Nonetheless the issue is still open.

alextoind gravatar imagealextoind ( 2017-01-13 08:07:25 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-19 13:51:48 -0500

130s gravatar image

Support for GMock was later added in ros/catkin#897.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-07-22 17:43:03 -0500

Seen: 540 times

Last updated: Sep 19 '18