Commit 82588790 82588790b040f94828eced7aa6c8cf54e7c418cc by Christian Gerdes

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.
1 parent b07260dd
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
......@@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LIL_VSTT_Plugins</RootNamespace>
<AssemblyName>LIL_VSTT_Plugins</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
......@@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
......@@ -29,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<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
/// <summary>
/// WebTest plugin som tar bort expected-100 headern från post requests
/// Beta
/// Service Manager Plugin
/// </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
[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, finns även som loadtest plugin och gäller då hela loadtestet.")]
public class ServiceManagerWebTestPlugin : WebTestPlugin
{
[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; }
[DisplayName("Force TLS 1.2"), DefaultValue(false)]
[Description("Kräver .NET 4.5 samt att TLS1.2 är aktiverat i SChannel (använd bifogad schannel_high.reg)")]
public bool useTls12 { get; set; }
public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
base.PreWebTest(sender, e);
System.Net.ServicePointManager.Expect100Continue = false;
System.Net.ServicePointManager.MaxServicePointIdleTime = 30;
System.Net.ServicePointManager.Expect100Continue = exp100;
System.Net.ServicePointManager.MaxServicePointIdleTime = maxIdle;
System.Net.ServicePointManager.SetTcpKeepAlive(keepAlive, timeOut, interVal);
System.Net.ServicePointManager.UseNagleAlgorithm = useNagle;
if(useTls12) System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
}
}
/// <summary>
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
......@@ -11,7 +11,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TestProject1</RootNamespace>
<AssemblyName>TestProject1</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
......@@ -24,6 +24,7 @@
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>4.0</OldToolsVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
......@@ -33,6 +34,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
......@@ -41,6 +43,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
......@@ -71,6 +74,9 @@
<None Include="WebTest2.webtest">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="WebTest3.webtest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Shadow Include="Test References\LIL_VSTT_Plugins.accessor" />
<None Include="Userdata.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
......
<?xml version="1.0" encoding="utf-8"?>
<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="">
<Items>
<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" />
</Items>
<WebTestPlugins>
<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&#xD;&#xA;Sätter config värden i Service Manager instansen för hela testet.">
<RuleParameters>
<RuleParameter Name="exp100" Value="True" />
<RuleParameter Name="maxIdle" Value="100" />
<RuleParameter Name="keepAlive" Value="False" />
<RuleParameter Name="timeOut" Value="5000" />
<RuleParameter Name="interVal" Value="1000" />
<RuleParameter Name="useNagle" Value="False" />
<RuleParameter Name="useTls12" Value="True" />
</RuleParameters>
</WebTestPlugin>
</WebTestPlugins>
</WebTest>
\ No newline at end of file