Questions tagged [unit-testing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Console output with `catkin make_tests` for ROS1

I'm running some C++ unit tests in CI with catkin run_tests my_pkg I wanted to collect the unit tests' output (INFO or higher), similar to when we run ...
BlueMoon93's user avatar
1 vote
1 answer
17 views

Cannot import modules when running unit tests with catkin_make run_tests in ROS noetic with python3

I am trying to write unit tests for my ROS node in python and cannot import files from my src/ directory even though I believe I have configured everything correctly. I will walk through my problem to ...
jheaton's user avatar
  • 21
0 votes
1 answer
30 views

Mocking ros::Time::now in rostest/gtest

I am running the tests for my ROS C++ node using rostest/gtest. Currently I have a problem where I have a class method that I need/want to test that out of date data based on the value of ...
Ricardo Marques's user avatar
0 votes
1 answer
31 views

Mocking call to third-party module from Publisher

I have just started working with ROS2 in python on an existing project and have to write unit tests to begin with. The production code will run on a raspberry pi, but testing is being done in an ...
Nick's user avatar
  • 101
0 votes
0 answers
15 views

How do I use catkin_download_test_data() correctly to run rostests?

I have a working rostest which I was running against a bagfile of image data. Earlier I had stored it in my git package but since its a big file I am thinking of storing the bag file in cloud and ...
nebula's user avatar
  • 1
1 vote
0 answers
45 views

How should a small robotics startup go about building a data platform?

We're a small company making ROS based robots that rely heavily on SLAM and perception. We're looking for a data platform solution, something like Foxglove or formant.io as a base data management tool,...
user36880's user avatar
0 votes
0 answers
26 views

Why does `launch_test` result show "Ran 0 tests in 0.000 s" after running a test?

I am not the original poster, but I would like to continue the discussion about this question asked on answers.ros.org. I am trying to write an integration test to test the ROS API of a node I am ...
LastStarDust's user avatar
0 votes
0 answers
96 views

colcon test returning return code 5 even though tests aren't failing

When running python tests using colcon, the run_test.py return code is 5, leading to overall test failures. The test file contains 10 tests, none of them marked as ...
Hugo Louis Seize's user avatar
0 votes
0 answers
31 views

how to manage a timer in a pytest?

I've got a Node that publish a message in a timer. The code works fine but I want to write a pytest to ensure the message is published. My test code is this one ...
SebL's user avatar
  • 51
0 votes
1 answer
15 views

Enforce consecutive execution order for gtest and rostest

My ROS package contains two test executables, one gtest and one rostest. They are specified in the CMakeLists as, catkin_add_gtest(...) and ...
user avatar
0 votes
1 answer
7 views

How can I integrate Python rosunit unit tests into the cmake build?

I would like to run rosunit Python unit tests as part of make test in the CI environment. In the wiki and in the catkin docs it ...
user avatar
0 votes
1 answer
59 views

How to best call catkin_add_gtest and add_rostest_gtest separately?

I'm trying to test ROS code at two different levels (calling catkin_add_gtest and add_rostest_gtest separately), and I haven't ...
user avatar
0 votes
1 answer
7 views

catkin_make test fails due to undefined reference gtest help

Hi helpful ROS answer-ers, Due to a recent epiphany I have hopped aboard the TDD train, so to give you some context I am pretty new to working with unit testing frameworks, in particular gtest. I ...
user avatar
1 vote
2 answers
29 views

rostest & Python - Multiple Test Fixtures In Single File

With integration testing and rostest with Python, is it possible to define multiple test fixtures (classes inheriting from unittest.TestCase) and run them from a ...
user avatar
0 votes
1 answer
2 views

Is there a Catkin unit test report XMLT (for pretty printing)?

Has anybody come up with XMLT files to convert gtest/nosetest XML reports to a more human-readable form? I find it hard to tell at a glance if all tests passed, so something condensed and uniform ...
user avatar
0 votes
2 answers
3 views

rosmake + make test? Automated testing?

I am wondering how I could automate the build of my unit tests. Because right now I have to call make test in every package. But I would like to automate this, to ...
user avatar
0 votes
1 answer
13 views

No executables generated by building unit test cpp with catkin

I'm trying to build by using catkin my gtest testsuite. catkin_add_gtest replaces ...
IsaacS's user avatar
  • 4,502
0 votes
1 answer
7 views

Where is catkin_add_nosetests() documented?

Apparently, that is the catkin way to run Python unit tests. I can't find any documentation for it via Google. UPDATE: For future reference: Dirk found it under Development Documentation. Originally ...
user avatar
0 votes
1 answer
2 views

how to run gtest unit in groovy

I have built laser_geometry with catkin, no error. as discription in ros wiki about gtest. It will generate a runable test. But there is nothing. How do I test the package? Someone has used this ...
user avatar
1 vote
1 answer
9 views

How do I run unit tests for a catkin package?

The camera_info_manager package was converted to catkin, but I suspect an error: rostest is listed as a <build_depend> and a ...
user avatar
0 votes
1 answer
1 view

Configure ROSTest + Hudson for individual bug reports?

Hey gang, Since I notice that Willow Garage is using Hudson for managing their build process, I was hoping somebody could help me understand if there's a way to set up my own Hudson (which I've done) ...
user avatar
0 votes
1 answer
10 views

gtest fuerte undefined reference when linking

Hey all, After upgrading to ubuntu precise and fuerte I have a problem when linking my unit tests based on gtest. I get an undefined reference to pthread_key_create (see below). Seems this is a ...
user avatar
0 votes
1 answer
4 views

rostest kills roscore

I created a gtest test class for obvious reasons. I made the necessary adjustments to CMakefile.txt, and the package builds both the node and test executables fine. When I run 'make test', the tests ...
user avatar