Commit 582965e0 582965e09345ac861f67580c3e63836eafd36b42 by Christian Gerdes

First testing of SetWebTestParameters plugin. Modified the loadtest and webtest …

…accordingly. Initial results seem promising.
1 parent 56ce0bb9
......@@ -27,12 +27,7 @@ namespace LIL_VSTT_Plugins
{
public class SetWebTestParameter : WebTestPlugin
{
// Summary:
// Initializes the load test plug-in.
//
// Parameters:
// loadTest:
// The load test to be executed.
// BETA VERY UNTESTED!!
private string myConnectionString = "";
private string myLogFileString = "";
......
<?xml version="1.0" encoding="utf-8"?>
<LoadTest Name="LoadTest1" Description="" Owner="" storage="c:\users\p950gec\source\repos\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">
<LoadTest Name="LoadTest1" Description="" Owner="" storage="d:\git\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="5" PercentNewUsers="0" IPSwitching="true" TestMixType="PercentageOfUsersRunning" ApplyDistributionToPacingDelay="true" MaxTestIterations="0" DisableDuringWarmup="false" DelayStartTime="0" AllowedAgents="">
<ThinkProfile Value="0.2" Pattern="On" />
<LoadProfile Pattern="Constant" InitialUsers="6" />
<ThinkProfile Value="0.2" Pattern="Off" />
<LoadProfile Pattern="Constant" InitialUsers="1" />
<TestMix>
<TestProfile Name="WebTest1" Path="webtest1.webtest" Id="c649760b-6dd8-4210-8a6d-3c6596d08668" Percentage="50" Type="Microsoft.VisualStudio.TestTools.WebStress.DeclarativeWebTestElement, Microsoft.VisualStudio.QualityTools.LoadTest, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<TestProfile Name="WebTest2" Path="webtest2.webtest" Id="91d7c2e3-269a-4c8c-bf86-34a59b587b73" Percentage="50" Type="Microsoft.VisualStudio.TestTools.WebStress.DeclarativeWebTestElement, Microsoft.VisualStudio.QualityTools.LoadTest, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<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=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</TestMix>
<BrowserMix>
<BrowserProfile Percentage="100">
......@@ -93,7 +92,7 @@
<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=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<RuleParameters>
<RuleParameter Name="DependentCategory" Value="LoadTest:Page" />
<RuleParameter Name="DependentCounter" Value="Avg. Page Time" />
......@@ -158,7 +157,7 @@
<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=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<RuleParameters>
<RuleParameter Name="DependentCategory" Value="Network Interface" />
<RuleParameter Name="DependentCounter" Value="Current Bandwidth" />
......@@ -304,7 +303,7 @@
<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=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<RuleParameters>
<RuleParameter Name="DependentCategory" Value="Network Interface" />
<RuleParameter Name="DependentCounter" Value="Current Bandwidth" />
......@@ -417,7 +416,7 @@
</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="6" CoolDownTime="0" TestIterations="8" WebTestConnectionModel="ConnectionPerUser" WebTestConnectionPoolSize="50" SampleRate="5" ValidationLevel="High" SqlTracingConnectString="" SqlTracingConnectStringDisplayValue="" SqlTracingDirectory="" SqlTracingEnabled="false" SqlTracingFileCount="2" SqlTracingRolloverEnabled="true" SqlTracingMinimumDuration="500" RunUnitTestsInAppDomain="true" CoreCount="0" ResourcesRetentionTimeInMinutes="0" AgentDiagnosticsLevel="Warning">
<RunConfiguration Name="Run Settings1" Description="" ResultsStoreType="Database" TimingDetailsStorage="AllIndividualDetails" SaveTestLogsOnError="true" SaveTestLogsFrequency="1" MaxErrorDetails="200" MaxErrorsPerType="1000" MaxThresholdViolations="1000" MaxRequestUrlsReported="1000" UseTestIterations="false" RunDuration="60" WarmupTime="0" CoolDownTime="0" TestIterations="12" WebTestConnectionModel="ConnectionPerUser" WebTestConnectionPoolSize="50" SampleRate="5" ValidationLevel="High" SqlTracingConnectString="" SqlTracingConnectStringDisplayValue="" SqlTracingDirectory="" SqlTracingEnabled="false" SqlTracingFileCount="2" SqlTracingRolloverEnabled="true" SqlTracingMinimumDuration="500" RunUnitTestsInAppDomain="true" CoreCount="0" ResourcesRetentionTimeInMinutes="0" AgentDiagnosticsLevel="Warning">
<CounterSetMappings>
<CounterSetMapping ComputerName="[CONTROLLER MACHINE]">
<CounterSetReferences>
......@@ -433,58 +432,4 @@
</CounterSetMappings>
</RunConfiguration>
</RunConfigurations>
<LoadTestPlugins>
<LoadTestPlugin Classname="LIL_VSTT_Plugins.SetTestParameter, LIL_VSTT_Plugins, Version=1.3.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="Parameter_Name" Value="UserName1" />
<RuleParameter Name="DebugMode" Value="True" />
<RuleParameter Name="DebugLogFile" Value="C:\Temp\SetTestParameterDebug1.log" />
<RuleParameter Name="Connection_String" Value="UserdataFew1.csv" />
<RuleParameter Name="Has_col_name" Value="True" />
<RuleParameter Name="Autosplit" Value="False" />
<RuleParameter Name="IgnoreBlanks" Value="True" />
<RuleParameter Name="LogFilePathString" Value="C:\Temp\Fungerande.log" />
<RuleParameter Name="LogFileAppendID" Value="False" />
<RuleParameter Name="LogFileAppendName" Value="False" />
<RuleParameter Name="Use_UniqueTestIteration" Value="False" />
<RuleParameter Name="Use_UniqueIteration" Value="False" />
<RuleParameter Name="Use_UniqueFiles" Value="True" />
<RuleParameter Name="Use_Unique" Value="False" />
<RuleParameter Name="Use_Random" Value="False" />
<RuleParameter Name="Use_Seq" Value="False" />
<RuleParameter Name="Use_Loop" Value="False" />
<RuleParameter Name="ThrowException" Value="True" />
<RuleParameter Name="Log_To_File" Value="False" />
<RuleParameter Name="Test_Names" Value="WebTest1" />
<RuleParameter Name="Scenario_Names" Value="" />
<RuleParameter Name="Agent_Names" Value="" />
</RuleParameters>
</LoadTestPlugin>
<LoadTestPlugin Classname="LIL_VSTT_Plugins.SetTestParameter, LIL_VSTT_Plugins, Version=1.3.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="Parameter_Name" Value="UserName2" />
<RuleParameter Name="DebugMode" Value="True" />
<RuleParameter Name="DebugLogFile" Value="C:\Temp\SetTestParameterDebug2.log" />
<RuleParameter Name="Connection_String" Value="UserdataFew2.csv" />
<RuleParameter Name="Has_col_name" Value="True" />
<RuleParameter Name="Autosplit" Value="False" />
<RuleParameter Name="IgnoreBlanks" Value="True" />
<RuleParameter Name="LogFilePathString" Value="C:\Temp\Fungerande.log" />
<RuleParameter Name="LogFileAppendID" Value="False" />
<RuleParameter Name="LogFileAppendName" Value="False" />
<RuleParameter Name="Use_UniqueTestIteration" Value="False" />
<RuleParameter Name="Use_UniqueIteration" Value="False" />
<RuleParameter Name="Use_UniqueFiles" Value="True" />
<RuleParameter Name="Use_Unique" Value="False" />
<RuleParameter Name="Use_Random" Value="False" />
<RuleParameter Name="Use_Seq" Value="False" />
<RuleParameter Name="Use_Loop" Value="False" />
<RuleParameter Name="ThrowException" Value="True" />
<RuleParameter Name="Log_To_File" Value="False" />
<RuleParameter Name="Test_Names" Value="WebTest2" />
<RuleParameter Name="Scenario_Names" Value="" />
<RuleParameter Name="Agent_Names" Value="" />
</RuleParameters>
</LoadTestPlugin>
</LoadTestPlugins>
</LoadTest>
\ 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="default" StopOnError="False" RecordedResultFile="WebTest1.a5a27e2d-474c-43bb-be4d-1b12e85851a0.rec.webtestresult" ResultsLocale="">
<Items>
<Request Method="GET" Guid="2abac3b8-caac-4dee-a55a-a006b6372154" Version="1.1" Url="http://fileserver2/" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False" />
<Request Method="GET" Guid="8abd3e84-6029-47ca-a3b0-abb2fb28d548" Version="1.1" Url="http://localhost:8080/EmailValidator" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False" />
</Items>
<WebTestPlugins>
<WebTestPlugin Classname="LIL_VSTT_Plugins.SetWebTestParameter, LIL_VSTT_Plugins, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null" DisplayName="SetWebTestParameter" Description="">
<RuleParameters>
<RuleParameter Name="Parameter_Name" Value="UserName" />
<RuleParameter Name="DebugMode" Value="False" />
<RuleParameter Name="DebugLogFile" Value="C:\Temp\SetTestParameterDebug.log" />
<RuleParameter Name="Connection_String" Value="UserdataFew1.csv" />
<RuleParameter Name="Has_col_name" Value="False" />
<RuleParameter Name="Autosplit" Value="False" />
<RuleParameter Name="IgnoreBlanks" Value="True" />
<RuleParameter Name="LogFilePathString" Value="C:\Temp\Fungerande.log" />
<RuleParameter Name="LogFileAppendID" Value="False" />
<RuleParameter Name="LogFileAppendName" Value="False" />
<RuleParameter Name="Use_UniqueTestIteration" Value="False" />
<RuleParameter Name="Use_UniqueIteration" Value="False" />
<RuleParameter Name="Use_UniqueFiles" Value="False" />
<RuleParameter Name="Use_Unique" Value="False" />
<RuleParameter Name="Use_Random" Value="False" />
<RuleParameter Name="Use_Seq" Value="True" />
<RuleParameter Name="Use_Loop" Value="False" />
<RuleParameter Name="ThrowException" Value="False" />
<RuleParameter Name="Log_To_File" Value="False" />
<RuleParameter Name="Test_Names" Value="" />
<RuleParameter Name="Scenario_Names" Value="" />
<RuleParameter Name="Agent_Names" Value="" />
</RuleParameters>
</WebTestPlugin>
</WebTestPlugins>
</WebTest>
\ No newline at end of file
......