title: Is it O.K. to use global data for multiple tests in the TDD cycle within the Google Test framework?
body: <p>I have just started using Gtest, and I am writing tests that look like this: </p>
  
  <pre><code>TEST(testFamily, specificTest) {
       initData data; 
       ASSERT_TRUE(boolean_algorithm(data)); 
  }
  </code></pre>
  
  <p>The problem is that my testing code gets unnecesarily bloated because I have a lot of tests that can use the same data, so the line:</p>
  
  <pre><code> initData data; 
  </code></pre>
  
  <p>shouldn't be repeated for each test. I know that tests should be independent of each other and in that aspect, using something like a constant global</p>
  
  <pre><code>const initData data; 
  </code></pre>
  
  <p>brings questions like "Are you sure your tests won't modify the global test data?". Should i keep initializing the same test configuration for each test? Sometimes the initialized test data requires much more code than one line.... </p>