title: How to create one "unit" test per query to display the result in the Test Explorer
body: <p>Right now my job is to test all the queries stored in a database, and display the result in the <em>Test Explorer</em>, I've managed to test every query (I just run it, check for errors and store a custom error message for each error in a text file so it work for now but the output is not as I want it to be).</p>
  
  <p><strong>DISCLAMER</strong><br>
  I guess unit testing may not be the smartest way to test the queries but that is the way i was asked to do it so I'm giving it a try.</p>
  
  <p>The thing is that I test all queries within one <code>[TestMethod]</code> and the result look like this : (only one test method in the <em>Test Explorer</em>)</p>
  
  <p><a href="https://i.stack.imgur.com/cCFrK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cCFrK.png" alt="Test explorer result"></a></p>
  
  <p>But I would want to know if it is possible to have multiple <code>[TestMethod]</code>, so we can see which methods work and which don't within the <em>Test Explorer</em>.</p>
  
  <p><a href="https://i.stack.imgur.com/ARRj8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ARRj8.png" alt="Test explorer result 2"></a></p>
  
  <p>My researches led me to this code :</p>
  
  <pre><code>[TestMethod]
  [DataSource("System.Data.SqlClient",
              @"Data Source=****;Initial Catalog=****;Persist Security Info=True;User ID=sa;Password=****;Pooling=False",
              "Query",
              DataAccessMethod.Sequential)]    // My DataSource works
  public void MyTestMethod()
  {
          var q = new QueryDto
          {
              // Create my query with the Id, Name, Query, Parameters...
          };
  
          ExecTest(q);
  }
  
  public void ExecTest(QueryDto query)
  {
         // my testing here
  }
  </code></pre>
  
  <p>I've tried adding <code>[TestMethod]</code> to the <code>ExecTest()</code> method but it did not helped very much with what I'm trying to achieve.</p>
  
  <p>So please tell me if what I'm looking for is <strong>possible</strong>, and if it is, how to do it.</p>
  
  <p>Feel free to ask questions \ edit I'll stay tuned so you don't have to wait if you try to help me.</p>
  
  <h2>EDIT</h2>
  
  <p>I'm posting another question because this one have some mistakes
  Thanks for the help btw ^^.</p>