Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
Tools using : C++, Visual Studio 2010, Google Test Framework
Hello Friends,
I am trying to write a functiones_1 /method for my project, which will ask to user which all test cases are you going to run? It looks like below...,
         | on
         | on
.... on
         | on
So, now the challenge is while running the project it should prompt me what all test cases you would like to execute? If I select
. Then it should execute these two test cases and should exclude all other from
Test_Cases_2 to .....
In result window also I would like to see the results of Test_Cases_1 and Test_Cases_N.
So, if I will see the GoogleTest, there is a method called test_case_to_run_count(); But all the test cases are getting registered with
method. So, I did lots of analysis, but still did not find any solution. Please help me.
My aim is to have a GUI, which will have the Tree of TestCases and TestNos. User will select the TestCases/TestNos to execute. So, how to do it?
Posted 22-Aug-12 9:21am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

int main(int argc, char **argv) 
int i = 1;        
 vector<string> str;        
for(i = 0; i != str.size(); i++)         
::testing::GTEST_FLAG(filter) =;              
InitGoogleTest(&argc, argv);              
// getchar();        
} </string>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 530
1 Sergey Alexandrovich Kryukov 340
2 BillWoodruff 259
3 PIEBALDconsult 230
4 CPallini 220
0 Sergey Alexandrovich Kryukov 10,615
1 Maciej Los 5,354
2 OriginalGriff 5,254
3 CPallini 3,719
4 BillWoodruff 3,476

Advertise | Privacy | Mobile
Web01 | 2.8.141029.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100