ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Self-answering as I figured it out. Test case file needs to be started like the following code as mentioned in unittest#unittest_code wiki page.

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

Self-answering as I figured it out. Test case file needs to be started like the following code as mentioned in unittest#unittest_code wiki page.

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

Took me a few hours as no direct error output wasn't printed anywhere AFAICT...

Self-answering as I figured it out. Test case file needs to be started by rostest.rosrun like the following code as mentioned in unittest#unittest_code wiki page.

if __name__ == '__main__':
    import rostest
    rostest.rosrun(PKG, 'test_a_node', TestClassA)

Took me a few hours as no direct error output wasn't printed anywhere AFAICT...