title: GoogleTest Parameterized Test - Possible To Call SetUp And TearDown Between Parameters?
body: <p>I have a gtest parameterized class that I would like to call some SetUp and TearDown in between each parameter. I know googletest offers SetUp which is before each test case and SetUpTestCase which is before ALL test cases.</p>
  
  <p>I have something like this:</p>
  
  <pre><code>class MyParameterizedTest: public TestWithParam&lt;MyParams&gt;
  {
  public:
     MyParameterizedTest() {}
  
     void SetUp()
     {
        //called before every test case
     }
  
     void TearDown()
     {
        //called after every test case
     }
  
     static void SetUpTestCase()
     {
        //called at the begining of framework and before all test cases
     }
  
     static void TearDownTestCase()
     {
        //called at the end of the framework and after all test cases
     }
  
     //Wishing for something like:
     // void SetUpParameter()
     {
        //called before start of parameter
     }
  };
  
  INSTANTIATE_TEST_CASE_P(RegistrationTest, InterfaceTest, ValuesIn(AllTheValues::GetAllMyParams()));
  </code></pre>
  
  <p>Any thoughts on a way make this work? Maybe a way to see when the last test case has been run for a particular parameter? Or will I have to instantiate a test case for every individual parameter? </p>