Why does catkin run_tests run without a error but rostest not?
I created a testnode in a package mypackage which tests some other nodes.
If I execute catkin run_tests my_package
all tests run flawlessly.
If I execute rostest my_package my_test_file.test
I get the following error:
FAILURE: Test node [mypackagetest] does not exist or is not executable
The testfile mytestfile.test executes the following code:
<test pkg="my_package" test-name="test_mock_node" type="my_package_test"> </test>
Could somebody explain me where the error comes from and how I can fix this?
Asked by Theremin1 on 2022-09-15 05:15:33 UTC
Answers
yea the answer is simple:
After you clean your catkin workspace, of course you have to build your catkin folder and source this workspace. But you also have to build your catkin workspace a second time, which I forgot to do. This is the reason why my_package_test was not found.
catkin clean --yes
catkin build
source devel/setup.bash # or some other source file
catkin build
Asked by Theremin1 on 2022-09-21 04:02:47 UTC
Comments
Today I had the same Error again. Now the problem was that I renamed the executable in my CMake File. The Ros Wiki sazs that there must be a corresponding executable with the same name to the type (here my_package_test) from the launch file. See 1.2.1: http://wiki.ros.org/roslaunch/XML/test
Asked by Theremin1 on 2022-11-16 11:06:35 UTC