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 ...@@ -27,12 +27,7 @@ namespace LIL_VSTT_Plugins
27 { 27 {
28 public class SetWebTestParameter : WebTestPlugin 28 public class SetWebTestParameter : WebTestPlugin
29 { 29 {
30 // Summary: 30 // BETA VERY UNTESTED!!
31 // Initializes the load test plug-in.
32 //
33 // Parameters:
34 // loadTest:
35 // The load test to be executed.
36 31
37 private string myConnectionString = ""; 32 private string myConnectionString = "";
38 private string myLogFileString = ""; 33 private string myLogFileString = "";
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <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"> 2 <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">
3 <Scenarios> 3 <Scenarios>
4 <Scenario Name="Scenario1" DelayBetweenIterations="5" PercentNewUsers="0" IPSwitching="true" TestMixType="PercentageOfUsersRunning" ApplyDistributionToPacingDelay="true" MaxTestIterations="0" DisableDuringWarmup="false" DelayStartTime="0" AllowedAgents=""> 4 <Scenario Name="Scenario1" DelayBetweenIterations="5" PercentNewUsers="0" IPSwitching="true" TestMixType="PercentageOfUsersRunning" ApplyDistributionToPacingDelay="true" MaxTestIterations="0" DisableDuringWarmup="false" DelayStartTime="0" AllowedAgents="">
5 <ThinkProfile Value="0.2" Pattern="On" /> 5 <ThinkProfile Value="0.2" Pattern="Off" />
6 <LoadProfile Pattern="Constant" InitialUsers="6" /> 6 <LoadProfile Pattern="Constant" InitialUsers="1" />
7 <TestMix> 7 <TestMix>
8 <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" /> 8 <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" />
9 <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" />
10 </TestMix> 9 </TestMix>
11 <BrowserMix> 10 <BrowserMix>
12 <BrowserProfile Percentage="100"> 11 <BrowserProfile Percentage="100">
...@@ -93,7 +92,7 @@ ...@@ -93,7 +92,7 @@
93 <Counter Name="Avg. Response Time" /> 92 <Counter Name="Avg. Response Time" />
94 <Counter Name="Avg. Connection Wait Time"> 93 <Counter Name="Avg. Connection Wait Time">
95 <ThresholdRules> 94 <ThresholdRules>
96 <ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 95 <ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
97 <RuleParameters> 96 <RuleParameters>
98 <RuleParameter Name="DependentCategory" Value="LoadTest:Page" /> 97 <RuleParameter Name="DependentCategory" Value="LoadTest:Page" />
99 <RuleParameter Name="DependentCounter" Value="Avg. Page Time" /> 98 <RuleParameter Name="DependentCounter" Value="Avg. Page Time" />
...@@ -158,7 +157,7 @@ ...@@ -158,7 +157,7 @@
158 <Counter Name="Current Bandwidth" RangeGroup="Network Bytes" /> 157 <Counter Name="Current Bandwidth" RangeGroup="Network Bytes" />
159 <Counter Name="Bytes Total/sec" RangeGroup="Network Bytes"> 158 <Counter Name="Bytes Total/sec" RangeGroup="Network Bytes">
160 <ThresholdRules> 159 <ThresholdRules>
161 <ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 160 <ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
162 <RuleParameters> 161 <RuleParameters>
163 <RuleParameter Name="DependentCategory" Value="Network Interface" /> 162 <RuleParameter Name="DependentCategory" Value="Network Interface" />
164 <RuleParameter Name="DependentCounter" Value="Current Bandwidth" /> 163 <RuleParameter Name="DependentCounter" Value="Current Bandwidth" />
...@@ -304,7 +303,7 @@ ...@@ -304,7 +303,7 @@
304 <Counter Name="Current Bandwidth" RangeGroup="Network Bytes" /> 303 <Counter Name="Current Bandwidth" RangeGroup="Network Bytes" />
305 <Counter Name="Bytes Total/sec" RangeGroup="Network Bytes"> 304 <Counter Name="Bytes Total/sec" RangeGroup="Network Bytes">
306 <ThresholdRules> 305 <ThresholdRules>
307 <ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 306 <ThresholdRule Classname="Microsoft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareCounters, Microsoft.VisualStudio.QualityTools.LoadTest, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
308 <RuleParameters> 307 <RuleParameters>
309 <RuleParameter Name="DependentCategory" Value="Network Interface" /> 308 <RuleParameter Name="DependentCategory" Value="Network Interface" />
310 <RuleParameter Name="DependentCounter" Value="Current Bandwidth" /> 309 <RuleParameter Name="DependentCounter" Value="Current Bandwidth" />
...@@ -417,7 +416,7 @@ ...@@ -417,7 +416,7 @@
417 </CounterSet> 416 </CounterSet>
418 </CounterSets> 417 </CounterSets>
419 <RunConfigurations> 418 <RunConfigurations>
420 <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"> 419 <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">
421 <CounterSetMappings> 420 <CounterSetMappings>
422 <CounterSetMapping ComputerName="[CONTROLLER MACHINE]"> 421 <CounterSetMapping ComputerName="[CONTROLLER MACHINE]">
423 <CounterSetReferences> 422 <CounterSetReferences>
...@@ -433,58 +432,4 @@ ...@@ -433,58 +432,4 @@
433 </CounterSetMappings> 432 </CounterSetMappings>
434 </RunConfiguration> 433 </RunConfiguration>
435 </RunConfigurations> 434 </RunConfigurations>
436 <LoadTestPlugins>
437 <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.">
438 <RuleParameters>
439 <RuleParameter Name="Parameter_Name" Value="UserName1" />
440 <RuleParameter Name="DebugMode" Value="True" />
441 <RuleParameter Name="DebugLogFile" Value="C:\Temp\SetTestParameterDebug1.log" />
442 <RuleParameter Name="Connection_String" Value="UserdataFew1.csv" />
443 <RuleParameter Name="Has_col_name" Value="True" />
444 <RuleParameter Name="Autosplit" Value="False" />
445 <RuleParameter Name="IgnoreBlanks" Value="True" />
446 <RuleParameter Name="LogFilePathString" Value="C:\Temp\Fungerande.log" />
447 <RuleParameter Name="LogFileAppendID" Value="False" />
448 <RuleParameter Name="LogFileAppendName" Value="False" />
449 <RuleParameter Name="Use_UniqueTestIteration" Value="False" />
450 <RuleParameter Name="Use_UniqueIteration" Value="False" />
451 <RuleParameter Name="Use_UniqueFiles" Value="True" />
452 <RuleParameter Name="Use_Unique" Value="False" />
453 <RuleParameter Name="Use_Random" Value="False" />
454 <RuleParameter Name="Use_Seq" Value="False" />
455 <RuleParameter Name="Use_Loop" Value="False" />
456 <RuleParameter Name="ThrowException" Value="True" />
457 <RuleParameter Name="Log_To_File" Value="False" />
458 <RuleParameter Name="Test_Names" Value="WebTest1" />
459 <RuleParameter Name="Scenario_Names" Value="" />
460 <RuleParameter Name="Agent_Names" Value="" />
461 </RuleParameters>
462 </LoadTestPlugin>
463 <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.">
464 <RuleParameters>
465 <RuleParameter Name="Parameter_Name" Value="UserName2" />
466 <RuleParameter Name="DebugMode" Value="True" />
467 <RuleParameter Name="DebugLogFile" Value="C:\Temp\SetTestParameterDebug2.log" />
468 <RuleParameter Name="Connection_String" Value="UserdataFew2.csv" />
469 <RuleParameter Name="Has_col_name" Value="True" />
470 <RuleParameter Name="Autosplit" Value="False" />
471 <RuleParameter Name="IgnoreBlanks" Value="True" />
472 <RuleParameter Name="LogFilePathString" Value="C:\Temp\Fungerande.log" />
473 <RuleParameter Name="LogFileAppendID" Value="False" />
474 <RuleParameter Name="LogFileAppendName" Value="False" />
475 <RuleParameter Name="Use_UniqueTestIteration" Value="False" />
476 <RuleParameter Name="Use_UniqueIteration" Value="False" />
477 <RuleParameter Name="Use_UniqueFiles" Value="True" />
478 <RuleParameter Name="Use_Unique" Value="False" />
479 <RuleParameter Name="Use_Random" Value="False" />
480 <RuleParameter Name="Use_Seq" Value="False" />
481 <RuleParameter Name="Use_Loop" Value="False" />
482 <RuleParameter Name="ThrowException" Value="True" />
483 <RuleParameter Name="Log_To_File" Value="False" />
484 <RuleParameter Name="Test_Names" Value="WebTest2" />
485 <RuleParameter Name="Scenario_Names" Value="" />
486 <RuleParameter Name="Agent_Names" Value="" />
487 </RuleParameters>
488 </LoadTestPlugin>
489 </LoadTestPlugins>
490 </LoadTest> 435 </LoadTest>
...\ No newline at end of file ...\ No newline at end of file
......
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <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=""> 2 <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="">
3 <Items> 3 <Items>
4 <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" /> 4 <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" />
5 </Items> 5 </Items>
6 <WebTestPlugins>
7 <WebTestPlugin Classname="LIL_VSTT_Plugins.SetWebTestParameter, LIL_VSTT_Plugins, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null" DisplayName="SetWebTestParameter" Description="">
8 <RuleParameters>
9 <RuleParameter Name="Parameter_Name" Value="UserName" />
10 <RuleParameter Name="DebugMode" Value="False" />
11 <RuleParameter Name="DebugLogFile" Value="C:\Temp\SetTestParameterDebug.log" />
12 <RuleParameter Name="Connection_String" Value="UserdataFew1.csv" />
13 <RuleParameter Name="Has_col_name" Value="False" />
14 <RuleParameter Name="Autosplit" Value="False" />
15 <RuleParameter Name="IgnoreBlanks" Value="True" />
16 <RuleParameter Name="LogFilePathString" Value="C:\Temp\Fungerande.log" />
17 <RuleParameter Name="LogFileAppendID" Value="False" />
18 <RuleParameter Name="LogFileAppendName" Value="False" />
19 <RuleParameter Name="Use_UniqueTestIteration" Value="False" />
20 <RuleParameter Name="Use_UniqueIteration" Value="False" />
21 <RuleParameter Name="Use_UniqueFiles" Value="False" />
22 <RuleParameter Name="Use_Unique" Value="False" />
23 <RuleParameter Name="Use_Random" Value="False" />
24 <RuleParameter Name="Use_Seq" Value="True" />
25 <RuleParameter Name="Use_Loop" Value="False" />
26 <RuleParameter Name="ThrowException" Value="False" />
27 <RuleParameter Name="Log_To_File" Value="False" />
28 <RuleParameter Name="Test_Names" Value="" />
29 <RuleParameter Name="Scenario_Names" Value="" />
30 <RuleParameter Name="Agent_Names" Value="" />
31 </RuleParameters>
32 </WebTestPlugin>
33 </WebTestPlugins>
6 </WebTest> 34 </WebTest>
...\ No newline at end of file ...\ No newline at end of file
......