ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

Revised tutorial on automatic testing of ROS code, packages and applications


I just revised our entry-level testing overview tutorial at: . Please have a look, and make any corrections necessary, or complain here to me. Also, share it with all your collaborators, who you think, do not test enough!

This is a part of a larger effort that we started to overhaul, extend and complete ROS QA resources, to encourage industrial use of ROS. We code name it “Quality Hub”: For now there is very little, but we hope that others will jump on it, and we will improve the situation substantially, creating a handbook for professional use of ROS for high quality long lasting systems.

I was considering moving this tutorial to http://wiki.ros.og/Quality/Tutorials/UnitTesting (possibly with a redirect, I hope that moin wiki has some mechanism for that). This would help the centralization and navigation of quality resources. But this article is so old originally, that I am a bit hesitant to do it, without a broader opinion. So please comment on the idea of moving with a redirect as well.

PS. If you wonder what changes I did: I made the writing a bit slower, so that it provides more context, added a broader analysis of benefits, discussed costs, added an example, and provided a few more guidelines, and more links to other resources (some still dangling, but we are working on them).

ROSCon 2018 Talk Idea Brainstorm

You can move the page using the “Rename” menu item in the right side bar. When you do though. Please also replace the existing page with a #redirect directive to keep the old link alive. See HelpOnProcessingInstructions for syntax.


+1 for improving testing documentation. I like your rewrite of UnitTesting. I think it correctly identifies that both gtest and rostest are needed for UnitTesting, whereas the original pages on gtest and rostest implied that gtest was for unit testing and rostest for subsystem testing. In practice, even if you’re unit testing a single module, you’re likely to need e.g. rosparams at a minimum, and maybe ros messages from a test harness, and you don’t get any of that with gtest because it doesn’t start roscore. Yet rostest has difficulties that I haven’t (yet) found a solution to: how to run individual unit tests, how to look at ROS_INFO etc prints while subtests run. I look forward to improvements to rostest, and will contribute as I’m able.



Thanks. It took longer than acceptable, but I did move it (and redirected) now. Looking for a new article to revise right now :smiley: