Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What is the difference between rosunit and rostest?

About rostest: Integration test suite based on roslaunch

About rosunit: an internal tool for running unit tests within ROS

But than there is an example of unit test being run by rostest.

#!/usr/bin/env python
PKG = 'test_roslaunch'
import roslib; roslib.load_manifest(PKG)  # This line is not needed with Catkin.

import sys
import unittest

## A sample python unit test
class TestBareBones(unittest.TestCase):
    ## test 1 == 1
    def test_one_equals_one(self): # only functions with 'test_'-prefix will be run!
        self.assertEquals(1, 1, "1!=1")

if __name__ == '__main__':
    import rostest
    rostest.rosrun(PKG, 'test_bare_bones', TestBareBones)

I'm confused. What are the differences between rosunit and rostest? What are usecases for each of them?

What is the difference between rosunit and rostest?

About rostest: Integration test suite based on roslaunch

About rosunit: an internal tool for running unit tests within ROS

But than then there is an example of unit test being run by rostest.

#!/usr/bin/env python
PKG = 'test_roslaunch'
import roslib; roslib.load_manifest(PKG)  # This line is not needed with Catkin.

import sys
import unittest

## A sample python unit test
class TestBareBones(unittest.TestCase):
    ## test 1 == 1
    def test_one_equals_one(self): # only functions with 'test_'-prefix will be run!
        self.assertEquals(1, 1, "1!=1")

if __name__ == '__main__':
    import rostest
    rostest.rosrun(PKG, 'test_bare_bones', TestBareBones)

I'm confused. What are the differences between rosunit and rostest? What are usecases for each of them?