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

rostest error: Test Fixture Nodes failed to launch

asked 2015-10-13 09:28:55 -0500

Heecheol Kim gravatar image

updated 2022-01-18 11:53:26 -0500

lucasw gravatar image

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 flag offensive close merge delete

Comments

1

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

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

I got the Test Fixture Nodes error I think because the nodes were from a package not installed on the system (jenkins CI), adding their package to <test_depend> appeared to fix it.

(It seems to be the general rule with automated tests in cloud CI that useful error messages are put somewhere inaccessible like a log file that the user can't access, you can't ssh into CI runner to view them, or in the best case are somewhere in the middle of thousands of lines of CI console output...)

lucasw gravatar image lucasw  ( 2022-01-18 11:48:08 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-10-14 09:57:09 -0500

Heecheol Kim gravatar image

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

edit flag offensive delete link more

Comments

Do you mean chmod +x? -x removes the permission to execute, but it sounds like you needed to add it.

cst0 gravatar image cst0  ( 2022-01-18 13:09:11 -0500 )edit
1

answered 2017-03-25 14:43:55 -0500

130s gravatar image

updated 2017-09-26 13:47:09 -0500

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-10-13 09:27:24 -0500

Seen: 1,939 times

Last updated: Jan 18 '22