Commit 7af20a06 7af20a0659152ece8e0b1d95d84a1480dd0313d7 by Christian Gerdes

Initial sync

1 parent 5065a052
1 TestResults
...\ No newline at end of file ...\ No newline at end of file
1 
2 Microsoft Visual Studio Solution File, Format Version 12.00
3 # Visual Studio 2013
4 VisualStudioVersion = 12.0.31101.0
5 MinimumVisualStudioVersion = 10.0.40219.1
6 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8ADAFB91-C10D-42C8-8499-30B3692C27F3}"
7 ProjectSection(SolutionItems) = preProject
8 LIL_VSTT_Plugins.vsmdi = LIL_VSTT_Plugins.vsmdi
9 Local.testsettings = Local.testsettings
10 TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
11 EndProjectSection
12 EndProject
13 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LIL_VSTT_Plugins", "LIL_VSTT_Plugins\LIL_VSTT_Plugins.csproj", "{06A22593-601E-4386-917A-9835DE30E14E}"
14 EndProject
15 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProject1", "TestProject1\TestProject1.csproj", "{01CF59F6-F912-447A-91BC-0301FDA09C02}"
16 EndProject
17 Global
18 GlobalSection(SolutionConfigurationPlatforms) = preSolution
19 Debug|Any CPU = Debug|Any CPU
20 Release|Any CPU = Release|Any CPU
21 EndGlobalSection
22 GlobalSection(ProjectConfigurationPlatforms) = postSolution
23 {06A22593-601E-4386-917A-9835DE30E14E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24 {06A22593-601E-4386-917A-9835DE30E14E}.Debug|Any CPU.Build.0 = Debug|Any CPU
25 {06A22593-601E-4386-917A-9835DE30E14E}.Release|Any CPU.ActiveCfg = Release|Any CPU
26 {06A22593-601E-4386-917A-9835DE30E14E}.Release|Any CPU.Build.0 = Release|Any CPU
27 {01CF59F6-F912-447A-91BC-0301FDA09C02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28 {01CF59F6-F912-447A-91BC-0301FDA09C02}.Debug|Any CPU.Build.0 = Debug|Any CPU
29 {01CF59F6-F912-447A-91BC-0301FDA09C02}.Release|Any CPU.ActiveCfg = Release|Any CPU
30 {01CF59F6-F912-447A-91BC-0301FDA09C02}.Release|Any CPU.Build.0 = Release|Any CPU
31 EndGlobalSection
32 GlobalSection(SolutionProperties) = preSolution
33 HideSolutionNode = FALSE
34 EndGlobalSection
35 GlobalSection(TestCaseManagementSettings) = postSolution
36 CategoryFile = LIL_VSTT_Plugins.vsmdi
37 EndGlobalSection
38 EndGlobal
1 <?xml version="1.0" encoding="UTF-8"?>
2 <TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
3 <TestList name="Lists of Tests" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
4 <RunConfiguration id="f9146b42-ca07-41ed-9af4-6ec2afc90583" name="Local" storage="local.testsettings" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
5 </TestList>
6 </TestLists>
...\ No newline at end of file ...\ No newline at end of file
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Net;
6 using Microsoft.VisualStudio.TestTools.WebTesting;
7 using Microsoft.VisualStudio.TestTools.LoadTesting;
8 using System.IO;
9 using System.ComponentModel;
10
11 namespace LIL_VSTT_Plugins
12 {
13 /// <summary>
14 /// Nästlad extraction rule
15 /// Kombination av två extractions rules i en. Den andra söker i resultatet av den första.
16 /// </summary>
17 [DisplayName("Nested Extraction")]
18 [Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nKombination av två extractions där den andra söker i resultatet av den första.")]
19 public class NestedExtractionRule : ExtractionRule
20 {
21 // Indata
22 private string start1;
23 [DisplayName("Extraction 1 Starts With")]
24 [Description("")]
25 public string Start1
26 {
27 get { return start1; }
28 set { start1 = value; }
29 }
30
31 private string end1;
32 [DisplayName("Extraction 1 Ends With")]
33 [Description("")]
34 public string End1
35 {
36 get { return end1; }
37 set { end1 = value; }
38 }
39
40 private string start2;
41 [DisplayName("Extraction 2 Starts With")]
42 [Description("")]
43 public string Start2
44 {
45 get { return start2; }
46 set { start2 = value; }
47 }
48
49 private string end2;
50 [DisplayName("Exctration 2 Ends With")]
51 [Description("")]
52 public string End2
53 {
54 get { return end2; }
55 set { end2 = value; }
56 }
57
58 public override void Extract(object sender, ExtractionEventArgs e)
59 {
60 // Find the first extraction
61 // TODO: Du behöver spola fram till att börja sökningen av end1 EFTER start1!
62 string extraction1;
63 int s1, s2, e1, e2;
64
65 s1 = e.Response.BodyString.IndexOf(start1) + start1.Length;
66 e1 = e.Response.BodyString.IndexOf(end1);
67
68 // Validate
69 if (s1 > e.Response.BodyString.Length || (e1 - s1 < 1))
70 {
71 // Error
72 e.Success = false;
73 return;
74 }
75
76 extraction1 = e.Response.BodyString.Substring(s1, e1 - s1);
77
78 // Find the second extraction
79 // TODO: Du behöver spola fram till att börja sökningen av end2 EFTER start2!
80 string extraction2;
81
82 s2 = extraction1.IndexOf(start2) + start2.Length;
83 e2 = extraction1.IndexOf(end2);
84
85 // Validate
86 if (s2 > extraction1.Length || (e2 - s2 < 1))
87 {
88 // Error
89 e.Success = false;
90 return;
91 }
92
93 extraction2 = extraction1.Substring(s2, e2 - s2);
94
95
96 e.WebTest.Context.Add(this.ContextParameterName, extraction2);
97 e.Success = true;
98 }
99 }
100 }
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6 <ProductVersion>8.0.30703</ProductVersion>
7 <SchemaVersion>2.0</SchemaVersion>
8 <ProjectGuid>{06A22593-601E-4386-917A-9835DE30E14E}</ProjectGuid>
9 <OutputType>Library</OutputType>
10 <AppDesignerFolder>Properties</AppDesignerFolder>
11 <RootNamespace>LIL_VSTT_Plugins</RootNamespace>
12 <AssemblyName>LIL_VSTT_Plugins</AssemblyName>
13 <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14 <FileAlignment>512</FileAlignment>
15 </PropertyGroup>
16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17 <DebugSymbols>true</DebugSymbols>
18 <DebugType>full</DebugType>
19 <Optimize>false</Optimize>
20 <OutputPath>bin\Debug\</OutputPath>
21 <DefineConstants>DEBUG;TRACE</DefineConstants>
22 <ErrorReport>prompt</ErrorReport>
23 <WarningLevel>4</WarningLevel>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26 <DebugType>pdbonly</DebugType>
27 <Optimize>true</Optimize>
28 <OutputPath>bin\Release\</OutputPath>
29 <DefineConstants>TRACE</DefineConstants>
30 <ErrorReport>prompt</ErrorReport>
31 <WarningLevel>4</WarningLevel>
32 </PropertyGroup>
33 <ItemGroup>
34 <Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
35 <Reference Include="Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
36 <Reference Include="System" />
37 <Reference Include="System.Core" />
38 <Reference Include="System.Xml.Linq" />
39 <Reference Include="System.Data.DataSetExtensions" />
40 <Reference Include="Microsoft.CSharp" />
41 <Reference Include="System.Data" />
42 <Reference Include="System.Xml" />
43 </ItemGroup>
44 <ItemGroup>
45 <Compile Include="ValidationRules.cs" />
46 <Compile Include="ExtractionRules.cs" />
47 <Compile Include="Swedbank.cs" />
48 <Compile Include="WebTestPlugins.cs" />
49 <Compile Include="LoadTestPlugins.cs" />
50 <Compile Include="Properties\AssemblyInfo.cs" />
51 </ItemGroup>
52 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
53 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
54 Other similar extension points exist, see Microsoft.Common.targets.
55 <Target Name="BeforeBuild">
56 </Target>
57 <Target Name="AfterBuild">
58 </Target>
59 -->
60 </Project>
...\ No newline at end of file ...\ No newline at end of file
1 using System.Reflection;
2 using System.Runtime.CompilerServices;
3 using System.Runtime.InteropServices;
4
5 // General Information about an assembly is controlled through the following
6 // set of attributes. Change these attribute values to modify the information
7 // associated with an assembly.
8 [assembly: AssemblyTitle("LIL_VSTT_Plugins")]
9 [assembly: AssemblyDescription("Plugins for Web and Load Tests")]
10 [assembly: AssemblyConfiguration("")]
11 [assembly: AssemblyCompany("LIGHTS IN LINE AB")]
12 [assembly: AssemblyProduct("Visual Studio 2010 Ultimate")]
13 [assembly: AssemblyCopyright("© LIGHTS IN LINE AB 2014")]
14 [assembly: AssemblyTrademark("All Rights Reserved")]
15 [assembly: AssemblyCulture("")]
16
17 // Setting ComVisible to false makes the types in this assembly not visible
18 // to COM components. If you need to access a type in this assembly from
19 // COM, set the ComVisible attribute to true on that type.
20 [assembly: ComVisible(false)]
21
22 // The following GUID is for the ID of the typelib if this project is exposed to COM
23 [assembly: Guid("eb453bc6-d339-4a51-9cd4-44478831db9a")]
24
25 // Version information for an assembly consists of the following four values:
26 //
27 // Major Version
28 // Minor Version
29 // Build Number
30 // Revision
31 //
32 // You can specify all the values or you can default the Build and Revision Numbers
33 // by using the '*' as shown below:
34 // [assembly: AssemblyVersion("1.0.*")]
35 [assembly: AssemblyVersion("1.3.0.0")]
36 [assembly: AssemblyFileVersion("1.3.0.0")]
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Net;
6 using Microsoft.VisualStudio.TestTools.WebTesting;
7 using Microsoft.VisualStudio.TestTools.LoadTesting;
8 using System.IO;
9 using System.ComponentModel;
10 using System.Text.RegularExpressions;
11
12 namespace LIL_VSTT_Plugins
13 {
14 /// <summary>
15 /// Count Validation
16 /// Räknar hur många gånger ett visst reguljärt utryck finns i svaret och validerar detta
17 /// </summary>
18 [DisplayName("Count Validation")]
19 [Description("(C) Copyright 2011 LIGHTS IN LINE AB\r\nValiderar att ett reguljärt utryck finns minst ett visst antal gånger i svaret, eller inte.")]
20 public class CountValidation : ValidationRule
21 {
22 [DisplayName("RegEx"), Description("Regular Expression to match on the response.")]
23 public String RegEx { get; set; }
24
25 [DisplayName("Condition"), Description("Valid conditions are =,>,<,>=,<=")]
26 [DefaultValue("=")]
27 public String myCon { get; set; }
28
29 [DisplayName("Count"), Description("Expected count of occurences")]
30 public int Count { get; set; }
31
32 [DisplayName("Pass"), Description("Pass or fail if count matches. True passes if the count matches, False fails if the count matches")]
33 [DefaultValue(true)]
34 public bool Pass { get; set; }
35
36 public override void Validate(object sender, ValidationEventArgs e)
37 {
38 MatchCollection matches = System.Text.RegularExpressions.Regex.Matches(
39 e.Response.BodyString,
40 RegEx,
41 RegexOptions.IgnoreCase);
42
43 switch (myCon) {
44 case "=":
45 if (matches.Count == Count) { e.IsValid = Pass; e.Message = "Number of matches equal to count. Valid set to " + Pass.ToString(); }
46 break;
47 case "<":
48 if (matches.Count < Count) { e.IsValid = Pass; e.Message = "Number of matches less than count. Valid set to " + Pass.ToString(); }
49 break;
50 case ">":
51 if (matches.Count > Count) { e.IsValid = Pass; e.Message = "Number of matches higher than count. Valid set to " + Pass.ToString(); }
52 break;
53 case "<=":
54 if (matches.Count <= Count) { e.IsValid = Pass; e.Message = "Number of matches less or equal to count. Valid set to " + Pass.ToString(); }
55 break;
56 case ">=":
57 if (matches.Count >= Count) { e.IsValid = Pass; e.Message = "Number of matches higher or equal to count. Valid set to " + Pass.ToString(); }
58 break;
59 default:
60 e.IsValid = true; e.Message = "Invalid condition specified. Validation will pass.";
61 break;
62 }
63 }
64 }
65 }
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <TestSettings name="Local" id="f9146b42-ca07-41ed-9af4-6ec2afc90583" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
3 <Description>These are default test settings for a local test run.</Description>
4 <Deployment enabled="false" />
5 <Execution>
6 <TestTypeSpecific />
7 <AgentRule name="Execution Agents">
8 </AgentRule>
9 </Execution>
10 </TestSettings>
...\ No newline at end of file ...\ No newline at end of file
1 using System.Reflection;
2 using System.Runtime.CompilerServices;
3 using System.Runtime.InteropServices;
4
5 // General Information about an assembly is controlled through the following
6 // set of attributes. Change these attribute values to modify the information
7 // associated with an assembly.
8 [assembly: AssemblyTitle("TestProject1")]
9 [assembly: AssemblyDescription("")]
10 [assembly: AssemblyConfiguration("")]
11 [assembly: AssemblyCompany("Microsoft")]
12 [assembly: AssemblyProduct("TestProject1")]
13 [assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
14 [assembly: AssemblyTrademark("")]
15 [assembly: AssemblyCulture("")]
16
17 // Setting ComVisible to false makes the types in this assembly not visible
18 // to COM components. If you need to access a type in this assembly from
19 // COM, set the ComVisible attribute to true on that type.
20 [assembly: ComVisible(false)]
21
22 // The following GUID is for the ID of the typelib if this project is exposed to COM
23 [assembly: Guid("c10cf0ce-1b37-49b2-8ef1-2b588d2fde1d")]
24
25 // Version information for an assembly consists of the following four values:
26 //
27 // Major Version
28 // Minor Version
29 // Build Number
30 // Revision
31 //
32 // You can specify all the values or you can default the Build and Revision Numbers
33 // by using the '*' as shown below:
34 [assembly: AssemblyVersion("1.0.0.0")]
35 [assembly: AssemblyFileVersion("1.0.0.0")]
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6 <ProductVersion>
7 </ProductVersion>
8 <SchemaVersion>2.0</SchemaVersion>
9 <ProjectGuid>{01CF59F6-F912-447A-91BC-0301FDA09C02}</ProjectGuid>
10 <OutputType>Library</OutputType>
11 <AppDesignerFolder>Properties</AppDesignerFolder>
12 <RootNamespace>TestProject1</RootNamespace>
13 <AssemblyName>TestProject1</AssemblyName>
14 <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
15 <FileAlignment>512</FileAlignment>
16 <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
17 <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
18 <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
19 <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
20 <IsCodedUITest>False</IsCodedUITest>
21 <TestProjectType>WebTest</TestProjectType>
22 <FileUpgradeFlags>
23 </FileUpgradeFlags>
24 <UpgradeBackupLocation>
25 </UpgradeBackupLocation>
26 <OldToolsVersion>4.0</OldToolsVersion>
27 </PropertyGroup>
28 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
29 <DebugSymbols>true</DebugSymbols>
30 <DebugType>full</DebugType>
31 <Optimize>false</Optimize>
32 <OutputPath>bin\Debug\</OutputPath>
33 <DefineConstants>DEBUG;TRACE</DefineConstants>
34 <ErrorReport>prompt</ErrorReport>
35 <WarningLevel>4</WarningLevel>
36 </PropertyGroup>
37 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
38 <DebugType>pdbonly</DebugType>
39 <Optimize>true</Optimize>
40 <OutputPath>bin\Release\</OutputPath>
41 <DefineConstants>TRACE</DefineConstants>
42 <ErrorReport>prompt</ErrorReport>
43 <WarningLevel>4</WarningLevel>
44 </PropertyGroup>
45 <ItemGroup>
46 <Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
47 <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
48 <Reference Include="Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
49 <Reference Include="System" />
50 <Reference Include="System.Core">
51 <RequiredTargetFramework>3.5</RequiredTargetFramework>
52 </Reference>
53 </ItemGroup>
54 <ItemGroup>
55 <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
56 <Visible>False</Visible>
57 </CodeAnalysisDependentAssemblyPaths>
58 </ItemGroup>
59 <ItemGroup>
60 <Compile Include="Properties\AssemblyInfo.cs" />
61 <Compile Include="UnitTest1.cs" />
62 <Compile Include="WebTest1Coded.cs" />
63 </ItemGroup>
64 <ItemGroup>
65 <None Include="LoadTest2.loadtest">
66 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
67 </None>
68 <None Include="LoadTest1.loadtest">
69 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
70 </None>
71 <None Include="WebTest2.webtest">
72 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
73 </None>
74 <Shadow Include="Test References\LIL_VSTT_Plugins.accessor" />
75 <None Include="Userdata.csv">
76 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
77 </None>
78 <None Include="WebTest1.webtest">
79 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
80 </None>
81 </ItemGroup>
82 <ItemGroup>
83 <ProjectReference Include="..\LIL_VSTT_Plugins\LIL_VSTT_Plugins.csproj">
84 <Project>{06A22593-601E-4386-917A-9835DE30E14E}</Project>
85 <Name>LIL_VSTT_Plugins</Name>
86 </ProjectReference>
87 </ItemGroup>
88 <Choose>
89 <When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
90 <ItemGroup>
91 <Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
92 <Private>False</Private>
93 </Reference>
94 <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
95 <Private>False</Private>
96 </Reference>
97 <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
98 <Private>False</Private>
99 </Reference>
100 <Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
101 <Private>False</Private>
102 </Reference>
103 </ItemGroup>
104 </When>
105 </Choose>
106 <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
107 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
108 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
109 Other similar extension points exist, see Microsoft.Common.targets.
110 <Target Name="BeforeBuild">
111 </Target>
112 <Target Name="AfterBuild">
113 </Target>
114 -->
115 </Project>
...\ No newline at end of file ...\ No newline at end of file
1 using System;
2 using System.Text;
3 using System.Collections.Generic;
4 using System.Linq;
5 using Microsoft.VisualStudio.TestTools.UnitTesting;
6
7 namespace TestProject1
8 {
9 /// <summary>
10 /// Summary description for UnitTest1
11 /// </summary>
12 [TestClass]
13 public class UnitTest1
14 {
15 public UnitTest1()
16 {
17 //
18 // TODO: Add constructor logic here
19 //
20 }
21
22 private TestContext testContextInstance;
23
24 /// <summary>
25 ///Gets or sets the test context which provides
26 ///information about and functionality for the current test run.
27 ///</summary>
28 public TestContext TestContext
29 {
30 get
31 {
32 return testContextInstance;
33 }
34 set
35 {
36 testContextInstance = value;
37 }
38 }
39
40 #region Additional test attributes
41 //
42 // You can use the following additional attributes as you write your tests:
43 //
44 // Use ClassInitialize to run code before running the first test in the class
45 // [ClassInitialize()]
46 // public static void MyClassInitialize(TestContext testContext) { }
47 //
48 // Use ClassCleanup to run code after all tests in a class have run
49 // [ClassCleanup()]
50 // public static void MyClassCleanup() { }
51 //
52 // Use TestInitialize to run code before running each test
53 // [TestInitialize()]
54 // public void MyTestInitialize() { }
55 //
56 // Use TestCleanup to run code after each test has run
57 // [TestCleanup()]
58 // public void MyTestCleanup() { }
59 //
60 #endregion
61
62 [TestMethod]
63 public void TestMethod1()
64 {
65 TestContext.WriteLine("Current Test Context parameters:");
66 IDictionary<string, object> dic = (IDictionary<string, object>)TestContext.Properties;
67 foreach (KeyValuePair<string, object> pair in dic)
68 TestContext.WriteLine(pair.Key + ": " + pair.Value.ToString());
69 TestContext.WriteLine("End of Current Test Context parameters.");
70 }
71 }
72 }
1 UserName
2 anjo
3 anma
4 anro
5 arbt1
6 arbt10
7 arbt2
8 arbt3
9 arbt4
10 arbt5
11 arbt6
12 arbt7
13 arbt8
14 arbt9
15 bm1
16 boba
17 caca
18 caca10
19 caca3
20 cami
21 dath
22 diet1
23 diet2
24 diet3
25 diet4
26 diet5
27 ebin
28 edi
29 edi_user
30 eman
31 emla
32 emla2
33 empe
34 emsu
35 emsv
36 kaur
37 kewa
38 kura1
39 kura2
40 kura3
41 kura4
42 kura5
43 lak0000001
44 lak0000002
45 lak0000003
46 lak0000004
47 lak0000005
48 lak0000006
49 lak1
50 lak10
51 lak11
52 lak12
53 lak13
54 lak14
55 lak15
56 lak16
57 lak17
58 lak18
59 lak19
60 lak2
61 lak20
62 lak3
63 lak4
64 lak5
65 lak6
66 lak7
67 lak8
68 lak9
69 lakA
70 lakB
71 lakC
72 lakD
73 lego
74 lgry1
75 lilu
76 logo1
77 logo2
78 logo3
79 logo4
80 logo5
81 maan
82 maul
83 melior
84 nigr
85 olle
86 peka
87 pepe
88 pewi
89 pipe
90 psyk1
91 psyk2
92 psyk3
93 psyk4
94 psyk5
95 saan
96 safe
97 saha
98 sajo
99 saka
100 sekr000001
101 sekr000002
102 sekr000003
103 sekr000004
104 sekr000005
105 sekr000006
106 sekr1
107 sekr10
108 sekr11
109 sekr12
110 sekr13
111 sekr14
112 sekr15
113 sekr16
114 sekr17
115 sekr18
116 sekr19
117 sekr2
118 sekr20
119 sekr3
120 sekr4
121 sekr5
122 sekr6
123 sekr7
124 sekr8
125 sekr9
126 sekrA
127 sekrB
128 sekrC
129 sekrD
130 sjgy1
131 sjgy10
132 sjgy2
133 sjgy3
134 sjgy4
135 sjgy5
136 sjgy6
137 sjgy7
138 sjgy8
139 sjgy9
140 sola
141 ssk0000001
142 ssk0000002
143 ssk0000003
144 ssk0000004
145 ssk0000005
146 ssk0000006
147 ssk1
148 ssk10
149 ssk11
150 ssk12
151 ssk13
152 ssk14
153 ssk15
154 ssk16
155 ssk17
156 ssk18
157 ssk19
158 ssk2
159 ssk20
160 ssk3
161 ssk4
162 ssk5
163 ssk6
164 ssk7
165 ssk8
166 ssk9
167 sskA
168 sskB
169 sskC
170 sskD
171 stji
172 sys
173 syslab
174 tst1
175 ulkl
176 utb1
177 utb2
178 voklej
179 ydde1
180 yddelak
181 yddessk
...\ No newline at end of file ...\ No newline at end of file
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="" StopOnError="False" RecordedResultFile="WebTest1.a5a27e2d-474c-43bb-be4d-1b12e85851a0.rec.webtestresult">
3 <Items>
4 <Request Method="POST" Version="1.1" Url="http://www.lil.nu/" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="">
5 <Headers>
6 <Header Name="Username" Value="{{DataSource1.Userdata#csv.UserName}}" />
7 </Headers>
8 <ExtractionRules>
9 <ExtractionRule Classname="LIL_VSTT_Plugins.NestedExtractionRule, LIL_VSTT_Plugins, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null" VariableName="TableRowTest" DisplayName="Nested Extraction" Description="(C) Copyright 2011 LIGHTS IN LINE AB&#xD;&#xA;Kombination av två extractions där den andra söker i resultatet av den första.">
10 <RuleParameters>
11 <RuleParameter Name="Start1" Value="&lt;table width=&quot;100%&quot;" />
12 <RuleParameter Name="End1" Value="&lt;/tr&gt;&lt;/table&gt;" />
13 <RuleParameter Name="Start2" Value="&lt;td id=&quot;start&quot; class=&quot;" />
14 <RuleParameter Name="End2" Value="&quot; onMouseOver" />
15 </RuleParameters>
16 </ExtractionRule>
17 </ExtractionRules>
18 <FormPostHttpBody>
19 <FormPostParameter Name="TestParam" Value="LORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR" RecordedValue="" CorrelationBinding="" UrlEncode="True" />
20 </FormPostHttpBody>
21 </Request>
22 </Items>
23 <DataSources>
24 <DataSource Name="DataSource1" Provider="Microsoft.VisualStudio.TestTools.DataSource.CSV" Connection="|DataDirectory|\Userdata.csv">
25 <Tables>
26 <DataSourceTable Name="Userdata#csv" SelectColumns="SelectOnlyBoundColumns" AccessMethod="DoNotMoveCursor" />
27 </Tables>
28 </DataSource>
29 </DataSources>
30 <WebTestPlugins>
31 <WebTestPlugin Classname="LIL_VSTT_Plugins.UniqueOnce, LIL_VSTT_Plugins, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null" DisplayName="Datasource Unique Once" Description="(C) Copyright 2011 LIGHTS IN LINE AB&#xD;&#xA;OBS! Läs hela! Styr datasource selection till att endast göras en gång per iteration. Du måste ändra i din datasource Access Metod till Do Not Move Automatically! WebTestUserId används för att välja rad. Använder de datasources som finns definerade i webtestet. Använd test mix based on users starting tests samt 0 percent new users.">
32 <RuleParameters>
33 <RuleParameter Name="DataSourceName" Value="DataSource1" />
34 <RuleParameter Name="DataSourceTableName" Value="Userdata#csv" />
35 <RuleParameter Name="Offset" Value="0" />
36 </RuleParameters>
37 </WebTestPlugin>
38 <WebTestPlugin Classname="LIL_VSTT_Plugins.myPlugin, LIL_VSTT_Plugins, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null" DisplayName="Expect 100 Off" Description="(C) Copyright 2011 LIGHTS IN LINE AB&#xD;&#xA;Stänger av .NET expected-100 headern i posts." />
39 </WebTestPlugins>
40 </WebTest>
...\ No newline at end of file ...\ No newline at end of file
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:4.0.30128.1
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------
10
11 namespace TestProject1
12 {
13 using System;
14 using System.Collections.Generic;
15 using System.Text;
16 using Microsoft.VisualStudio.TestTools.WebTesting;
17
18
19 public class WebTest1Coded : WebTest
20 {
21
22 public WebTest1Coded()
23 {
24 this.PreAuthenticate = true;
25 }
26
27 public override IEnumerator<WebTestRequest> GetRequestEnumerator()
28 {
29 WebTestRequest request1 = new WebTestRequest("http://www.lil.nu/");
30 request1.ParseDependentRequests = false;
31 request1.Encoding = System.Text.Encoding.GetEncoding("utf-8");
32 request1.Headers.Add(new WebTestRequestHeader("Cookie", "TestCookie=\"test,test\""));
33 yield return request1;
34 request1 = null;
35 }
36 }
37 }
1 <?xml version="1.0" encoding="utf-8"?>
2 <WebTest Name="WebTest2" Id="9af8354e-b982-4f5a-80f9-777eaed55003" Owner="" Priority="2147483647" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" StopOnError="False" RecordedResultFile="WebTest2.0af40a55-b204-4b39-8847-71e26a47524d.rec.webtestresult">
3 <Items>
4 <Request Method="GET" Guid="e02258d2-a380-44f4-891d-a8c829b5428c" Version="1.1" Url="http://www.lightsinline.se/" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" />
5 <TransactionTimer Name="Transaction2">
6 <Items>
7 <Request Method="GET" Guid="e02258d2-a380-44f4-891d-a8c829b5428c" Version="1.1" Url="http://www.lightsinline.se/" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" />
8 <Request Method="GET" Guid="e02258d2-a380-44f4-891d-a8c829b5428c" Version="1.1" Url="http://www.lightsinline.se/" ThinkTime="0" Timeout="300" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" />
9 </Items>
10 </TransactionTimer>
11 </Items>
12 <WebTestPlugins>
13 <WebTestPlugin Classname="LIL_VSTT_Plugins.dataGenTimestamp, LIL_VSTT_Plugins, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null" DisplayName="Data Generator Timestamp" Description="(C) Copyright 2011 LIGHTS IN LINE AB&#xD;&#xA;Genererar en timestamp som context parameter">
14 <RuleParameters>
15 <RuleParameter Name="ParamNameVal" Value="TimeStampParameter1" />
16 <RuleParameter Name="MillisecondsVal" Value="True" />
17 <RuleParameter Name="PrePageVal" Value="False" />
18 <RuleParameter Name="PreTransactionVal" Value="False" />
19 <RuleParameter Name="PreRequestVal" Value="True" />
20 </RuleParameters>
21 </WebTestPlugin>
22 </WebTestPlugins>
23 </WebTest>
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <TestSettings name="Trace and Test Impact" id="b4128d8d-ffff-46f4-afae-98bb333d8b32" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
3 <Description>These are test settings for Trace and Test Impact.</Description>
4 <Execution>
5 <TestTypeSpecific />
6 <AgentRule name="Execution Agents">
7 <DataCollectors>
8 <DataCollector uri="datacollector://microsoft/SystemInfo/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TestTools.DataCollection.SystemInfo.SystemInfoDataCollector, Microsoft.VisualStudio.TestTools.DataCollection.SystemInfo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="System Information">
9 </DataCollector>
10 <DataCollector uri="datacollector://microsoft/ActionLog/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TestTools.ManualTest.ActionLog.ActionLogPlugin, Microsoft.VisualStudio.TestTools.ManualTest.ActionLog, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Actions">
11 </DataCollector>
12 <DataCollector uri="datacollector://microsoft/HttpProxy/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.HttpProxyCollector, Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="ASP.NET Client Proxy for IntelliTrace and Test Impact">
13 </DataCollector>
14 <DataCollector uri="datacollector://microsoft/TestImpact/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.TestImpactDataCollector, Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Test Impact">
15 </DataCollector>
16 <DataCollector uri="datacollector://microsoft/TraceDebugger/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.TraceDebuggerDataCollector, Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="IntelliTrace">
17 </DataCollector>
18 </DataCollectors>
19 </AgentRule>
20 </Execution>
21 </TestSettings>
...\ No newline at end of file ...\ No newline at end of file