Any good examples of ros unittests?
Hi all,
I have started to write some unittests in Python for my nodes and I would like to use existing tests as a model.
I have some experience with GTest (a little less with Python's unittest) but I had never tried to integrate my tests with ROS. Some questions for which I did not find answers in the documentation are: what kind of things should be tested in rostest level? parameters? subscriptions? the code itself? And how are these usually tested? For instance, are the parameters loaded in the rostest launch file or in your Python/C++ code? Even more, how Node-Level and Code-Level tests should be integrated?
I am looking for tests that could help me with the understanding of these concepts (and that maybe could be used as examples in the unittest's tutorials section).
Edit
To sum up my question, I am looking for examples of python's unittest that could be good candidates to put them in the tutorials section (http://wiki.ros.org/unittest) In essence these examples should illustrate proper ways of using unittest to test the correctness of your nodes. Eg: loading/setting parameters, initialization, publishers/subscribers, etc.