ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

Catkin: run specific unit test

I know there are specific test commands
catkin_make run_tests to run all tests
catkin_make run_tests_<projectname>_gtest_<testname> to run specific test declared by catkin_add_gtest(…)

One test file can have multiple tests though.

TEST(testsuit1, test1) {

TEST(testsuit1, test2) {

TEST(testsuit2, test3) {

int main(int argc, char **argv) {
    testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();

Is that possible to run only testsuit1 or only test3 from my example?

Thanks for your question. However we ask that you please ask questions on following our support guidelines:

ROS Discourse is for news and general interest discussions. ROS Answers provides a forum which can be filtered by tags to make sure the relevant people can find and/or answer the question, and not overload everyone with hundreds of posts.

Sorry. I moved my question there. I din’t find how to close this one though.

Thanks. I moved the thread to “Uncategorized” to decrease the number of people getting notifications I could close the topic as an administrator but I don’t expect many replies to come along.

For others reference the question is now here: