robofit/arcor

Continuous integration (testing)

Closed this issue · 5 comments

Curently, travis can't check much as there is not much code to compile. It would be good to:

  • write unit tests (at least for the main parts of the system)
  • write ros tests
  • run static analysis -> fail on error
  • launch file testing

http://wiki.ros.org/unittest
https://github.com/hcrlab/wiki/blob/master/software_engineering/unit_testing.md
https://github.com/hcrlab/wiki/blob/master/software_engineering/continuous_integration.md
http://wiki.ros.org/roslint
http://wiki.ros.org/roslaunch (roslaunch_add_file_check)

The roslint test was added to several packages (art_basic_control, art_pr2_grasping, art_projected_gui, art_interface_utils, art_db, art_brain). Others should follow. Moreover, it's not possible to merge PR before tests are finished. If tests (roslint) fails, one can see what's wrong in build log (after_script).

Example unit test created for art_utils/ProgramHelper class (https://github.com/robofit/ar-table-itable/tree/master/art_utils).

Example rostest for art_db: https://github.com/robofit/ar-table-itable/blob/master/art_db/tests/art_db.test. It works well when launched as rostest art_db art_db.test but not so well when launched using catkin_make run_tests (see http://answers.ros.org/question/250056/rostest-fails-when-run-using-catkin_make-run_tests/) - so it's disabled in CMakeLists.txt for now.

Launching of rostests resolved: ros/catkin#841. Switched to catkin_make_isolated on travis.