title: how to add coded Web performance test to a load test in visual studio 2012
body: <p>I wrote a <code>webtest</code> that calls a web-service with query-string.</p>
  
  <p>I want to create a load-test that will execute this webtest ith different query-string on every request (from pre-definied values pool).</p>
  
  <p>I didn't manage to do it with the regualt <code>webtest</code> file (anyone knows how?)</p>
  
  <p>So I converted this <code>webtest</code> to <code>coded WPT</code>.</p>
  
  <p>I edited the code and it looks like this:</p>
  
  <p>public class KnownCtidsTest : WebTest
      {</p>
  
  <pre><code>    public List&lt;string&gt; KnownCtids { get; set; }
  
      public KnownCtidsTest()
      {
          this.PreAuthenticate = true;
  
          KnownCtids = new List&lt;string&gt;()
          {
              "ctelad1", "ctelad2", "ctelad3"
          };
      }
  
      public override IEnumerator&lt;WebTestRequest&gt; GetRequestEnumerator()
      {
          WebTestRequest request1 = new WebTestRequest("http://clientservice.mam.qasite-services.com/settings");
  
          request1.Method = "POST";
  
          var random = new Random();
  
          int i = random.Next(0,KnownCtids.Count);
  
          var ctid = KnownCtids[i];
  
          request1.QueryStringParameters.Add("ctid", ctid, false, false);
          StringHttpBody request1Body = new StringHttpBody();
          request1Body.ContentType = "";
          request1Body.InsertByteOrderMark = false;
          request1Body.BodyString = "";
          request1.Body = request1Body;
          yield return request1;
          request1 = null;
      }
  }
  </code></pre>
  
  <p>Now, I try to add this coded test to the load-test (under <code>test mixture</code>)
  but it doesn't show the <code>coded test</code> only the <code>web test</code>.</p>
  
  <p>How can I still run my custom coded test in loadtest?</p>