Robotics StackExchange | Archived questions

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:

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.

Asked by roboticom314 on 2016-07-22 17:43:03 UTC

Comments

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.

Asked by alextoind on 2017-01-13 09:07:25 UTC

Answers

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

Asked by 130s on 2018-09-19 13:51:48 UTC

Comments