1

I use googletest for C++ unit testing. I have defined multiple classes deriving from ::testing::Test, each of which has multiple test functions defined with TEST_F.

I run them all with

int main(int argc, char **argv) {

    ::testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();

}

When debugging, I'd like to focus on a specific test case. Is it possible to run only a specific Test or TEST_F?

clstaudt
  • 21,436
  • 45
  • 156
  • 239

1 Answers1

3

you can use the gtests command line option --gtest_filter wehen invoking the executable for the debugging session. @see Running a Subset of the Tests

Community
  • 1
  • 1
Nicoretti
  • 1,067
  • 1
  • 8
  • 9