Commit 7af20a06 7af20a0659152ece8e0b1d95d84a1480dd0313d7 by Christian Gerdes

Initial sync

1 parent 5065a052
TestResults
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8ADAFB91-C10D-42C8-8499-30B3692C27F3}"
ProjectSection(SolutionItems) = preProject
LIL_VSTT_Plugins.vsmdi = LIL_VSTT_Plugins.vsmdi
Local.testsettings = Local.testsettings
TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LIL_VSTT_Plugins", "LIL_VSTT_Plugins\LIL_VSTT_Plugins.csproj", "{06A22593-601E-4386-917A-9835DE30E14E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProject1", "TestProject1\TestProject1.csproj", "{01CF59F6-F912-447A-91BC-0301FDA09C02}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{06A22593-601E-4386-917A-9835DE30E14E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{06A22593-601E-4386-917A-9835DE30E14E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06A22593-601E-4386-917A-9835DE30E14E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{06A22593-601E-4386-917A-9835DE30E14E}.Release|Any CPU.Build.0 = Release|Any CPU
{01CF59F6-F912-447A-91BC-0301FDA09C02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01CF59F6-F912-447A-91BC-0301FDA09C02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01CF59F6-F912-447A-91BC-0301FDA09C02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01CF59F6-F912-447A-91BC-0301FDA09C02}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = LIL_VSTT_Plugins.vsmdi
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="UTF-8"?>
<TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<TestList name="Lists of Tests" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
<RunConfiguration id="f9146b42-ca07-41ed-9af4-6ec2afc90583" name="Local" storage="local.testsettings" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</TestList>
</TestLists>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using Microsoft.VisualStudio.TestTools.WebTesting;
using Microsoft.VisualStudio.TestTools.LoadTesting;
using System.IO;
using System.ComponentModel;
namespace LIL_VSTT_Plugins
{
/// <summary>
/// Nästlad extraction rule
/// Kombination av två extractions rules i en. Den andra söker i resultatet av den första.
/// </summary>
[DisplayName("Nested Extraction")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nKombination av två extractions där den andra söker i resultatet av den första.")]
public class NestedExtractionRule : ExtractionRule
{
// Indata
private string start1;
[DisplayName("Extraction 1 Starts With")]
[Description("")]
public string Start1
{
get { return start1; }
set { start1 = value; }
}
private string end1;
[DisplayName("Extraction 1 Ends With")]
[Description("")]
public string End1
{
get { return end1; }
set { end1 = value; }
}
private string start2;
[DisplayName("Extraction 2 Starts With")]
[Description("")]
public string Start2
{
get { return start2; }
set { start2 = value; }
}
private string end2;
[DisplayName("Exctration 2 Ends With")]
[Description("")]
public string End2
{
get { return end2; }
set { end2 = value; }
}
public override void Extract(object sender, ExtractionEventArgs e)
{
// Find the first extraction
// TODO: Du behöver spola fram till att börja sökningen av end1 EFTER start1!
string extraction1;
int s1, s2, e1, e2;
s1 = e.Response.BodyString.IndexOf(start1) + start1.Length;
e1 = e.Response.BodyString.IndexOf(end1);
// Validate
if (s1 > e.Response.BodyString.Length || (e1 - s1 < 1))
{
// Error
e.Success = false;
return;
}
extraction1 = e.Response.BodyString.Substring(s1, e1 - s1);
// Find the second extraction
// TODO: Du behöver spola fram till att börja sökningen av end2 EFTER start2!
string extraction2;
s2 = extraction1.IndexOf(start2) + start2.Length;
e2 = extraction1.IndexOf(end2);
// Validate
if (s2 > extraction1.Length || (e2 - s2 < 1))
{
// Error
e.Success = false;
return;
}
extraction2 = extraction1.Substring(s2, e2 - s2);
e.WebTest.Context.Add(this.ContextParameterName, extraction2);
e.Success = true;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{06A22593-601E-4386-917A-9835DE30E14E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LIL_VSTT_Plugins</RootNamespace>
<AssemblyName>LIL_VSTT_Plugins</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ValidationRules.cs" />
<Compile Include="ExtractionRules.cs" />
<Compile Include="Swedbank.cs" />
<Compile Include="WebTestPlugins.cs" />
<Compile Include="LoadTestPlugins.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.LoadTesting;
using System.ComponentModel;
using System.IO;
using System.Collections.Specialized;
namespace LIL_VSTT_Plugins
{
/// <summary>
/// LoadTest Context Copy
/// </summary>
[DisplayName("LoadTest Context Copy")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nKopierar context parametrar satta i loadtestet till alla test context i test mixen.")]
public class LoadTestPluginCopier : ILoadTestPlugin
{
//store the load test object.
LoadTest mLoadTest;
public void Initialize(LoadTest loadTest)
{
mLoadTest = loadTest;
//connect to the TestStarting event.
mLoadTest.TestStarting += new EventHandler<TestStartingEventArgs>(mLoadTest_TestStarting);
}
void mLoadTest_TestStarting(object sender, TestStartingEventArgs e)
{
//When the test starts, copy the load test context parameters to
//the test context parameters
foreach (string key in mLoadTest.Context.Keys)
{
e.TestContextProperties.Add(key, mLoadTest.Context[key]);
}
}
}
/// <summary>
/// Service Manager Plugin
/// </summary>
[DisplayName("Service Manager Config")]
[Description("(C) Copyright 2015 LIGHTS IN LINE AB\r\nSätter config värden i Service Manager instansen för hela testet.")]
public class ServiceManagerPlugin : ILoadTestPlugin
{
[DisplayName("Use Expect 100 Behaviour"), DefaultValue(true)]
public bool exp100 { get; set; }
[DisplayName("Max Connection Idle Time"), DefaultValue(100)]
public int maxIdle { get; set; }
[DisplayName("TCP Keep Alive"), DefaultValue(false)]
public bool keepAlive { get; set; }
[DisplayName("TCP Keep Alive Timeout (ms)"), DefaultValue(5000)]
public int timeOut { get; set; }
[DisplayName("TCP Keep Alive Interval"), DefaultValue(1000)]
public int interVal { get; set; }
[DisplayName("Use Nagle Algorithm"), DefaultValue(false)]
public bool useNagle { get; set; }
public void Initialize(LoadTest loadTest)
{
System.Net.ServicePointManager.Expect100Continue = exp100;
System.Net.ServicePointManager.MaxServicePointIdleTime = maxIdle;
System.Net.ServicePointManager.SetTcpKeepAlive(keepAlive, timeOut, interVal);
System.Net.ServicePointManager.UseNagleAlgorithm = useNagle;
//System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls; Needs .net 4.5 in order to enable high security protocols
}
}
[DisplayName("Set Test Context Parameters")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nSätter parametrar i testcontextet för tester i mixen hämtat från en CSV fil")]
public class SetTestParameter : ILoadTestPlugin
{
// Summary:
// Initializes the load test plug-in.
//
// Parameters:
// loadTest:
// The load test to be executed.
private string myConnectionString = "";
private string myLogFileString = "";
private string myParameterName = "";
private string myTestNames = "";
private string myScenarioNames = "";
private string myAgentNames = "";
private string myColNames = "";
private bool myUseRandom = true;
private bool myUseUnique = false;
private bool myUseUniqueIteration = false;
private bool myLogToFile = false;
private bool myLogAppendID = false;
private bool myLogAppendName = false;
private bool mySeqLoop = false;
private bool myHasColName = false;
private bool myUseAutoSplit = false;
private StringCollection myParams = new StringCollection();
private Random random = new Random();
private LoadTest m_loadTest;
[DisplayName("CSV filens sökväg")]
[Description("Ange den fullständiga sökvägen till CSV filen. Observera att filen behöver finnas på alla agenterna också om du inte kör lokalt.")]
[DefaultValue("C:\\Userdata.csv")]
public string Connection_String
{
get { return myConnectionString; }
set { myConnectionString = value; }
}
[DisplayName("CSV filen har kolumnamn")]
[Description("Ange om csv filen har rubriker i form av kolumnnamn. Om du sätter True kommer kolmnens rubrik att användas som parameternamn istället.")]
[DefaultValue(false)]
public bool Has_col_name
{
get { return myHasColName; }
set { myHasColName = value; }
}
[DisplayName("CSV Autosplit per agent")]
[Description("Ange True om du vill att filen automatiskt ska splittas mellan alla aktiva agenter.")]
[DefaultValue(false)]
public bool Autosplit
{
get { return myUseAutoSplit; }
set { myUseAutoSplit = value; }
}
[DisplayName("Context Parameter Namn")]
[Description("Ange namnet på parametern som vi ska lägga till i TestContext, om det är flera använd CSV format.")]
[DefaultValue("UserName")]
public string Parameter_Name
{
get { return myParameterName; }
set { myParameterName = value; }
}
[DisplayName("Loggfilens namn")]
[Description("Ange den fullständiga sökvägen till logg filen. Om filen finns kommer den inte skrivas över utan läggas till i slutet.")]
[DefaultValue("C:\\Temp\\Fungerande.log")]
public string LogFilePathString
{
get { return myLogFileString; }
set { myLogFileString = value; }
}
[DisplayName("Loggfilens namn: Lägg till ID")]
[Description("Ange True om du vill att Agent ID samt VU ID läggs till automatiskt i slutet på filnamnet.")]
[DefaultValue(false)]
public bool LogFileAppendID
{
get { return myLogAppendID; }
set { myLogAppendID = value; }
}
[DisplayName("Loggfilens namn: Lägg till Namn")]
[Description("Ange True om du vill att Scenario Name samt Test Name läggs till automatiskt i slutet på filnamnet.")]
[DefaultValue(false)]
public bool LogFileAppendName
{
get { return myLogAppendName; }
set { myLogAppendName = value; }
}
[DisplayName("Välj slumpmässigt?")]
[Description("Ange True om du vill välja en slumpmässig användare. False går igenom listan sekventiellt.")]
[DefaultValue(true)]
public bool Use_Random
{
get { return myUseRandom; }
set { myUseRandom = value; }
}
[DisplayName("Välj unikt per VU?")]
[Description("Ange True om du vill att varje LoadTest VU ska ha sitt eget unika värde och återanvända detta i varje iteration. Stänger av slumpmässigt val.")]
[DefaultValue(false)]
public bool Use_Unique
{
get { return myUseUnique; }
set { myUseUnique = value; }
}
[DisplayName("Välj unikt per Iteration?")]
[Description("Ange True om du vill att varje LoadTest VU ska ha sitt eget unika värde för varje iteration, dvs aldrig återanvändas av någon under testet.")]
[DefaultValue(false)]
public bool Use_UniqueIteration
{
get { return myUseUniqueIteration; }
set { myUseUniqueIteration = value; }
}
[DisplayName("Välj sekventiell loop?")]
[Description("Ange true om du vill börja om från början om sekventiell läsning får slut på värden. Gäller även Unik läsning.")]
[DefaultValue(false)]
public bool Use_Loop
{
get { return mySeqLoop; }
set { mySeqLoop = value; }
}
[DisplayName("Logga fungerande till fil?")]
[Description("Ange True om du vill att poster vars tester slutar i Pass ska loggas till fil (c:\\fungerande.log). Om filen redan finns läggs de till i slutet.")]
[DefaultValue(false)]
public bool Log_To_File
{
get { return myLogToFile; }
set { myLogToFile = value; }
}
[DisplayName("Endast dessa Tester")]
[Description("Parametrar sätts endast på tester i test mixen där namnet eller del av namnet för testet finns i denna lista. Lämna blankt för att sätta i alla tester.")]
[DefaultValue("")]
public string Test_Names
{
get { return myTestNames; }
set { myTestNames = value; }
}
[DisplayName("Endast dessa Scenarios")]
[Description("Parametrar sätts endast på Scenarion där namnet eller del av namnet för scenariot finns i denna lista. Lämna blankt för att sätta i alla scenarion.")]
[DefaultValue("")]
public string Scenario_Names
{
get { return myScenarioNames; }
set { myScenarioNames = value; }
}
[DisplayName("Endast dessa Agenter")]
[Description("Parametrar sätts endast på Agenter där namnet eller del av namnet för agenten finns i denna lista. Lämna blankt för att sätta i alla agenter.")]
[DefaultValue("")]
public string Agent_Names
{
get { return myAgentNames; }
set { myAgentNames = value; }
}
public void Initialize(LoadTest loadTest)
{
// Only run on specific agents if specified
if (myAgentNames.Length > 0 && !myAgentNames.ToLower().Contains(loadTest.Context.AgentName.ToLower())) return;
// Vi bör läsa in alla värden här
this.initUserArray(myConnectionString, loadTest.Context.AgentCount, loadTest.Context.AgentId);
if (myParams.Count > 0)
{
m_loadTest = loadTest;
if (myUseUniqueIteration)
m_loadTest.TestStarting += new EventHandler<TestStartingEventArgs>(loadTestStartingUniqueIteration);
else if (myUseUnique)
m_loadTest.TestStarting += new EventHandler<TestStartingEventArgs>(loadTestStartingUnique);
else if (myUseRandom)
m_loadTest.TestStarting += new EventHandler<TestStartingEventArgs>(loadTestStartingRandom);
else
m_loadTest.TestStarting += new EventHandler<TestStartingEventArgs>(loadTestStartingSeq);
}
if (myLogToFile)
{
m_loadTest.TestFinished += new EventHandler<TestFinishedEventArgs>(loadTestEndLogger);
}
}
void loadTestEndLogger(object sender, TestFinishedEventArgs e)
{
// Log the user to logfile if the test is passed
if (e.Result.Passed && shouldRun(e))
{
string fileName = myLogFileString;
if (myLogAppendID) fileName = fileName + ".Agent" + m_loadTest.Context.AgentId + ".Vu" + e.UserContext.UserId;
if (myLogAppendName) fileName = fileName + "." + e.UserContext.ScenarioName + "." + e.TestName;
string[] allNames;
if (myHasColName) allNames = myColNames.Split(','); else allNames = myParameterName.Split(',');
string row = "";
foreach (string name in allNames)
{
if(e.UserContext.Keys.Contains(name)) {
if (row.Length == 0)
row += e.UserContext[name];
else
row += "," + e.UserContext[name];
}
}
File.AppendAllText(fileName + ".csv", row + "\r\n");
}
}
void loadTestStartingRandom(object sender, TestStartingEventArgs e)
{
setParameters(this.getRandomUser(), e);
}
void loadTestStartingSeq(object sender, TestStartingEventArgs e)
{
setParameters(this.getSeqUser(e.UserContext.CompletedTestCount), e);
}
void loadTestStartingUnique(object sender, TestStartingEventArgs e)
{
setParameters(this.getSeqUser(e.UserContext.UserId), e);
}
void loadTestStartingUniqueIteration(object sender, TestStartingEventArgs e)
{
setParameters(this.getSeqUser(e.TestIterationNumber - 1), e);
}
void setParameters(string user, TestStartingEventArgs e)
{
if (shouldRun(e))
{
// Add context parameters to the starting test
int numParams = 1;
if (myHasColName == true && myColNames.Contains(',')) numParams = countColumns(myColNames);
if (myHasColName == false && myParameterName.Contains(',')) numParams = countColumns(myParameterName);
//e.TestContextProperties.Add("LIL_LogValue", user);
//e.UserContext["LIL_LogValue"] = user;
string[] allParams = user.Split(',');
string[] allNames;
if (myHasColName) allNames = myColNames.Split(','); else allNames = myParameterName.Split(',');
for (int i = 0; i < numParams; i++)
{
e.TestContextProperties.Add(allNames[i], allParams[i]);
e.UserContext[allNames[i]] = allParams[i];
}
}
}
int countColumns(string input)
{
int count = 1;
for (int i = 0; i < input.Length; i++)
{
if (input[i] == ',') count++;
}
return count;
}
bool shouldRun(TestStartingEventArgs e)
{
bool doRun = true;
if (myTestNames.Length > 0 && !myTestNames.ToLower().Contains(e.TestName.ToLower())) doRun = false;
if (myScenarioNames.Length > 0 && !myScenarioNames.ToLower().Contains(e.ScenarioName.ToLower())) doRun = false;
return doRun;
}
bool shouldRun(TestFinishedEventArgs e)
{
bool doRun = true;
if (myTestNames.Length > 0 && !myTestNames.ToLower().Contains(e.TestName.ToLower())) doRun = false;
if (myScenarioNames.Length > 0 && !myScenarioNames.ToLower().Contains(e.ScenarioName.ToLower())) doRun = false;
return doRun;
}
string getRandomUser()
{
int randomIndex = random.Next(myParams.Count - 1);
return myParams[randomIndex];
}
string getSeqUser(int seqIndex)
{
if (seqIndex < myParams.Count)
return myParams[seqIndex];
else
{
if (mySeqLoop)
return myParams[seqIndex % myParams.Count];
else
return myParams[myParams.Count - 1];
}
}
bool initUserArray(string path, int agentCount, int agentId)
{
if (path.Length > 0)
{
//StreamReader re = File.OpenText(path);
StreamReader re = new StreamReader(path, System.Text.Encoding.Default);
string input = null;
int lineNum = 0;
int dataNum = 0;
while ((input = re.ReadLine()) != null)
{
lineNum++;
if (lineNum == 1 && myHasColName == true)
{
// First line is column names
myColNames = input.TrimEnd();
}
else
{
if (myUseAutoSplit)
{
int ifAgentId = 0;
if (dataNum >= agentCount) ifAgentId = (dataNum % agentCount) + 1;
else ifAgentId = dataNum + 1;
if (ifAgentId == agentId)
{
myParams.Add(input.TrimEnd());
}
dataNum++;
}
else
{
myParams.Add(input.TrimEnd());
}
}
}
re.Close();
return true;
}
else {
return false;
}
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("LIL_VSTT_Plugins")]
[assembly: AssemblyDescription("Plugins for Web and Load Tests")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("LIGHTS IN LINE AB")]
[assembly: AssemblyProduct("Visual Studio 2010 Ultimate")]
[assembly: AssemblyCopyright("© LIGHTS IN LINE AB 2014")]
[assembly: AssemblyTrademark("All Rights Reserved")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("eb453bc6-d339-4a51-9cd4-44478831db9a")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.WebTesting;
using System.ComponentModel;
using Microsoft.VisualStudio.TestTools.WebTesting.Rules;
using System.Text.RegularExpressions;
using System.IO;
using Microsoft.VisualStudio.TestTools.LoadTesting;
namespace LIL_VSTT_Plugins
{
[DisplayName("Set Request Think Time"), Description("Changes the thinktime on requests with a set thinktime over 0 to the value of the ThinkTime context parameter")]
public class SetRequestThinkTime : WebTestPlugin
{
public override void PreRequest(object sender, PreRequestEventArgs e)
{
WebTestContext ctx = e.WebTest.Context;
if (ctx.ContainsKey("ThinkTime"))
{
int tt = Int32.Parse(ctx["ThinkTime"].ToString());
if (e.Request.ThinkTime > 0)
{
e.Request.ThinkTime = tt;
}
}
}
}
[DisplayName("Clear Cookies"), Description("Clears all cookies from previous iterations of this webtest")]
public class ClearCookies : WebTestPlugin
{
public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
e.WebTest.Context.CookieContainer = new System.Net.CookieContainer();
}
}
[DisplayName("Think Time Emulator 10/190"), Description("Sets a context parameter named ThinkTime in each starting test to a random value between 10%-190% of the specified value.")]
public class ThinkTimeEmulator10190 : ILoadTestPlugin
{
[DisplayName("Think Time"), DefaultValue(0), Description("The Think Time to be used seconds. Default is 0.")]
public int ThinkTime { get; set; }
//store the load test object.
LoadTest mLoadTest;
Random rnd = new Random();
public void Initialize(LoadTest loadTest)
{
mLoadTest = loadTest;
//connect to the TestStarting event.
mLoadTest.TestStarting += new EventHandler<TestStartingEventArgs>(mLoadTest_TestStarting);
}
void mLoadTest_TestStarting(object sender, TestStartingEventArgs e)
{
// Set the think time parameter in the tests context to a new value
int min = ThinkTime/10;
int max = ThinkTime*2 - min;
e.TestContextProperties.Add("ThinkTime", rnd.Next(min, max));
}
}
[DisplayName("Set Cookie from Query String"), Description("Sets a cookie with given name from the value of a given Query String parameter if found in the current request")]
public class SetCookieFromQueryString : WebTestPlugin
{
[DisplayName("Cookie name"), Description("Name of the cookie to set")]
public String CookieName { get; set; }
[DisplayName("Query String parameter name"), Description("Name of the query string parameter to look for")]
public String ParamName { get; set; }
public override void PreRequest(object sender, PreRequestEventArgs e)
{
base.PreRequest(sender, e);
QueryStringParameterCollection col = e.Request.QueryStringParameters;
for(int x=0; x < col.Count; x++)
{
if (col[x].Name == ParamName)
{
e.Request.Cookies.Add(new System.Net.Cookie(CookieName, col[x].Value));
return;
}
}
}
public override void PostRequest(object sender, PostRequestEventArgs e)
{
base.PostRequest(sender, e);
if (e.Request.HasDependentRequests)
{
foreach (WebTestRequest item in e.Request.DependentRequests)
{
QueryStringParameterCollection col = item.QueryStringParameters;
for (int x = 0; x < col.Count; x++)
{
if (col[x].Name == ParamName)
{
item.Cookies.Add(new System.Net.Cookie(CookieName, col[x].Value));
}
}
}
}
}
}
[DisplayName("Add Header"), Description("Adds the specified header to all requests matching a given URL regex")]
public class AddHeader : WebTestPlugin
{
[DisplayName("Header Name"), Description("Name of the header to set")]
public String HeaderName { get; set; }
[DisplayName("Header Value"), Description("Value of the header to set")]
public String HeaderValue { get; set; }
[DisplayName("URL RegEx"), Description("Regular Expression to match on the URL. Empty matches all requests.")]
public String RegEx { get; set; }
public override void PreRequest(object sender, PreRequestEventArgs e)
{
base.PreRequest(sender, e);
if (Regex.Match(e.Request.Url, RegEx).Success || RegEx.Length == 0)
{
e.Request.Headers.Add(HeaderName, HeaderValue);
}
}
public override void PostRequest(object sender, PostRequestEventArgs e)
{
base.PostRequest(sender, e);
if (e.Request.HasDependentRequests)
{
foreach (WebTestRequest item in e.Request.DependentRequests)
{
if (Regex.Match(item.Url, RegEx).Success || RegEx.Length == 0)
{
item.Headers.Add(HeaderName, HeaderValue);
}
}
}
}
}
[DisplayName("Log Context Arrays to File"), Description("Logs the specified context parameter arrays to file after each test iteration, one row for each array value")]
public class LogContextArrayToFile : WebTestPlugin
{
[DisplayName("Parameter arrays"), Description("Comma separated list of array parameters to log")]
public String Params { get; set; }
[DisplayName("File Name"), Description("The file name to use for logging")]
public String Filename { get; set; }
private bool header = true;
private string[] paramlist = null;
public override void PostWebTest(object sender, PostWebTestEventArgs e)
{
if (Params.Length == 0 || Filename.Length == 0) return;
if (paramlist == null) paramlist = Params.Split(',');
if (header)
{
File.AppendAllText(Filename, Params + "\r\n");
header = false;
}
// Check that the first param array has a count
int count = 0;
WebTestContext ctx = e.WebTest.Context;
if (ctx.ContainsKey(paramlist[0] + "_count")) count = Int32.Parse(ctx[paramlist[0] + "_count"].ToString());
for (int i = 1; i <= count; i++)
{
string row = "";
foreach (string param in paramlist)
{
if (row.Length > 0) row += ",";
if (ctx.ContainsKey(param + "_" + i)) row += ctx[param + "_" + i].ToString();
}
File.AppendAllText(Filename, row + "\r\n");
}
base.PostWebTest(sender, e);
}
}
[DisplayName("Log Context to File"), Description("Logs the specified context parameters to file after each test iteration")]
public class LogContextToFile : WebTestPlugin
{
[DisplayName("Regular Expression"), Description("The RegEx to use to match context parameter names")]
public String myRegex { get; set; }
[DisplayName("File Name"), Description("The file name to use for logging")]
public String Filename { get; set; }
[DisplayName("Write header"), DefaultValue(false), Description("Writes the parameter names as a header. Will write a new header for each user (dont use in loadtest)")]
public bool useHeader { get; set; }
[DisplayName("Log if passed"), DefaultValue(true), Description("Logs the parameters if the webtest passed")]
public bool logPassed { get; set; }
[DisplayName("Log if failed"), DefaultValue(true), Description("Logs the parameters if the webtest failed")]
public bool logFailed { get; set; }
private bool header = true;
public override void PostWebTest(object sender, PostWebTestEventArgs e)
{
if ((e.WebTest.Outcome == Outcome.Pass && logPassed) || (e.WebTest.Outcome == Outcome.Fail && logFailed)) {
string row = "";
string hrow = "";
foreach (KeyValuePair<string, object> pair in e.WebTest.Context)
{
if (Regex.Match(pair.Key, myRegex).Success)
{
if (header && useHeader)
{
if (hrow.Length == 0) hrow = pair.Key.ToString();
else hrow += "," + pair.Key.ToString();
}
if (row.Length == 0) row = pair.Value.ToString();
else row += "," + pair.Value.ToString();
}
}
if (header && useHeader)
{
File.AppendAllText(Filename + e.WebTest.Context.WebTestUserId + ".log", hrow + "\r\n");
header = false;
}
File.AppendAllText(Filename + e.WebTest.Context.WebTestUserId + ".log", row + "\r\n");
base.PostWebTest(sender, e);
}
}
}
[DisplayName("Multi Regular Expression"), Description("Saves all matches for a regular expression including a count")]
public class MultiRegExExtract : ExtractionRule
{
[DisplayName("Regular Expression"), Description("The RegEx to use, supports grouping, for example (.+?)")]
public String Regex { get; set; }
[DisplayName("Group Name"), DefaultValue("1"), Description("The group to use as the value for the parameter, default is 1")]
public String GroupName { get; set; }
[DisplayName("Pass if not found"), DefaultValue(false), Description("Wherever this extration rule should pass even if no matches are found. Default false.")]
public bool PassIfNotFound { get; set; }
public override void Extract(object sender, ExtractionEventArgs e)
{
MatchCollection matches = System.Text.RegularExpressions.Regex.Matches(
e.Response.BodyString,
Regex,
RegexOptions.IgnoreCase);
int index = 0;
foreach (Match match in matches)
{
index++;
e.WebTest.Context[ContextParameterName + "_" + index] = match.Groups[GroupName].Value;
}
if (index > 0)
{
e.WebTest.Context[ContextParameterName + "_count"] = index.ToString();
e.Success = true;
e.Message = "Found " + index + " matches";
}
else
{
e.WebTest.Context[ContextParameterName + "_count"] = index.ToString();
e.Success = PassIfNotFound;
e.Message = "No matches found. Body size is " + e.Response.BodyString.Length;
}
}
}
[DisplayName("Extract Count"), Description("Counts all matches for a given RegEx and saves the count to the specified parameter")]
public class ExtractCount : ExtractionRule
{
[DisplayName("Regular Expression"), Description("The RegEx to use")]
public String Regex { get; set; }
[DisplayName("Fail on zero count"), DefaultValue(false), Description("Wherever this extration rule should fail if no matches are found")]
public bool FailOnZero { get; set; }
public override void Extract(object sender, ExtractionEventArgs e)
{
MatchCollection matches = System.Text.RegularExpressions.Regex.Matches(
e.Response.BodyString,
Regex,
RegexOptions.IgnoreCase);
e.WebTest.Context[ContextParameterName] = matches.Count.ToString();
e.Message = "Found " + matches.Count + " matches";
if (FailOnZero && matches.Count == 0)
{
e.Success = false;
}
}
}
[DisplayName("Regular Expression Loop"), Description("Loop Condition that matches once on each regexp in previous response body")]
public class RegExpLoop : ConditionalRule
{
private Int32 CurrentMatch { get; set; }
private String LastUrl { get; set; }
private MatchCollection Matches { get; set; }
[DisplayName("Context parameter"), IsContextParameterName(true),
Description("Name of context parameter where the current value should be set in each loop")]
public string ContextParameterName { get; set; }
[DisplayName("Regex"), Description("The RegEx to use, supports grouping, for example (.+?)")]
public String Regex { get; set; }
[DisplayName("GroupName"), Description("The group to use as the value for the parameter if several are specified, default is 1")]
public String GroupName { get; set; }
// Methods
public override void CheckCondition(object sender, ConditionalEventArgs e)
{
if (CurrentMatch < Matches.Count)
{
e.WebTest.Context[ContextParameterName] =
Matches[CurrentMatch].Groups[GroupName].Value;
e.IsMet = true;
CurrentMatch++;
return;
}
e.IsMet = false;
}
public override void Initialize(object sender, ConditionalEventArgs e)
{
CurrentMatch = 0;
Matches = System.Text.RegularExpressions.Regex.Matches(
e.WebTest.LastResponse.BodyString,
Regex,
RegexOptions.IgnoreCase);
}
public override string StringRepresentation()
{
return "Regex condition " + Regex;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using Microsoft.VisualStudio.TestTools.WebTesting;
using Microsoft.VisualStudio.TestTools.LoadTesting;
using System.IO;
using System.ComponentModel;
using System.Text.RegularExpressions;
namespace LIL_VSTT_Plugins
{
/// <summary>
/// Count Validation
/// Räknar hur många gånger ett visst reguljärt utryck finns i svaret och validerar detta
/// </summary>
[DisplayName("Count Validation")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nValiderar att ett reguljärt utryck finns minst ett visst antal gånger i svaret, eller inte.")]
public class CountValidation : ValidationRule
{
[DisplayName("RegEx"), Description("Regular Expression to match on the response.")]
public String RegEx { get; set; }
[DisplayName("Condition"), Description("Valid conditions are =,>,<,>=,<=")]
[DefaultValue("=")]
public String myCon { get; set; }
[DisplayName("Count"), Description("Expected count of occurences")]
public int Count { get; set; }
[DisplayName("Pass"), Description("Pass or fail if count matches. True passes if the count matches, False fails if the count matches")]
[DefaultValue(true)]
public bool Pass { get; set; }
public override void Validate(object sender, ValidationEventArgs e)
{
MatchCollection matches = System.Text.RegularExpressions.Regex.Matches(
e.Response.BodyString,
RegEx,
RegexOptions.IgnoreCase);
switch (myCon) {
case "=":
if (matches.Count == Count) { e.IsValid = Pass; e.Message = "Number of matches equal to count. Valid set to " + Pass.ToString(); }
break;
case "<":
if (matches.Count < Count) { e.IsValid = Pass; e.Message = "Number of matches less than count. Valid set to " + Pass.ToString(); }
break;
case ">":
if (matches.Count > Count) { e.IsValid = Pass; e.Message = "Number of matches higher than count. Valid set to " + Pass.ToString(); }
break;
case "<=":
if (matches.Count <= Count) { e.IsValid = Pass; e.Message = "Number of matches less or equal to count. Valid set to " + Pass.ToString(); }
break;
case ">=":
if (matches.Count >= Count) { e.IsValid = Pass; e.Message = "Number of matches higher or equal to count. Valid set to " + Pass.ToString(); }
break;
default:
e.IsValid = true; e.Message = "Invalid condition specified. Validation will pass.";
break;
}
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using Microsoft.VisualStudio.TestTools.WebTesting;
using Microsoft.VisualStudio.TestTools.LoadTesting;
using System.IO;
using System.ComponentModel;
namespace LIL_VSTT_Plugins
{
/// <summary>
/// Datasource Unique Once
/// </summary>
[DisplayName("Datasource Unique Once")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nOBS! Läs hela! Styr datasource selection till att endast göras en gång per VU. Du måste ändra i din datasource Access Metod till Do Not Move Automatically! WebTestUserId används för att välja rad. Använder de datasources som finns definerade i webtestet. Använd test mix based on users starting tests samt 0 percent new users.")]
public class UniqueOnce : WebTestPlugin
{
string dataSourceName;
string dataTableName;
int offset;
[DisplayName("Datakällans namn")]
[Description("Ange namnet på datakällan i ditt webtest, tex DataSource1")]
[DefaultValue("DataSource1")]
public string DataSourceName
{
get { return dataSourceName; }
set { dataSourceName = value; }
}
[DisplayName("Tabellens namn")]
[Description("Ange namnet på den tabell som ska användas, tex Userdata#csv")]
public string DataSourceTableName
{
get { return dataTableName; }
set { dataTableName = value; }
}
[DisplayName("Offset")]
[Description("Används för att hoppa över ett visst antal rader från början på datakällan så de inte används.")]
[DefaultValue(0)]
public int Offset
{
get { return offset; }
set { offset = value; }
}
public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
base.PreWebTest(sender, e);
int index = e.WebTest.Context.WebTestUserId + offset;
e.WebTest.MoveDataTableCursor(dataSourceName, dataTableName, index);
e.WebTest.AddCommentToResult("Selected row number " + index + " from datasource " + dataSourceName + " and table " + dataTableName + ".");
}
}
/// <summary>
/// Filtrar bort oönskade objekt från sidor.
/// Samtliga objekt vars URL börjar med den angivna strängen kommer ignoreras och inte laddas ner.
/// </summary>
[DisplayName("Dynamisk URL exclude filter")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nFilter för att ignorera vissa objekt på websidor så de inte laddas ner automatiskt.")]
public class WebTestDependentFilter : WebTestPlugin
{
string m_startsWith;
/// <summary>
/// Fullständig URL (inkl http://) som börjar med FilterString kommer att ignoreras.
[DisplayName("URL börjar med")]
[Description("Dynamiska (dependent) objekt som hittas kommer endast att laddas ner om de INTE börjar med denna sträng.\r\nTex: https://www.excludedsite.com")]
public string FilterString
{
get { return m_startsWith; }
set { m_startsWith = value; }
}
public override void PostRequest(object sender, PostRequestEventArgs e)
{
WebTestRequestCollection depsToRemove = new WebTestRequestCollection();
Boolean hasRun = false;
foreach (WebTestRequest r in e.Request.DependentRequests)
{
if (!string.IsNullOrEmpty(m_startsWith) &&
r.Url.StartsWith(m_startsWith))
{
depsToRemove.Add(r);
hasRun = true;
}
}
foreach (WebTestRequest r in depsToRemove)
{
e.Request.DependentRequests.Remove(r);
}
if (hasRun)
{
//e.WebTest.AddCommentToResult("WebTestDependentFilter has run");
}
}
}
/// <summary>
/// Filtrar bort oönskade objekt från sidor.
/// Samtliga objekt vars URL börjar med den angivna strängen kommer ignoreras och inte laddas ner.
/// </summary>
[DisplayName("Dynamisk URL include filter")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nFilter för att ignorera vissa objekt på websidor så de inte laddas ner automatiskt.")]
public class WebTestDependentIncludeFilter : WebTestPlugin
{
string m_startsWith;
/// <summary>
/// Fullständig URL (inkl http://) som börjar med FilterString kommer att ignoreras.
[DisplayName("URL börjar med")]
[Description("Alla dynamiska (dependent) objekt som hittas kommer endast att laddas ner OM DE BÖRJAR med denna sträng.\r\nTex: https://www.onlythissite.com")]
public string FilterString
{
get { return m_startsWith; }
set { m_startsWith = value; }
}
public override void PostRequest(object sender, PostRequestEventArgs e)
{
WebTestRequestCollection depsToRemove = new WebTestRequestCollection();
Boolean hasRun = false;
foreach (WebTestRequest r in e.Request.DependentRequests)
{
if (!string.IsNullOrEmpty(m_startsWith) &&
!r.Url.StartsWith(m_startsWith))
{
depsToRemove.Add(r);
hasRun = true;
}
}
foreach (WebTestRequest r in depsToRemove)
{
e.Request.DependentRequests.Remove(r);
}
if (hasRun)
{
//e.WebTest.AddCommentToResult("WebTestDependentFilter has run");
}
}
}
/// <summary>
/// WebTest plugin som tar bort expected-100 headern från post requests
/// Beta
/// </summary>
[DisplayName("Expect 100 Off")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nStänger av .NET expected-100 headern i posts.")]
public class expect100Off : WebTestPlugin
{
public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
base.PreWebTest(sender, e);
System.Net.ServicePointManager.Expect100Continue = false;
System.Net.ServicePointManager.MaxServicePointIdleTime = 30;
}
}
/// <summary>
/// WebTest Plugin Template
/// </summary>
[DisplayName("Randomize each page")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nVäljer en ny slumpmässig rad i din datasource vid varje sida/page i skriptet.")]
public class randomOnEachPage : WebTestPlugin
{
string dataSourceName;
string dataTableName;
int datasourceSize = 0;
Random RandomNumber = new Random(System.DateTime.Now.Millisecond);
[DisplayName("Datakällans namn")]
[Description("Ange namnet på datakällan i ditt webtest, tex DataSource1")]
[DefaultValue("DataSource1")]
public string DataSourceName
{
get { return dataSourceName; }
set { dataSourceName = value; }
}
[DisplayName("Tabellens namn")]
[Description("Ange namnet på den tabell som ska användas, tex Userdata#csv")]
public string DataSourceTableName
{
get { return dataTableName; }
set { dataTableName = value; }
}
public override void PrePage(object sender, PrePageEventArgs e)
{
base.PrePage(sender, e);
if (datasourceSize == 0) {
int size = e.WebTest.GetDataTableRowCount(dataSourceName, dataTableName);
if(size > 0)
datasourceSize = size;
else
return;
}
if (datasourceSize > 0)
{
int index = RandomNumber.Next(0, datasourceSize - 1);
e.WebTest.MoveDataTableCursor(dataSourceName, dataTableName, index);
//e.WebTest.AddCommentToResult("Selected row number " + index + " from datasource " + dataSourceName + " and table " + dataTableName + ".");
}
}
}
///<summary>
///WebTest Plugin Data Generator
///</summary>
[DisplayName("Data Generator Timestamp")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nGenererar en timestamp som context parameter")]
public class dataGenTimestamp : WebTestPlugin
{
private string paramName;
[DisplayName("Parameter namn")]
[Description("Ange namnet på parametern i ditt webtest, tex TimeStampParameter1")]
[DefaultValue("TimeStampParameter1")]
public string ParamNameVal
{
get { return paramName; }
set { paramName = value; }
}
private bool millis = false;
[DisplayName("Använd millisekunder")]
[Description("Sätt till true om du vill ha värdet i millisekunder istället för sekunder.")]
[DefaultValue(false)]
public bool MillisecondsVal
{
get { return millis; }
set { millis = value; }
}
private bool prePage = false;
[DisplayName("Uppdatera på varje Page")]
[Description("Sätt till true om du vill ha värdet uppdaterat inför varje ny sida som laddas i testet.")]
[DefaultValue(false)]
public bool PrePageVal
{
get { return prePage; }
set { prePage = value; }
}
private bool preTrans = false;
[DisplayName("Uppdatera på varje Transaktion")]
[Description("Sätt till true om du vill ha värdet uppdaterat inför varje ny transaktion i testet.")]
[DefaultValue(false)]
public bool PreTransactionVal
{
get { return preTrans; }
set { preTrans = value; }
}
private bool preReq = false;
[DisplayName("Uppdatera på varje Request")]
[Description("Sätt till true om du vill ha värdet uppdaterat inför varje nytt request i testet.")]
[DefaultValue(false)]
public bool PreRequestVal
{
get { return preReq; }
set { preReq = value; }
}
public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
update(e.WebTest.Context);
base.PreWebTest(sender, e);
}
public override void PrePage(object sender, PrePageEventArgs e)
{
if (prePage) update(e.WebTest.Context);
base.PrePage(sender, e);
}
public override void PreRequestDataBinding(object sender, PreRequestDataBindingEventArgs e)
{
if (preReq) update(e.WebTest.Context);
base.PreRequestDataBinding(sender, e);
}
public override void PreTransaction(object sender, PreTransactionEventArgs e)
{
if (preTrans) update(e.WebTest.Context);
base.PreTransaction(sender, e);
}
private void update(WebTestContext context)
{
TimeSpan span = (DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc));
if (millis) context[paramName] = ((Int64) span.TotalMilliseconds).ToString();
else context[paramName] = ((Int64) span.TotalSeconds).ToString();
}
}
/*
/// <summary>
/// WebTest Plugin Template
/// </summary>
[DisplayName("Plugin Namn")]
[Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nFörklaring")]
public class myPlugin : WebTestPlugin
{
public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
base.PreWebTest(sender, e);
e.WebTest.Context.CookieContainer = new myCookieContainer();
}
}
*/
}
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="Local" id="f9146b42-ca07-41ed-9af4-6ec2afc90583" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>These are default test settings for a local test run.</Description>
<Deployment enabled="false" />
<Execution>
<TestTypeSpecific />
<AgentRule name="Execution Agents">
</AgentRule>
</Execution>
</TestSettings>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LoadTest Name="LoadTest1" Description="" Owner="" storage="c:\users\gerdes\documents\visual studio 2010\lil_vstt_plugins\testproject1\loadtest1.loadtest" Priority="2147483647" Enabled="true" CssProjectStructure="" CssIteration="" DeploymentItemsEditable="" WorkItemIds="" TraceLevel="None" CurrentRunConfig="Run Settings1" Id="0e35c1c4-9214-4fc4-907f-42e11a00845a" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Scenarios>
<Scenario Name="Scenario1" DelayBetweenIterations="1" PercentNewUsers="0" IPSwitching="true" TestMixType="PercentageOfUsersRunning" ApplyDistributionToPacingDelay="true" MaxTestIterations="0" DisableDuringWarmup="false" DelayStartTime="0" AllowedAgents="">
<ThinkProfile Value="0.2" Pattern="NormalDistribution" />
<LoadProfile Pattern="Constant" InitialUsers="10" />
<TestMix>
<TestProfile Name="WebTest1" Path="webtest1.webtest" Id="c649760b-6dd8-4210-8a6d-3c6596d08668" Percentage="100" Type="Microsoft.VisualStudio.TestTools.WebStress.DeclarativeWebTestElement, Microsoft.VisualStudio.QualityTools.LoadTest, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</TestMix>
<BrowserMix>
<BrowserProfile Percentage="100">
<Browser Name="Internet Explorer 7.0" MaxConnections="2">
<Headers>
<Header Name="User-Agent" Value="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" />
<Header Name="Accept" Value="*/*" />
<Header Name="Accept-Language" Value="{{$IEAcceptLanguage}}" />
<Header Name="Accept-Encoding" Value="GZIP" />
</Headers>
</Browser>
</BrowserProfile>
</BrowserMix>
<NetworkMix>
<NetworkProfile Percentage="100">
<Network Name="LAN" BandwidthInKbps="1000000" NetworkProfileConfigurationXml="&lt;Emulation&gt;&lt;VirtualChannel name=&quot;defaultChannel&quot;&gt;&lt;FilterList/&gt;&lt;VirtualLink instances=&quot;1&quot; name=&quot;defaultLink&quot;&gt;&lt;LinkRule dir=&quot;upstream&quot;&gt;&lt;Bandwidth&gt;&lt;Speed unit=&quot;kbps&quot;&gt;1000000&lt;/Speed&gt;&lt;/Bandwidth&gt;&lt;/LinkRule&gt;&lt;LinkRule dir=&quot;downstream&quot;&gt;&lt;Bandwidth&gt;&lt;Speed unit=&quot;kbps&quot;&gt;1000000&lt;/Speed&gt;&lt;/Bandwidth&gt;&lt;/LinkRule&gt;&lt;/VirtualLink&gt;&lt;/VirtualChannel&gt;&lt;/Emulation&gt;" />
</NetworkProfile>
</NetworkMix>
</Scenario>
</Scenarios>
<CounterSets>
<CounterSet Name="LoadTest" CounterSetType="LoadTest" LocId="">
<CounterCategories>
<CounterCategory Name="LoadTest:Scenario">
<Counters>
<Counter Name="User Load" HigherIsBetter="true" />
<Counter Name="Tests Running" HigherIsBetter="true" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:Test">
<Counters>
<Counter Name="Total Tests" HigherIsBetter="true" />
<Counter Name="Passed Tests" HigherIsBetter="true" />
<Counter Name="Failed Tests" />
<Counter Name="Tests/Sec" HigherIsBetter="true" />
<Counter Name="Passed Tests/Sec" HigherIsBetter="true" />
<Counter Name="Failed Tests/Sec" />
<Counter Name="Avg. Requests/Test" HigherIsBetter="true" />
<Counter Name="Avg. Test Time" />
<Counter Name="% Time in LoadTestPlugin" />
<Counter Name="% Time in WebTest code" />
<Counter Name="% Time in Rules" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:Transaction">
<Counters>
<Counter Name="Total Transactions" HigherIsBetter="true" />
<Counter Name="Avg. Transaction Time" />
<Counter Name="Avg. Response Time" />
<Counter Name="Transactions/Sec" HigherIsBetter="true" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:Errors">
<Counters>
<Counter Name="Http Errors" />
<Counter Name="Validation Rule Errors" />
<Counter Name="Extraction Rule Errors" />
<Counter Name="Requests Timed Out" />
<Counter Name="Exceptions" />
<Counter Name="Total Errors" />
<Counter Name="Errors/Sec" />
<Counter Name="Threshold Violations/Sec" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:Page">
<Counters>
<Counter Name="Total Pages" HigherIsBetter="true" />
<Counter Name="Avg. Page Time" />
<Counter Name="Page Response Time Goal" HigherIsBetter="true" />
<Counter Name="% Pages Meeting Goal" HigherIsBetter="true" />
<Counter Name="Pages/Sec" HigherIsBetter="true" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:Request">
<Counters>
<Counter Name="Total Requests" HigherIsBetter="true" />
<Counter Name="Passed Requests" HigherIsBetter="true" />
<Counter Name="Failed Requests" />
<Counter Name="Cached Requests" HigherIsBetter="true" />
<Counter Name="Requests/Sec" HigherIsBetter="true" />
<Counter Name="Passed Requests/Sec" HigherIsBetter="true" />
<Counter Name="Failed Requests/Sec" />
<Counter Name="Avg. First Byte Time" />
<Counter Name="Avg. Response Time" />
<Counter Name="Avg. Connection Wait Time">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<RuleParameters>
<RuleParameter Name="DependentCategory" Value="LoadTest:Page" />
<RuleParameter Name="DependentCounter" Value="Avg. Page Time" />
<RuleParameter Name="DependentInstance" Value="_Total" />
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="0.25" />
<RuleParameter Name="CriticalThreshold" Value="0.5" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Avg. Content Length" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:LogEntries">
<Counters>
<Counter Name="Total Log Entries" />
<Counter Name="Log Entries/Sec" />
</Counters>
</CounterCategory>
</CounterCategories>
</CounterSet>
<CounterSet Name="Controller" CounterSetType="Controller" LocId="CounterSet_Controller">
<CounterCategories>
<CounterCategory Name="Memory">
<Counters>
<Counter Name="% Committed Bytes In Use" Range="100" />
<Counter Name="Available MBytes" RangeGroup="Memory Bytes" HigherIsBetter="true">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="False" />
<RuleParameter Name="WarningThreshold" Value="100" />
<RuleParameter Name="CriticalThreshold" Value="50" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Page Faults/sec" />
<Counter Name="Pages/sec" />
<Counter Name="Pool Paged Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Pool Nonpaged bytes" RangeGroup="Memory Bytes" />
</Counters>
</CounterCategory>
<CounterCategory Name="Network Interface">
<Counters>
<Counter Name="Bytes Received/sec" RangeGroup="Network Bytes" />
<Counter Name="Bytes Sent/sec" RangeGroup="Network Bytes" />
<Counter Name="Output Queue Length">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="1.5" />
<RuleParameter Name="CriticalThreshold" Value="2" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Packets Received/sec" RangeGroup="Network Packets" />
<Counter Name="Packets Sent/sec" RangeGroup="Network Packets" />
<Counter Name="Current Bandwidth" RangeGroup="Network Bytes" />
<Counter Name="Bytes Total/sec" RangeGroup="Network Bytes">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<RuleParameters>
<RuleParameter Name="DependentCategory" Value="Network Interface" />
<RuleParameter Name="DependentCounter" Value="Current Bandwidth" />
<RuleParameter Name="DependentInstance" Value="" />
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="0.6" />
<RuleParameter Name="CriticalThreshold" Value="0.7" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
</Counters>
<Instances>
<Instance Name="*" />
</Instances>
</CounterCategory>
<CounterCategory Name="PhysicalDisk">
<Counters>
<Counter Name="% Disk Read Time" Range="100" />
<Counter Name="% Disk Time" Range="100" />
<Counter Name="% Disk Write Time" Range="100" />
<Counter Name="% Idle Time" Range="100" HigherIsBetter="true">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="False" />
<RuleParameter Name="WarningThreshold" Value="40" />
<RuleParameter Name="CriticalThreshold" Value="20" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Avg. Disk Bytes/Read" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Bytes/Transfer" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Bytes/Write" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk Read Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk Write Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Current Disk Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk sec/Read" RangeGroup="Disk sec" />
<Counter Name="Avg. Disk sec/Transfer" RangeGroup="Disk sec" />
<Counter Name="Avg. Disk sec/Write" RangeGroup="Disk sec" />
<Counter Name="Disk Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Read Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Reads/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Disk Transfers/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Disk Write Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Writes/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Split IO/Sec" RangeGroup="Disk Transfers sec" />
</Counters>
<Instances>
<Instance Name="*" />
</Instances>
</CounterCategory>
<CounterCategory Name="Processor">
<Counters>
<Counter Name="% Processor Time" Range="100">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="75" />
<RuleParameter Name="CriticalThreshold" Value="90" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="% Privileged Time" Range="100" />
<Counter Name="% User Time" Range="100" />
</Counters>
<Instances>
<Instance Name="_Total" />
</Instances>
</CounterCategory>
<CounterCategory Name="System">
<Counters>
<Counter Name="Context Switches/sec" />
<Counter Name="Processes" />
<Counter Name="Processor Queue Length" />
<Counter Name="Threads" />
</Counters>
</CounterCategory>
<CounterCategory Name="Process">
<Counters>
<Counter Name="% Processor Time" RangeGroup="Processor Time" />
<Counter Name="% Privileged Time" RangeGroup="Processor Time" />
<Counter Name="% User Time" RangeGroup="Processor Time" />
<Counter Name="Handle Count" />
<Counter Name="Thread Count" />
<Counter Name="Private Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Virtual Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Working Set" RangeGroup="Memory Bytes" />
</Counters>
<Instances>
<Instance Name="QTController" />
</Instances>
</CounterCategory>
</CounterCategories>
<DefaultCountersForAutomaticGraphs>
<DefaultCounter CategoryName="Processor" CounterName="% Processor Time" InstanceName="_Total" GraphName="" />
<DefaultCounter CategoryName="Memory" CounterName="Available MBytes" InstanceName="" GraphName="" />
</DefaultCountersForAutomaticGraphs>
</CounterSet>
<CounterSet Name="Agent" CounterSetType="Agent" LocId="CounterSet_Agent">
<CounterCategories>
<CounterCategory Name="Memory">
<Counters>
<Counter Name="% Committed Bytes In Use" Range="100" />
<Counter Name="Available MBytes" RangeGroup="Memory Bytes" HigherIsBetter="true">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="False" />
<RuleParameter Name="WarningThreshold" Value="100" />
<RuleParameter Name="CriticalThreshold" Value="50" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Page Faults/sec" />
<Counter Name="Pages/sec" />
<Counter Name="Pool Paged Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Pool Nonpaged bytes" RangeGroup="Memory Bytes" />
</Counters>
</CounterCategory>
<CounterCategory Name="Network Interface">
<Counters>
<Counter Name="Bytes Received/sec" RangeGroup="Network Bytes" />
<Counter Name="Bytes Sent/sec" RangeGroup="Network Bytes" />
<Counter Name="Output Queue Length">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="1.5" />
<RuleParameter Name="CriticalThreshold" Value="2" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Packets Received/sec" RangeGroup="Network Packets" />
<Counter Name="Packets Sent/sec" RangeGroup="Network Packets" />
<Counter Name="Current Bandwidth" RangeGroup="Network Bytes" />
<Counter Name="Bytes Total/sec" RangeGroup="Network Bytes">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<RuleParameters>
<RuleParameter Name="DependentCategory" Value="Network Interface" />
<RuleParameter Name="DependentCounter" Value="Current Bandwidth" />
<RuleParameter Name="DependentInstance" Value="" />
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="0.6" />
<RuleParameter Name="CriticalThreshold" Value="0.7" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
</Counters>
<Instances>
<Instance Name="*" />
</Instances>
</CounterCategory>
<CounterCategory Name="PhysicalDisk">
<Counters>
<Counter Name="% Disk Read Time" Range="100" />
<Counter Name="% Disk Time" Range="100" />
<Counter Name="% Disk Write Time" Range="100" />
<Counter Name="% Idle Time" Range="100" HigherIsBetter="true">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="False" />
<RuleParameter Name="WarningThreshold" Value="40" />
<RuleParameter Name="CriticalThreshold" Value="20" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Avg. Disk Bytes/Read" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Bytes/Transfer" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Bytes/Write" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk Read Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk Write Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Current Disk Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk sec/Read" RangeGroup="Disk sec" />
<Counter Name="Avg. Disk sec/Transfer" RangeGroup="Disk sec" />
<Counter Name="Avg. Disk sec/Write" RangeGroup="Disk sec" />
<Counter Name="Disk Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Read Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Reads/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Disk Transfers/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Disk Write Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Writes/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Split IO/Sec" RangeGroup="Disk Transfers sec" />
</Counters>
<Instances>
<Instance Name="*" />
</Instances>
</CounterCategory>
<CounterCategory Name="Processor">
<Counters>
<Counter Name="% Processor Time" Range="100">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="75" />
<RuleParameter Name="CriticalThreshold" Value="90" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="% Privileged Time" Range="100" />
<Counter Name="% User Time" Range="100" />
</Counters>
<Instances>
<Instance Name="0" />
<Instance Name="_Total" />
</Instances>
</CounterCategory>
<CounterCategory Name="System">
<Counters>
<Counter Name="Context Switches/sec" />
<Counter Name="Processes" />
<Counter Name="Processor Queue Length" />
<Counter Name="Threads" />
</Counters>
</CounterCategory>
<CounterCategory Name="Process">
<Counters>
<Counter Name="% Processor Time" RangeGroup="Processor Time" />
<Counter Name="% Privileged Time" RangeGroup="Processor Time" />
<Counter Name="% User Time" RangeGroup="Processor Time" />
<Counter Name="Handle Count" />
<Counter Name="Thread Count" />
<Counter Name="Private Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Virtual Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Working Set" RangeGroup="Memory Bytes" />
</Counters>
<Instances>
<Instance Name="devenv" />
<Instance Name="QTAgentService" />
<Instance Name="QTAgent" />
<Instance Name="QTAgent32" />
<Instance Name="QTDCAgent" />
<Instance Name="QTDCAgent32" />
</Instances>
</CounterCategory>
</CounterCategories>
<DefaultCountersForAutomaticGraphs>
<DefaultCounter CategoryName="Processor" CounterName="% Processor Time" InstanceName="0" GraphName="" RunType="Local" />
<DefaultCounter CategoryName="Processor" CounterName="% Processor Time" InstanceName="_Total" GraphName="" RunType="Remote" />
<DefaultCounter CategoryName="Memory" CounterName="Available MBytes" InstanceName="" GraphName="" />
</DefaultCountersForAutomaticGraphs>
</CounterSet>
</CounterSets>
<RunConfigurations>
<RunConfiguration Name="Run Settings1" Description="" ResultsStoreType="Database" TimingDetailsStorage="AllIndividualDetails" SaveTestLogsOnError="true" SaveTestLogsFrequency="1" MaxErrorDetails="200" MaxErrorsPerType="1000" MaxThresholdViolations="1000" MaxRequestUrlsReported="1000" UseTestIterations="true" RunDuration="600" WarmupTime="0" CoolDownTime="0" TestIterations="20" WebTestConnectionModel="ConnectionPerUser" WebTestConnectionPoolSize="50" SampleRate="5" ValidationLevel="High" SqlTracingConnectString="" SqlTracingConnectStringDisplayValue="" SqlTracingDirectory="" SqlTracingEnabled="false" SqlTracingMinimumDuration="500" RunUnitTestsInAppDomain="true">
<CounterSetMappings>
<CounterSetMapping ComputerName="[CONTROLLER MACHINE]">
<CounterSetReferences>
<CounterSetReference CounterSetName="LoadTest" />
<CounterSetReference CounterSetName="Controller" />
</CounterSetReferences>
</CounterSetMapping>
<CounterSetMapping ComputerName="[AGENT MACHINES]">
<CounterSetReferences>
<CounterSetReference CounterSetName="Agent" />
</CounterSetReferences>
</CounterSetMapping>
</CounterSetMappings>
</RunConfiguration>
</RunConfigurations>
</LoadTest>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LoadTest Name="LoadTest2" Description="" Owner="" storage="c:\users\gerdes\documents\visual studio 2010\lil_vstt_plugins\testproject1\loadtest2.loadtest" Priority="2147483647" Enabled="true" CssProjectStructure="" CssIteration="" DeploymentItemsEditable="" WorkItemIds="" TraceLevel="None" CurrentRunConfig="Run Settings1" Id="fc290026-ccfc-431e-9205-3b60d7d6f429" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Scenarios>
<Scenario Name="Scenario1" DelayBetweenIterations="1" PercentNewUsers="0" IPSwitching="true" TestMixType="PercentageOfUsersRunning" ApplyDistributionToPacingDelay="true" MaxTestIterations="0" DisableDuringWarmup="false" DelayStartTime="0" AllowedAgents="">
<ThinkProfile Value="0.2" Pattern="NormalDistribution" />
<LoadProfile Pattern="Constant" InitialUsers="1" />
<TestMix>
<TestProfile Name="TestMethod1" Path="bin\release\testproject1.dll" Id="59863143-3238-122e-4d8a-637b491cc755" Percentage="100" Type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</TestMix>
<BrowserMix>
<BrowserProfile Percentage="100">
<Browser Name="Internet Explorer 7.0" MaxConnections="2">
<Headers>
<Header Name="User-Agent" Value="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" />
<Header Name="Accept" Value="*/*" />
<Header Name="Accept-Language" Value="{{$IEAcceptLanguage}}" />
<Header Name="Accept-Encoding" Value="GZIP" />
</Headers>
</Browser>
</BrowserProfile>
</BrowserMix>
<NetworkMix>
<NetworkProfile Percentage="100">
<Network Name="LAN" BandwidthInKbps="1000000" NetworkProfileConfigurationXml="&lt;Emulation&gt;&lt;VirtualChannel name=&quot;defaultChannel&quot;&gt;&lt;FilterList/&gt;&lt;VirtualLink instances=&quot;1&quot; name=&quot;defaultLink&quot;&gt;&lt;LinkRule dir=&quot;upstream&quot;&gt;&lt;Bandwidth&gt;&lt;Speed unit=&quot;kbps&quot;&gt;1000000&lt;/Speed&gt;&lt;/Bandwidth&gt;&lt;/LinkRule&gt;&lt;LinkRule dir=&quot;downstream&quot;&gt;&lt;Bandwidth&gt;&lt;Speed unit=&quot;kbps&quot;&gt;1000000&lt;/Speed&gt;&lt;/Bandwidth&gt;&lt;/LinkRule&gt;&lt;/VirtualLink&gt;&lt;/VirtualChannel&gt;&lt;/Emulation&gt;" />
</NetworkProfile>
</NetworkMix>
</Scenario>
</Scenarios>
<CounterSets>
<CounterSet Name="LoadTest" CounterSetType="LoadTest" LocId="">
<CounterCategories>
<CounterCategory Name="LoadTest:Scenario">
<Counters>
<Counter Name="User Load" HigherIsBetter="true" />
<Counter Name="Tests Running" HigherIsBetter="true" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:Test">
<Counters>
<Counter Name="Total Tests" HigherIsBetter="true" />
<Counter Name="Passed Tests" HigherIsBetter="true" />
<Counter Name="Failed Tests" />
<Counter Name="Tests/Sec" HigherIsBetter="true" />
<Counter Name="Passed Tests/Sec" HigherIsBetter="true" />
<Counter Name="Failed Tests/Sec" />
<Counter Name="Avg. Requests/Test" HigherIsBetter="true" />
<Counter Name="Avg. Test Time" />
<Counter Name="% Time in LoadTestPlugin" />
<Counter Name="% Time in WebTest code" />
<Counter Name="% Time in Rules" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:Transaction">
<Counters>
<Counter Name="Total Transactions" HigherIsBetter="true" />
<Counter Name="Avg. Transaction Time" />
<Counter Name="Avg. Response Time" />
<Counter Name="Transactions/Sec" HigherIsBetter="true" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:Errors">
<Counters>
<Counter Name="Http Errors" />
<Counter Name="Validation Rule Errors" />
<Counter Name="Extraction Rule Errors" />
<Counter Name="Requests Timed Out" />
<Counter Name="Exceptions" />
<Counter Name="Total Errors" />
<Counter Name="Errors/Sec" />
<Counter Name="Threshold Violations/Sec" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:Page">
<Counters>
<Counter Name="Total Pages" HigherIsBetter="true" />
<Counter Name="Avg. Page Time" />
<Counter Name="Page Response Time Goal" HigherIsBetter="true" />
<Counter Name="% Pages Meeting Goal" HigherIsBetter="true" />
<Counter Name="Pages/Sec" HigherIsBetter="true" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:Request">
<Counters>
<Counter Name="Total Requests" HigherIsBetter="true" />
<Counter Name="Passed Requests" HigherIsBetter="true" />
<Counter Name="Failed Requests" />
<Counter Name="Cached Requests" HigherIsBetter="true" />
<Counter Name="Requests/Sec" HigherIsBetter="true" />
<Counter Name="Passed Requests/Sec" HigherIsBetter="true" />
<Counter Name="Failed Requests/Sec" />
<Counter Name="Avg. First Byte Time" />
<Counter Name="Avg. Response Time" />
<Counter Name="Avg. Connection Wait Time">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<RuleParameters>
<RuleParameter Name="DependentCategory" Value="LoadTest:Page" />
<RuleParameter Name="DependentCounter" Value="Avg. Page Time" />
<RuleParameter Name="DependentInstance" Value="_Total" />
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="0.25" />
<RuleParameter Name="CriticalThreshold" Value="0.5" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Avg. Content Length" />
</Counters>
</CounterCategory>
<CounterCategory Name="LoadTest:LogEntries">
<Counters>
<Counter Name="Total Log Entries" />
<Counter Name="Log Entries/Sec" />
</Counters>
</CounterCategory>
</CounterCategories>
</CounterSet>
<CounterSet Name="Controller" CounterSetType="Controller" LocId="CounterSet_Controller">
<CounterCategories>
<CounterCategory Name="Memory">
<Counters>
<Counter Name="% Committed Bytes In Use" Range="100" />
<Counter Name="Available MBytes" RangeGroup="Memory Bytes" HigherIsBetter="true">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="False" />
<RuleParameter Name="WarningThreshold" Value="100" />
<RuleParameter Name="CriticalThreshold" Value="50" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Page Faults/sec" />
<Counter Name="Pages/sec" />
<Counter Name="Pool Paged Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Pool Nonpaged bytes" RangeGroup="Memory Bytes" />
</Counters>
</CounterCategory>
<CounterCategory Name="Network Interface">
<Counters>
<Counter Name="Bytes Received/sec" RangeGroup="Network Bytes" />
<Counter Name="Bytes Sent/sec" RangeGroup="Network Bytes" />
<Counter Name="Output Queue Length">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="1.5" />
<RuleParameter Name="CriticalThreshold" Value="2" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Packets Received/sec" RangeGroup="Network Packets" />
<Counter Name="Packets Sent/sec" RangeGroup="Network Packets" />
<Counter Name="Current Bandwidth" RangeGroup="Network Bytes" />
<Counter Name="Bytes Total/sec" RangeGroup="Network Bytes">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<RuleParameters>
<RuleParameter Name="DependentCategory" Value="Network Interface" />
<RuleParameter Name="DependentCounter" Value="Current Bandwidth" />
<RuleParameter Name="DependentInstance" Value="" />
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="0.6" />
<RuleParameter Name="CriticalThreshold" Value="0.7" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
</Counters>
<Instances>
<Instance Name="*" />
</Instances>
</CounterCategory>
<CounterCategory Name="PhysicalDisk">
<Counters>
<Counter Name="% Disk Read Time" Range="100" />
<Counter Name="% Disk Time" Range="100" />
<Counter Name="% Disk Write Time" Range="100" />
<Counter Name="% Idle Time" Range="100" HigherIsBetter="true">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="False" />
<RuleParameter Name="WarningThreshold" Value="40" />
<RuleParameter Name="CriticalThreshold" Value="20" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Avg. Disk Bytes/Read" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Bytes/Transfer" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Bytes/Write" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk Read Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk Write Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Current Disk Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk sec/Read" RangeGroup="Disk sec" />
<Counter Name="Avg. Disk sec/Transfer" RangeGroup="Disk sec" />
<Counter Name="Avg. Disk sec/Write" RangeGroup="Disk sec" />
<Counter Name="Disk Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Read Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Reads/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Disk Transfers/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Disk Write Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Writes/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Split IO/Sec" RangeGroup="Disk Transfers sec" />
</Counters>
<Instances>
<Instance Name="*" />
</Instances>
</CounterCategory>
<CounterCategory Name="Processor">
<Counters>
<Counter Name="% Processor Time" Range="100">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="75" />
<RuleParameter Name="CriticalThreshold" Value="90" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="% Privileged Time" Range="100" />
<Counter Name="% User Time" Range="100" />
</Counters>
<Instances>
<Instance Name="_Total" />
</Instances>
</CounterCategory>
<CounterCategory Name="System">
<Counters>
<Counter Name="Context Switches/sec" />
<Counter Name="Processes" />
<Counter Name="Processor Queue Length" />
<Counter Name="Threads" />
</Counters>
</CounterCategory>
<CounterCategory Name="Process">
<Counters>
<Counter Name="% Processor Time" RangeGroup="Processor Time" />
<Counter Name="% Privileged Time" RangeGroup="Processor Time" />
<Counter Name="% User Time" RangeGroup="Processor Time" />
<Counter Name="Handle Count" />
<Counter Name="Thread Count" />
<Counter Name="Private Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Virtual Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Working Set" RangeGroup="Memory Bytes" />
</Counters>
<Instances>
<Instance Name="QTController" />
</Instances>
</CounterCategory>
</CounterCategories>
<DefaultCountersForAutomaticGraphs>
<DefaultCounter CategoryName="Processor" CounterName="% Processor Time" InstanceName="_Total" GraphName="" />
<DefaultCounter CategoryName="Memory" CounterName="Available MBytes" InstanceName="" GraphName="" />
</DefaultCountersForAutomaticGraphs>
</CounterSet>
<CounterSet Name="Agent" CounterSetType="Agent" LocId="CounterSet_Agent">
<CounterCategories>
<CounterCategory Name="Memory">
<Counters>
<Counter Name="% Committed Bytes In Use" Range="100" />
<Counter Name="Available MBytes" RangeGroup="Memory Bytes" HigherIsBetter="true">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="False" />
<RuleParameter Name="WarningThreshold" Value="100" />
<RuleParameter Name="CriticalThreshold" Value="50" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Page Faults/sec" />
<Counter Name="Pages/sec" />
<Counter Name="Pool Paged Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Pool Nonpaged bytes" RangeGroup="Memory Bytes" />
</Counters>
</CounterCategory>
<CounterCategory Name="Network Interface">
<Counters>
<Counter Name="Bytes Received/sec" RangeGroup="Network Bytes" />
<Counter Name="Bytes Sent/sec" RangeGroup="Network Bytes" />
<Counter Name="Output Queue Length">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="1.5" />
<RuleParameter Name="CriticalThreshold" Value="2" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Packets Received/sec" RangeGroup="Network Packets" />
<Counter Name="Packets Sent/sec" RangeGroup="Network Packets" />
<Counter Name="Current Bandwidth" RangeGroup="Network Bytes" />
<Counter Name="Bytes Total/sec" RangeGroup="Network Bytes">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<RuleParameters>
<RuleParameter Name="DependentCategory" Value="Network Interface" />
<RuleParameter Name="DependentCounter" Value="Current Bandwidth" />
<RuleParameter Name="DependentInstance" Value="" />
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="0.6" />
<RuleParameter Name="CriticalThreshold" Value="0.7" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
</Counters>
<Instances>
<Instance Name="*" />
</Instances>
</CounterCategory>
<CounterCategory Name="PhysicalDisk">
<Counters>
<Counter Name="% Disk Read Time" Range="100" />
<Counter Name="% Disk Time" Range="100" />
<Counter Name="% Disk Write Time" Range="100" />
<Counter Name="% Idle Time" Range="100" HigherIsBetter="true">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="False" />
<RuleParameter Name="WarningThreshold" Value="40" />
<RuleParameter Name="CriticalThreshold" Value="20" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="Avg. Disk Bytes/Read" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Bytes/Transfer" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Bytes/Write" RangeGroup="DiskBytesRate" />
<Counter Name="Avg. Disk Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk Read Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk Write Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Current Disk Queue Length" RangeGroup="Disk Queue Length" />
<Counter Name="Avg. Disk sec/Read" RangeGroup="Disk sec" />
<Counter Name="Avg. Disk sec/Transfer" RangeGroup="Disk sec" />
<Counter Name="Avg. Disk sec/Write" RangeGroup="Disk sec" />
<Counter Name="Disk Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Read Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Reads/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Disk Transfers/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Disk Write Bytes/sec" RangeGroup="Disk Bytes sec" />
<Counter Name="Disk Writes/sec" RangeGroup="Disk Transfers sec" />
<Counter Name="Split IO/Sec" RangeGroup="Disk Transfers sec" />
</Counters>
<Instances>
<Instance Name="*" />
</Instances>
</CounterCategory>
<CounterCategory Name="Processor">
<Counters>
<Counter Name="% Processor Time" Range="100">
<ThresholdRules>
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant, Microsoft.VisualStudio.QualityTools.LoadTest">
<RuleParameters>
<RuleParameter Name="AlertIfOver" Value="True" />
<RuleParameter Name="WarningThreshold" Value="75" />
<RuleParameter Name="CriticalThreshold" Value="90" />
</RuleParameters>
</ThresholdRule>
</ThresholdRules>
</Counter>
<Counter Name="% Privileged Time" Range="100" />
<Counter Name="% User Time" Range="100" />
</Counters>
<Instances>
<Instance Name="0" />
<Instance Name="_Total" />
</Instances>
</CounterCategory>
<CounterCategory Name="System">
<Counters>
<Counter Name="Context Switches/sec" />
<Counter Name="Processes" />
<Counter Name="Processor Queue Length" />
<Counter Name="Threads" />
</Counters>
</CounterCategory>
<CounterCategory Name="Process">
<Counters>
<Counter Name="% Processor Time" RangeGroup="Processor Time" />
<Counter Name="% Privileged Time" RangeGroup="Processor Time" />
<Counter Name="% User Time" RangeGroup="Processor Time" />
<Counter Name="Handle Count" />
<Counter Name="Thread Count" />
<Counter Name="Private Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Virtual Bytes" RangeGroup="Memory Bytes" />
<Counter Name="Working Set" RangeGroup="Memory Bytes" />
</Counters>
<Instances>
<Instance Name="devenv" />
<Instance Name="QTAgentService" />
<Instance Name="QTAgent" />
<Instance Name="QTAgent32" />
<Instance Name="QTDCAgent" />
<Instance Name="QTDCAgent32" />
</Instances>
</CounterCategory>
</CounterCategories>
<DefaultCountersForAutomaticGraphs>
<DefaultCounter CategoryName="Processor" CounterName="% Processor Time" InstanceName="0" GraphName="" RunType="Local" />
<DefaultCounter CategoryName="Processor" CounterName="% Processor Time" InstanceName="_Total" GraphName="" RunType="Remote" />
<DefaultCounter CategoryName="Memory" CounterName="Available MBytes" InstanceName="" GraphName="" />
</DefaultCountersForAutomaticGraphs>
</CounterSet>
</CounterSets>
<RunConfigurations>
<RunConfiguration Name="Run Settings1" Description="" ResultsStoreType="Database" TimingDetailsStorage="AllIndividualDetails" SaveTestLogsOnError="true" SaveTestLogsFrequency="1" MaxErrorDetails="200" MaxErrorsPerType="1000" MaxThresholdViolations="1000" MaxRequestUrlsReported="1000" UseTestIterations="true" RunDuration="600" WarmupTime="0" CoolDownTime="0" TestIterations="20" WebTestConnectionModel="ConnectionPerUser" WebTestConnectionPoolSize="50" SampleRate="5" ValidationLevel="High" SqlTracingConnectString="" SqlTracingConnectStringDisplayValue="" SqlTracingDirectory="" SqlTracingEnabled="false" SqlTracingMinimumDuration="500" RunUnitTestsInAppDomain="true">
<CounterSetMappings>
<CounterSetMapping ComputerName="[CONTROLLER MACHINE]">
<CounterSetReferences>
<CounterSetReference CounterSetName="LoadTest" />
<CounterSetReference CounterSetName="Controller" />
</CounterSetReferences>
</CounterSetMapping>
<CounterSetMapping ComputerName="[AGENT MACHINES]">
<CounterSetReferences>
<CounterSetReference CounterSetName="Agent" />
</CounterSetReferences>
</CounterSetMapping>
</CounterSetMappings>
</RunConfiguration>
</RunConfigurations>
<LoadTestPlugins>
<LoadTestPlugin Classname="LIL_VSTT_Plugins.SetTestParameter, LIL_VSTT_Plugins, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null" DisplayName="Set Test Context Parameters" Description="(C) Copyright 2011 LIGHTS IN LINE AB&#xD;&#xA;Sätter parametrar i testcontextet för tester i mixen hämtat från en CSV fil">
<RuleParameters>
<RuleParameter Name="Connection_String" Value="C:\Users\gerdes\Userdata.csv" />
<RuleParameter Name="Has_col_name" Value="True" />
<RuleParameter Name="Autosplit" Value="False" />
<RuleParameter Name="Parameter_Name" Value="UserName2" />
<RuleParameter Name="LogFilePathString" Value="C:\Users\gerdes\Fungerande2.log" />
<RuleParameter Name="LogFileAppendID" Value="True" />
<RuleParameter Name="LogFileAppendName" Value="False" />
<RuleParameter Name="Use_Random" Value="False" />
<RuleParameter Name="Use_Unique" Value="False" />
<RuleParameter Name="Use_UniqueIteration" Value="False" />
<RuleParameter Name="Use_Loop" Value="True" />
<RuleParameter Name="Log_To_File" Value="True" />
<RuleParameter Name="Test_Names" Value="" />
<RuleParameter Name="Scenario_Names" Value="" />
<RuleParameter Name="Agent_Names" Value="" />
</RuleParameters>
</LoadTestPlugin>
<LoadTestPlugin Classname="LIL_VSTT_Plugins.SetTestParameter, LIL_VSTT_Plugins, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null" DisplayName="Set Test Context Parameters" Description="(C) Copyright 2011 LIGHTS IN LINE AB&#xD;&#xA;Sätter parametrar i testcontextet för tester i mixen hämtat från en CSV fil">
<RuleParameters>
<RuleParameter Name="Connection_String" Value="C:\Users\gerdes\Userdata.csv" />
<RuleParameter Name="Has_col_name" Value="True" />
<RuleParameter Name="Autosplit" Value="False" />
<RuleParameter Name="Parameter_Name" Value="UserName" />
<RuleParameter Name="LogFilePathString" Value="C:\Users\gerdes\Fungerande.log" />
<RuleParameter Name="LogFileAppendID" Value="True" />
<RuleParameter Name="LogFileAppendName" Value="False" />
<RuleParameter Name="Use_Random" Value="False" />
<RuleParameter Name="Use_Unique" Value="False" />
<RuleParameter Name="Use_UniqueIteration" Value="False" />
<RuleParameter Name="Use_Loop" Value="True" />
<RuleParameter Name="Log_To_File" Value="True" />
<RuleParameter Name="Test_Names" Value="" />
<RuleParameter Name="Scenario_Names" Value="" />
<RuleParameter Name="Agent_Names" Value="" />
</RuleParameters>
</LoadTestPlugin>
</LoadTestPlugins>
</LoadTest>
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TestProject1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("TestProject1")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c10cf0ce-1b37-49b2-8ef1-2b588d2fde1d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{01CF59F6-F912-447A-91BC-0301FDA09C02}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TestProject1</RootNamespace>
<AssemblyName>TestProject1</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>WebTest</TestProjectType>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>4.0</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
<Visible>False</Visible>
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UnitTest1.cs" />
<Compile Include="WebTest1Coded.cs" />
</ItemGroup>
<ItemGroup>
<None Include="LoadTest2.loadtest">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="LoadTest1.loadtest">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="WebTest2.webtest">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Shadow Include="Test References\LIL_VSTT_Plugins.accessor" />
<None Include="Userdata.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="WebTest1.webtest">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LIL_VSTT_Plugins\LIL_VSTT_Plugins.csproj">
<Project>{06A22593-601E-4386-917A-9835DE30E14E}</Project>
<Name>LIL_VSTT_Plugins</Name>
</ProjectReference>
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TestProject1
{
/// <summary>
/// Summary description for UnitTest1
/// </summary>
[TestClass]
public class UnitTest1
{
public UnitTest1()
{
//
// TODO: Add constructor logic here
//
}
private TestContext testContextInstance;
/// <summary>
///Gets or sets the test context which provides
///information about and functionality for the current test run.
///</summary>
public TestContext TestContext
{
get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}
#region Additional test attributes
//
// You can use the following additional attributes as you write your tests:
//
// Use ClassInitialize to run code before running the first test in the class
// [ClassInitialize()]
// public static void MyClassInitialize(TestContext testContext) { }
//
// Use ClassCleanup to run code after all tests in a class have run
// [ClassCleanup()]
// public static void MyClassCleanup() { }
//
// Use TestInitialize to run code before running each test
// [TestInitialize()]
// public void MyTestInitialize() { }
//
// Use TestCleanup to run code after each test has run
// [TestCleanup()]
// public void MyTestCleanup() { }
//
#endregion
[TestMethod]
public void TestMethod1()
{
TestContext.WriteLine("Current Test Context parameters:");
IDictionary<string, object> dic = (IDictionary<string, object>)TestContext.Properties;
foreach (KeyValuePair<string, object> pair in dic)
TestContext.WriteLine(pair.Key + ": " + pair.Value.ToString());
TestContext.WriteLine("End of Current Test Context parameters.");
}
}
}
UserName
anjo
anma
anro
arbt1
arbt10
arbt2
arbt3
arbt4
arbt5
arbt6
arbt7
arbt8
arbt9
bm1
boba
caca
caca10
caca3
cami
dath
diet1
diet2
diet3
diet4
diet5
ebin
edi
edi_user
eman
emla
emla2
empe
emsu
emsv
kaur
kewa
kura1
kura2
kura3
kura4
kura5
lak0000001
lak0000002
lak0000003
lak0000004
lak0000005
lak0000006
lak1
lak10
lak11
lak12
lak13
lak14
lak15
lak16
lak17
lak18
lak19
lak2
lak20
lak3
lak4
lak5
lak6
lak7
lak8
lak9
lakA
lakB
lakC
lakD
lego
lgry1
lilu
logo1
logo2
logo3
logo4
logo5
maan
maul
melior
nigr
olle
peka
pepe
pewi
pipe
psyk1
psyk2
psyk3
psyk4
psyk5
saan
safe
saha
sajo
saka
sekr000001
sekr000002
sekr000003
sekr000004
sekr000005
sekr000006
sekr1
sekr10
sekr11
sekr12
sekr13
sekr14
sekr15
sekr16
sekr17
sekr18
sekr19
sekr2
sekr20
sekr3
sekr4
sekr5
sekr6
sekr7
sekr8
sekr9
sekrA
sekrB
sekrC
sekrD
sjgy1
sjgy10
sjgy2
sjgy3
sjgy4
sjgy5
sjgy6
sjgy7
sjgy8
sjgy9
sola
ssk0000001
ssk0000002
ssk0000003
ssk0000004
ssk0000005
ssk0000006
ssk1
ssk10
ssk11
ssk12
ssk13
ssk14
ssk15
ssk16
ssk17
ssk18
ssk19
ssk2
ssk20
ssk3
ssk4
ssk5
ssk6
ssk7
ssk8
ssk9
sskA
sskB
sskC
sskD
stji
sys
syslab
tst1
ulkl
utb1
utb2
voklej
ydde1
yddelak
yddessk
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<WebTest Name="WebTest1" Id="c649760b-6dd8-4210-8a6d-3c6596d08668" Owner="" Priority="2147483647" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" StopOnError="False" RecordedResultFile="WebTest1.a5a27e2d-474c-43bb-be4d-1b12e85851a0.rec.webtestresult">
<Items>
<Request Method="POST" Version="1.1" Url="http://www.lil.nu/" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="">
<Headers>
<Header Name="Username" Value="{{DataSource1.Userdata#csv.UserName}}" />
</Headers>
<ExtractionRules>
<ExtractionRule Classname="LIL_VSTT_Plugins.NestedExtractionRule, LIL_VSTT_Plugins, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null" VariableName="TableRowTest" DisplayName="Nested Extraction" Description="(C) Copyright 2011 LIGHTS IN LINE AB&#xD;&#xA;Kombination av två extractions där den andra söker i resultatet av den första.">
<RuleParameters>
<RuleParameter Name="Start1" Value="&lt;table width=&quot;100%&quot;" />
<RuleParameter Name="End1" Value="&lt;/tr&gt;&lt;/table&gt;" />
<RuleParameter Name="Start2" Value="&lt;td id=&quot;start&quot; class=&quot;" />
<RuleParameter Name="End2" Value="&quot; onMouseOver" />
</RuleParameters>
</ExtractionRule>
</ExtractionRules>
<FormPostHttpBody>
<FormPostParameter Name="TestParam" Value="LORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR" RecordedValue="" CorrelationBinding="" UrlEncode="True" />
</FormPostHttpBody>
</Request>
</Items>
<DataSources>
<DataSource Name="DataSource1" Provider="Microsoft.VisualStudio.TestTools.DataSource.CSV" Connection="|DataDirectory|\Userdata.csv">
<Tables>
<DataSourceTable Name="Userdata#csv" SelectColumns="SelectOnlyBoundColumns" AccessMethod="DoNotMoveCursor" />
</Tables>
</DataSource>
</DataSources>
<WebTestPlugins>
<WebTestPlugin Classname="LIL_VSTT_Plugins.UniqueOnce, LIL_VSTT_Plugins, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null" DisplayName="Datasource Unique Once" Description="(C) Copyright 2011 LIGHTS IN LINE AB&#xD;&#xA;OBS! Läs hela! Styr datasource selection till att endast göras en gång per iteration. Du måste ändra i din datasource Access Metod till Do Not Move Automatically! WebTestUserId används för att välja rad. Använder de datasources som finns definerade i webtestet. Använd test mix based on users starting tests samt 0 percent new users.">
<RuleParameters>
<RuleParameter Name="DataSourceName" Value="DataSource1" />
<RuleParameter Name="DataSourceTableName" Value="Userdata#csv" />
<RuleParameter Name="Offset" Value="0" />
</RuleParameters>
</WebTestPlugin>
<WebTestPlugin Classname="LIL_VSTT_Plugins.myPlugin, LIL_VSTT_Plugins, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null" DisplayName="Expect 100 Off" Description="(C) Copyright 2011 LIGHTS IN LINE AB&#xD;&#xA;Stänger av .NET expected-100 headern i posts." />
</WebTestPlugins>
</WebTest>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30128.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TestProject1
{
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.TestTools.WebTesting;
public class WebTest1Coded : WebTest
{
public WebTest1Coded()
{
this.PreAuthenticate = true;
}
public override IEnumerator<WebTestRequest> GetRequestEnumerator()
{
WebTestRequest request1 = new WebTestRequest("http://www.lil.nu/");
request1.ParseDependentRequests = false;
request1.Encoding = System.Text.Encoding.GetEncoding("utf-8");
request1.Headers.Add(new WebTestRequestHeader("Cookie", "TestCookie=\"test,test\""));
yield return request1;
request1 = null;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<WebTest Name="WebTest2" Id="9af8354e-b982-4f5a-80f9-777eaed55003" Owner="" Priority="2147483647" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" StopOnError="False" RecordedResultFile="WebTest2.0af40a55-b204-4b39-8847-71e26a47524d.rec.webtestresult">
<Items>
<Request Method="GET" Guid="e02258d2-a380-44f4-891d-a8c829b5428c" Version="1.1" Url="http://www.lightsinline.se/" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" />
<TransactionTimer Name="Transaction2">
<Items>
<Request Method="GET" Guid="e02258d2-a380-44f4-891d-a8c829b5428c" Version="1.1" Url="http://www.lightsinline.se/" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" />
<Request Method="GET" Guid="e02258d2-a380-44f4-891d-a8c829b5428c" Version="1.1" Url="http://www.lightsinline.se/" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" />
</Items>
</TransactionTimer>
</Items>
<WebTestPlugins>
<WebTestPlugin Classname="LIL_VSTT_Plugins.dataGenTimestamp, LIL_VSTT_Plugins, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null" DisplayName="Data Generator Timestamp" Description="(C) Copyright 2011 LIGHTS IN LINE AB&#xD;&#xA;Genererar en timestamp som context parameter">
<RuleParameters>
<RuleParameter Name="ParamNameVal" Value="TimeStampParameter1" />
<RuleParameter Name="MillisecondsVal" Value="True" />
<RuleParameter Name="PrePageVal" Value="False" />
<RuleParameter Name="PreTransactionVal" Value="False" />
<RuleParameter Name="PreRequestVal" Value="True" />
</RuleParameters>
</WebTestPlugin>
</WebTestPlugins>
</WebTest>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="Trace and Test Impact" id="b4128d8d-ffff-46f4-afae-98bb333d8b32" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>These are test settings for Trace and Test Impact.</Description>
<Execution>
<TestTypeSpecific />
<AgentRule name="Execution Agents">
<DataCollectors>
<DataCollector uri="datacollector://microsoft/SystemInfo/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TestTools.DataCollection.SystemInfo.SystemInfoDataCollector, Microsoft.VisualStudio.TestTools.DataCollection.SystemInfo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="System Information">
</DataCollector>
<DataCollector uri="datacollector://microsoft/ActionLog/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TestTools.ManualTest.ActionLog.ActionLogPlugin, Microsoft.VisualStudio.TestTools.ManualTest.ActionLog, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Actions">
</DataCollector>
<DataCollector uri="datacollector://microsoft/HttpProxy/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.HttpProxyCollector, Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="ASP.NET Client Proxy for IntelliTrace and Test Impact">
</DataCollector>
<DataCollector uri="datacollector://microsoft/TestImpact/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.TestImpactDataCollector, Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Test Impact">
</DataCollector>
<DataCollector uri="datacollector://microsoft/TraceDebugger/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.TraceDebuggerDataCollector, Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="IntelliTrace">
</DataCollector>
</DataCollectors>
</AgentRule>
</Execution>
</TestSettings>
\ No newline at end of file