Commit 61003c77 61003c7700fe0d8e3d31a902d0f8e7f8e2a30f48 by SRV Christian Gerdes

Autosync git.lightsinline.se

git-tfs-id: [https://tfs.rsv.se/tfs/LoadTestCollection]$/VSTT-Plugins;C1045
1 parent ef47fc73
......@@ -119,6 +119,7 @@ namespace LIL_VSTT_Plugins
private bool mySeqLoop = false;
private bool myHasColName = false;
private bool myUseAutoSplit = false;
private bool myIgnoreBlanks = true;
private StringCollection myParams = new StringCollection();
private Random random = new Random();
......@@ -154,6 +155,15 @@ namespace LIL_VSTT_Plugins
set { myUseAutoSplit = value; }
}
[DisplayName("CSV Ignorera blankskott")]
[Description("Ange False om du inte vill att rader med blankskott ignoreras (tomma/blanka rader eller samtliga kolumner tomma/blanka).")]
[DefaultValue(true)]
public bool IgnoreBlanks
{
get { return myIgnoreBlanks; }
set { myIgnoreBlanks = 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")]
......@@ -449,6 +459,9 @@ namespace LIL_VSTT_Plugins
int dataNum = 0;
while ((input = re.ReadLine()) != null)
{
// Ignore blank lines and empty lines (just whitespace) or lines with only blank/empty/whitespace columns
if (myIgnoreBlanks && String.IsNullOrWhiteSpace(input.Replace(',', ' '))) continue;
lineNum++;
if (lineNum == 1 && myHasColName == true)
{
......
<?xml version="1.0" encoding="utf-8"?>
<LoadTest Name="LoadTest1" Description="" Owner="" storage="c:\ws\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="1" PercentNewUsers="0" IPSwitching="true" TestMixType="PercentageOfUsersRunning" ApplyDistributionToPacingDelay="true" MaxTestIterations="0" DisableDuringWarmup="false" DelayStartTime="0" AllowedAgents="">
<ThinkProfile Value="0.2" Pattern="NormalDistribution" />
......@@ -416,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="0" 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" UseMultipleIPs="false" TestAgentConfiguration="Default" AgentDiagnosticsLevel="Warning">
<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="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" UseMultipleIPs="false" TestAgentConfiguration="Default" AgentDiagnosticsLevel="Warning">
<CounterSetMappings>
<CounterSetMapping ComputerName="[CONTROLLER MACHINE]">
<CounterSetReferences>
......@@ -435,7 +435,7 @@
<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="Connection_String" Value="C:\tmp\Userdata.csv" />
<RuleParameter Name="Connection_String" Value="Userdata.csv" />
<RuleParameter Name="Has_col_name" Value="False" />
<RuleParameter Name="Autosplit" Value="False" />
<RuleParameter Name="Parameter_Name" Value="Parameter1" />
......@@ -451,6 +451,7 @@
<RuleParameter Name="Scenario_Names" Value="" />
<RuleParameter Name="Agent_Names" Value="" />
<RuleParameter Name="Use_UniqueTestIteration" Value="True" />
<RuleParameter Name="IgnoreBlanks" Value="True" />
</RuleParameters>
</LoadTestPlugin>
</LoadTestPlugins>
......
UserName
anjo
, ,
anma
,,,
anro
arbt1
arbt10
......