mock unit test framework for ROS
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:
- http://answers.ros.org/question/19968... (seems like @otamachan found a solution?)
- https://github.com/ros/catkin/issues/699 (Is this really resolved?)
- https://github.com/ros/catkin/pull/708 (Doesn't look like it was ever merged)
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.
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 fromgtest
like on other linux distributions). Nonetheless the issue is still open.