The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
ThreadedWebTest::Run Method ()
When overridden in a derived class, runs the coded Web performance test of the user.
Assembly: Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
This method is the core component of a ThreadedWebTest.
Legacy Code Example
The following example shows the Run method that is used by the test engine to run a test.
Option Strict Off Option Explicit On Imports Microsoft.VisualStudio.TestTools.WebTesting Imports Microsoft.VisualStudio.TestTools.WebTesting.Rules Imports System Imports System.Collections.Generic Namespace TestProject2 Public Class MyCodedWebTest Inherits ThreadedWebTest Public Sub New() MyBase.New Me.PreAuthenticate = true // TODO: specify your proxy below Me.Proxy = "myproxy.seattle.corp.northwind.com:80" End Sub Public Overrides Sub Run() Dim request1 As WebTestRequest = New WebTestRequest _ ("http://localhost/MyWebSite") request1.ThinkTime = 1 Dim rule1 As ExtractHiddenFields = New ExtractHiddenFields rule1.ContextParameterName = "1" AddHandler request1.ExtractValues, AddressOf rule1.Extract MyBase.Send(request1) Dim request2 As WebTestRequest = New WebTestRequest _ ("http://localhost/MyWebSite/Default.aspx") request2.Method = "POST" Dim request2Body As FormPostHttpBody = New FormPostHttpBody request2Body.FormPostParameters.Add("__VIEWSTATE", "{{$HIDDEN1" + _ ".__VIEWSTATE}}") request2Body.FormPostParameters.Add("Button1", "Button") request2Body.FormPostParameters.Add("TextBox1", "Hello text") request2.Body = request2Body Dim rule2 As ExtractHiddenFields = New ExtractHiddenFields rule2.ContextParameterName = "" AddHandler request2.ExtractValues, AddressOf rule2.Extract MyBase.Send(request2) End Sub End Class End Namespace
Show: