Höjt till .NET version 4.5.1, tagit bort expect100off och ersatt den med en serv…
…iceconfigmanager som webtest plugin, vilken nu även kan tvinga TLS1.2 för HTTPS.
Showing
4 changed files
with
64 additions
and
11 deletions
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <PropertyGroup> | 3 | <PropertyGroup> |
4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | 4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
5 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | 5 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
... | @@ -10,8 +10,9 @@ | ... | @@ -10,8 +10,9 @@ |
10 | <AppDesignerFolder>Properties</AppDesignerFolder> | 10 | <AppDesignerFolder>Properties</AppDesignerFolder> |
11 | <RootNamespace>LIL_VSTT_Plugins</RootNamespace> | 11 | <RootNamespace>LIL_VSTT_Plugins</RootNamespace> |
12 | <AssemblyName>LIL_VSTT_Plugins</AssemblyName> | 12 | <AssemblyName>LIL_VSTT_Plugins</AssemblyName> |
13 | <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | 13 | <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> |
14 | <FileAlignment>512</FileAlignment> | 14 | <FileAlignment>512</FileAlignment> |
15 | <TargetFrameworkProfile /> | ||
15 | </PropertyGroup> | 16 | </PropertyGroup> |
16 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | 17 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
17 | <DebugSymbols>true</DebugSymbols> | 18 | <DebugSymbols>true</DebugSymbols> |
... | @@ -21,6 +22,7 @@ | ... | @@ -21,6 +22,7 @@ |
21 | <DefineConstants>DEBUG;TRACE</DefineConstants> | 22 | <DefineConstants>DEBUG;TRACE</DefineConstants> |
22 | <ErrorReport>prompt</ErrorReport> | 23 | <ErrorReport>prompt</ErrorReport> |
23 | <WarningLevel>4</WarningLevel> | 24 | <WarningLevel>4</WarningLevel> |
25 | <Prefer32Bit>false</Prefer32Bit> | ||
24 | </PropertyGroup> | 26 | </PropertyGroup> |
25 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | 27 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
26 | <DebugType>pdbonly</DebugType> | 28 | <DebugType>pdbonly</DebugType> |
... | @@ -29,6 +31,7 @@ | ... | @@ -29,6 +31,7 @@ |
29 | <DefineConstants>TRACE</DefineConstants> | 31 | <DefineConstants>TRACE</DefineConstants> |
30 | <ErrorReport>prompt</ErrorReport> | 32 | <ErrorReport>prompt</ErrorReport> |
31 | <WarningLevel>4</WarningLevel> | 33 | <WarningLevel>4</WarningLevel> |
34 | <Prefer32Bit>false</Prefer32Bit> | ||
32 | </PropertyGroup> | 35 | </PropertyGroup> |
33 | <ItemGroup> | 36 | <ItemGroup> |
34 | <Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | 37 | <Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | ... | ... |
... | @@ -155,19 +155,44 @@ namespace LIL_VSTT_Plugins | ... | @@ -155,19 +155,44 @@ namespace LIL_VSTT_Plugins |
155 | 155 | ||
156 | 156 | ||
157 | /// <summary> | 157 | /// <summary> |
158 | /// WebTest plugin som tar bort expected-100 headern från post requests | 158 | /// Service Manager Plugin |
159 | /// Beta | ||
160 | /// </summary> | 159 | /// </summary> |
161 | [DisplayName("Expect 100 Off")] | 160 | [DisplayName("Service Manager Config")] |
162 | [Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nStänger av .NET expected-100 headern i posts.")] | 161 | [Description("(C) Copyright 2015 LIGHTS IN LINE AB\r\nSätter config värden i Service Manager instansen för hela testet, finns även som loadtest plugin och gäller då hela loadtestet.")] |
163 | public class expect100Off : WebTestPlugin | 162 | public class ServiceManagerWebTestPlugin : WebTestPlugin |
164 | { | 163 | { |
164 | [DisplayName("Use Expect 100 Behaviour"), DefaultValue(true)] | ||
165 | public bool exp100 { get; set; } | ||
166 | |||
167 | [DisplayName("Max Connection Idle Time"), DefaultValue(100)] | ||
168 | public int maxIdle { get; set; } | ||
169 | |||
170 | [DisplayName("TCP Keep Alive"), DefaultValue(false)] | ||
171 | public bool keepAlive { get; set; } | ||
172 | |||
173 | [DisplayName("TCP Keep Alive Timeout (ms)"), DefaultValue(5000)] | ||
174 | public int timeOut { get; set; } | ||
175 | |||
176 | [DisplayName("TCP Keep Alive Interval"), DefaultValue(1000)] | ||
177 | public int interVal { get; set; } | ||
178 | |||
179 | [DisplayName("Use Nagle Algorithm"), DefaultValue(false)] | ||
180 | public bool useNagle { get; set; } | ||
181 | |||
182 | [DisplayName("Force TLS 1.2"), DefaultValue(false)] | ||
183 | [Description("Kräver .NET 4.5 samt att TLS1.2 är aktiverat i SChannel (använd bifogad schannel_high.reg)")] | ||
184 | public bool useTls12 { get; set; } | ||
185 | |||
165 | public override void PreWebTest(object sender, PreWebTestEventArgs e) | 186 | public override void PreWebTest(object sender, PreWebTestEventArgs e) |
166 | { | 187 | { |
167 | base.PreWebTest(sender, e); | 188 | base.PreWebTest(sender, e); |
168 | System.Net.ServicePointManager.Expect100Continue = false; | 189 | System.Net.ServicePointManager.Expect100Continue = exp100; |
169 | System.Net.ServicePointManager.MaxServicePointIdleTime = 30; | 190 | System.Net.ServicePointManager.MaxServicePointIdleTime = maxIdle; |
191 | System.Net.ServicePointManager.SetTcpKeepAlive(keepAlive, timeOut, interVal); | ||
192 | System.Net.ServicePointManager.UseNagleAlgorithm = useNagle; | ||
193 | if(useTls12) System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; | ||
170 | } | 194 | } |
195 | |||
171 | } | 196 | } |
172 | 197 | ||
173 | /// <summary> | 198 | /// <summary> | ... | ... |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <PropertyGroup> | 3 | <PropertyGroup> |
4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | 4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
5 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | 5 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
11 | <AppDesignerFolder>Properties</AppDesignerFolder> | 11 | <AppDesignerFolder>Properties</AppDesignerFolder> |
12 | <RootNamespace>TestProject1</RootNamespace> | 12 | <RootNamespace>TestProject1</RootNamespace> |
13 | <AssemblyName>TestProject1</AssemblyName> | 13 | <AssemblyName>TestProject1</AssemblyName> |
14 | <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | 14 | <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> |
15 | <FileAlignment>512</FileAlignment> | 15 | <FileAlignment>512</FileAlignment> |
16 | <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | 16 | <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
17 | <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | 17 | <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> |
... | @@ -24,6 +24,7 @@ | ... | @@ -24,6 +24,7 @@ |
24 | <UpgradeBackupLocation> | 24 | <UpgradeBackupLocation> |
25 | </UpgradeBackupLocation> | 25 | </UpgradeBackupLocation> |
26 | <OldToolsVersion>4.0</OldToolsVersion> | 26 | <OldToolsVersion>4.0</OldToolsVersion> |
27 | <TargetFrameworkProfile /> | ||
27 | </PropertyGroup> | 28 | </PropertyGroup> |
28 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | 29 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
29 | <DebugSymbols>true</DebugSymbols> | 30 | <DebugSymbols>true</DebugSymbols> |
... | @@ -33,6 +34,7 @@ | ... | @@ -33,6 +34,7 @@ |
33 | <DefineConstants>DEBUG;TRACE</DefineConstants> | 34 | <DefineConstants>DEBUG;TRACE</DefineConstants> |
34 | <ErrorReport>prompt</ErrorReport> | 35 | <ErrorReport>prompt</ErrorReport> |
35 | <WarningLevel>4</WarningLevel> | 36 | <WarningLevel>4</WarningLevel> |
37 | <Prefer32Bit>false</Prefer32Bit> | ||
36 | </PropertyGroup> | 38 | </PropertyGroup> |
37 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | 39 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
38 | <DebugType>pdbonly</DebugType> | 40 | <DebugType>pdbonly</DebugType> |
... | @@ -41,6 +43,7 @@ | ... | @@ -41,6 +43,7 @@ |
41 | <DefineConstants>TRACE</DefineConstants> | 43 | <DefineConstants>TRACE</DefineConstants> |
42 | <ErrorReport>prompt</ErrorReport> | 44 | <ErrorReport>prompt</ErrorReport> |
43 | <WarningLevel>4</WarningLevel> | 45 | <WarningLevel>4</WarningLevel> |
46 | <Prefer32Bit>false</Prefer32Bit> | ||
44 | </PropertyGroup> | 47 | </PropertyGroup> |
45 | <ItemGroup> | 48 | <ItemGroup> |
46 | <Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | 49 | <Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
... | @@ -71,6 +74,9 @@ | ... | @@ -71,6 +74,9 @@ |
71 | <None Include="WebTest2.webtest"> | 74 | <None Include="WebTest2.webtest"> |
72 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> | 75 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
73 | </None> | 76 | </None> |
77 | <None Include="WebTest3.webtest"> | ||
78 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
79 | </None> | ||
74 | <Shadow Include="Test References\LIL_VSTT_Plugins.accessor" /> | 80 | <Shadow Include="Test References\LIL_VSTT_Plugins.accessor" /> |
75 | <None Include="Userdata.csv"> | 81 | <None Include="Userdata.csv"> |
76 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | 82 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ... | ... |
TestProject1/WebTest3.webtest
0 → 100644
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <WebTest Name="WebTest3" Id="5f8fe34b-e853-4a88-95cb-a8e963383b09" 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="" ResultsLocale=""> | ||
3 | <Items> | ||
4 | <Request Method="GET" Guid="359feba0-105f-4dbf-a630-32d640c10817" Version="1.1" Url="https://new.vinnarum.com/" ThinkTime="0" Timeout="300" ParseDependentRequests="False" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False" /> | ||
5 | </Items> | ||
6 | <WebTestPlugins> | ||
7 | <WebTestPlugin Classname="LIL_VSTT_Plugins.ServiceManagerWebTestPlugin, LIL_VSTT_Plugins, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null" DisplayName="Service Manager Config" Description="(C) Copyright 2015 LIGHTS IN LINE AB
Sätter config värden i Service Manager instansen för hela testet."> | ||
8 | <RuleParameters> | ||
9 | <RuleParameter Name="exp100" Value="True" /> | ||
10 | <RuleParameter Name="maxIdle" Value="100" /> | ||
11 | <RuleParameter Name="keepAlive" Value="False" /> | ||
12 | <RuleParameter Name="timeOut" Value="5000" /> | ||
13 | <RuleParameter Name="interVal" Value="1000" /> | ||
14 | <RuleParameter Name="useNagle" Value="False" /> | ||
15 | <RuleParameter Name="useTls12" Value="True" /> | ||
16 | </RuleParameters> | ||
17 | </WebTestPlugin> | ||
18 | </WebTestPlugins> | ||
19 | </WebTest> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or sign in to post a comment