I wrote a webtest that calls a web-service with query-string.
I want to create a load-test that will execute this webtest ith different query-string on every request (from pre-definied values pool).
I didn't manage to do it with the regualt webtest file (anyone knows how?)
So I converted this webtest to coded WPT.
I edited the code and it looks like this:
public class KnownCtidsTest : WebTest {
public List<string> KnownCtids { get; set; } public KnownCtidsTest() { this.PreAuthenticate = true; KnownCtids = new List<string>() { "ctelad1", "ctelad2", "ctelad3" }; } public override IEnumerator<WebTestRequest> 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; } } Now, I try to add this coded test to the load-test (under test mixture) but it doesn't show the coded test only the web test.
How can I still run my custom coded test in loadtest?