# Error while test codes with rostest

Hello. I am a newbie on ROS. I tried to test some codes with rostest, but error occured. Would you give me some clues to fix it? Thank you. The error message is:

mech-user@test1-pc:~/2015-soft3/20150930/src/beginner_tutorial\$ rostest ./check1.test
... logging to /home/mech-user/.ros/log/rostest-test1-pc-7453.log
[ROSUNIT] Outputting test results to /home/mech-user/.ros/test_results/beginner_tutorial/rostest-check1.xml
testtalker_listener ... FAILURE!
FAILURE: Test Fixture Nodes ['talker', 'listener'] failed to launch
File "/usr/lib/python2.7/unittest/case.py", line 331, in run
testMethod()
File "/opt/ros/indigo/lib/python2.7/dist-packages/rostest/runner.py", line 120, in fn
self.assert_(not failed, "Test Fixture Nodes %s failed to launch"%failed)
File "/usr/lib/python2.7/unittest/case.py", line 424, in assertTrue
raise self.failureException(msg)
--------------------------------------------------------------------------------

[ROSTEST]-----------------------------------------------------------------------

[testtalker_listener][failed]

SUMMARY
* RESULT: FAIL
* TESTS: 0
* ERRORS: 0
* FAILURES: 1

ERROR: The following tests failed to run:
* testtalker_listener

rostest log file is in /home/mech-user/.ros/log/rostest-test1-pc-7453.log

edit retag close merge delete

1

It looks like there's an error in your test file. Please edit your question to include your check1.test file.

( 2015-10-13 14:42:47 -0500 )edit

Sort by » oldest newest most voted

Yes, I didn't have authority of test files. I solve the problem with chmod -x . I appreciate for your concern.

more

OP seems to have solved the issue already. I add some info in case this helps future readers since I was just stuck with this error for a few hours.

Test Fixture Nodes ['talker', 'listener']


The listed names are the nodes' name, the ones that are specified in .launch or in .test file as name. Note as it states fixture, these nodes are not necessarily the ones testcases are defined in; these can be the ones to setup the environment for the tests.

(In my case because the node name was used in other places in my package multiple times, which is apprently a bad habit though, and because I didn't pay attention to this error message that clearly stated as "fixture", it was difficult to boil down the root cause.)

I thought I'd improve rostest code, but after taking a look at it, I concluded that actually the error message succintly provides enough info so I decided not to suggest any change.

more