Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
danjapro
Starting Member
44 Posts |
Posted - 2006-08-25 : 11:51:57
|
I need to be able to loop through each Invoice number, but it olny loops over the dame invoice number, which is the first invoice number:[CODE]Public Overrides Sub Run() 'Checks that all invoices are present Dim i As Integer = 0 Dim request1 As WebTestRequest = New WebTestRequest("http://template.qa.stratix.biz/Shared%20Documents/invoice.aspx") 'request1.ThinkTime = 9 Do Until i = 20 request1.QueryStringParameters.Add("0", Me.Context("sVisionNG1.InvoiceDetail.InvoiceNumber").ToString, False, True) MyBase.Send(request1) Dim request2 As WebTestRequest = New WebTestRequest("http://template.qa.stratix.biz/Shared%20Documents/invoices.aspx") MyBase.Send(request2) i = i + 1 Loop End Sub End ClassEnd Namespace |
|
dfiala
Posting Yak Master
116 Posts |
Posted - 2006-08-29 : 13:58:49
|
Where are you changing your invoice number? You are sending the same info in each request.>>request1.QueryStringParameters.Add("0", Me.Context("sVisionNG1.InvoiceDetail.InvoiceNumber").ToString, False, True)My guess is you want something like this....Dim ContextKey as stringDim request1 As WebTestRequestFor i = 0 to 20 request1 = New WebTestRequest("http://template.qa.stratix.biz/Shared%20Documents/invoice.aspx") ContextKey = String.Format("sVisionNG{0}.InvoiceDetail.InvoiceNumber", i+1) request1.QueryStringParameters.Add("0", Me.Context(ContextKey).ToString, False, True) MyBase.Send(request1)NextDean FialaVery Practical Software, IncNow with Blogging...http://www.vpsw.com/blogbabyMicrosoft MVP |
 |
|
|
|
|
|
|