Commit ec037e69 ec037e69fd337a23fda746cd4cff5208f9f23418 by Christian Gerdes

- Fixed null ref errors on empty json/xml body

- Added PassIfNotFound option to XPathExtractionRule
1 parent 34618ddb
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> 2 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
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>
6 <ProductVersion>8.0.30424</ProductVersion> 6 <ProductVersion>8.0.30424</ProductVersion>
7 <SchemaVersion>2.0</SchemaVersion> 7 <SchemaVersion>2.0</SchemaVersion>
8 <ProjectGuid>{48B3509E-1FD8-4875-8FC6-137647EB83AA}</ProjectGuid> 8 <ProjectGuid>{48B3509E-1FD8-4875-8FC6-137647EB83AA}</ProjectGuid>
9 <OutputType>Library</OutputType> 9 <OutputType>Library</OutputType>
10 <StartupObject> 10 <StartupObject>
11 </StartupObject> 11 </StartupObject>
12 <NoStandardLibraries>false</NoStandardLibraries> 12 <NoStandardLibraries>false</NoStandardLibraries>
13 <AssemblyName>WebTest.WebService.Plugin.ResultTab</AssemblyName> 13 <AssemblyName>WebTest.WebService.Plugin.ResultTab</AssemblyName>
14 <DeploymentDirectory>.\bin\</DeploymentDirectory> 14 <DeploymentDirectory>.\bin\</DeploymentDirectory>
15 <SccProjectName>SAK</SccProjectName> 15 <SccProjectName>SAK</SccProjectName>
16 <SccLocalPath>SAK</SccLocalPath> 16 <SccLocalPath>SAK</SccLocalPath>
17 <SccAuxPath>SAK</SccAuxPath> 17 <SccAuxPath>SAK</SccAuxPath>
18 <SccProvider>SAK</SccProvider> 18 <SccProvider>SAK</SccProvider>
19 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 19 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
20 <TargetFrameworkProfile /> 20 <TargetFrameworkProfile />
21 </PropertyGroup> 21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
23 <DebugSymbols>true</DebugSymbols> 23 <DebugSymbols>true</DebugSymbols>
24 <Optimize>false</Optimize> 24 <Optimize>false</Optimize>
25 <OutputPath>.\bin\Debug\</OutputPath> 25 <OutputPath>.\bin\Debug\</OutputPath>
26 <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> 26 <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
27 <DefineConstants>DEBUG;TRACE</DefineConstants> 27 <DefineConstants>DEBUG;TRACE</DefineConstants>
28 <WarningLevel>4</WarningLevel> 28 <WarningLevel>4</WarningLevel>
29 <IncrementalBuild>false</IncrementalBuild> 29 <IncrementalBuild>false</IncrementalBuild>
30 <DocumentationFile>WebTest.WebService.Plugin.ResultTab.xml</DocumentationFile> 30 <DocumentationFile>WebTest.WebService.Plugin.ResultTab.xml</DocumentationFile>
31 <Prefer32Bit>false</Prefer32Bit> 31 <Prefer32Bit>false</Prefer32Bit>
32 </PropertyGroup> 32 </PropertyGroup>
33 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 33 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
34 <DebugSymbols>false</DebugSymbols> 34 <DebugSymbols>false</DebugSymbols>
35 <Optimize>true</Optimize> 35 <Optimize>true</Optimize>
36 <OutputPath>.\bin\Release\</OutputPath> 36 <OutputPath>.\bin\Release\</OutputPath>
37 <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> 37 <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
38 <DefineConstants>TRACE</DefineConstants> 38 <DefineConstants>TRACE</DefineConstants>
39 <WarningLevel>4</WarningLevel> 39 <WarningLevel>4</WarningLevel>
40 <IncrementalBuild>false</IncrementalBuild> 40 <IncrementalBuild>false</IncrementalBuild>
41 <DocumentationFile>WebTest.WebService.Plugin.ResultTab.xml</DocumentationFile> 41 <DocumentationFile>WebTest.WebService.Plugin.ResultTab.xml</DocumentationFile>
42 <Prefer32Bit>false</Prefer32Bit> 42 <Prefer32Bit>false</Prefer32Bit>
43 </PropertyGroup> 43 </PropertyGroup>
44 <PropertyGroup> 44 <PropertyGroup>
45 <RootNamespace>WebTest.WebService.Plugin.ResultTab</RootNamespace> 45 <RootNamespace>WebTest.WebService.Plugin.ResultTab</RootNamespace>
46 </PropertyGroup> 46 </PropertyGroup>
47 <ItemGroup> 47 <ItemGroup>
48 <Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 48 <Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
49 <EmbedInteropTypes>False</EmbedInteropTypes> 49 <EmbedInteropTypes>False</EmbedInteropTypes>
50 </Reference> 50 </Reference>
51 <Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 51 <Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
52 <EmbedInteropTypes>True</EmbedInteropTypes> 52 <EmbedInteropTypes>True</EmbedInteropTypes>
53 </Reference> 53 </Reference>
54 <Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework" /> 54 <Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework" />
55 <Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestPackage"> 55 <Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestPackage">
56 <HintPath>C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.LoadTestPackage.dll</HintPath> 56 <HintPath>..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.LoadTestPackage.dll</HintPath>
57 <HintPath>C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.LoadTestPackage.dll</HintPath> 57 </Reference>
58 <Private>False</Private> 58 <Reference Include="Microsoft.VisualStudio.QualityTools.WebTestFramework" />
59 </Reference> 59 <Reference Include="System" />
60 <Reference Include="Microsoft.VisualStudio.QualityTools.WebTestFramework" /> 60 <Reference Include="System.Core" />
61 <Reference Include="System" /> 61 <Reference Include="System.Data" />
62 <Reference Include="System.Core" /> 62 <Reference Include="System.Drawing" />
63 <Reference Include="System.Data" /> 63 <Reference Include="System.Windows.Forms" />
64 <Reference Include="System.Drawing" /> 64 <Reference Include="System.Xml" />
65 <Reference Include="System.Windows.Forms" /> 65 <Reference Include="Microsoft.CSharp" />
66 <Reference Include="System.Xml" /> 66 <Reference Include="Microsoft.VisualStudio.Shell.11.0" />
67 <Reference Include="Microsoft.CSharp" /> 67 <Reference Include="Microsoft.VisualStudio.Shell.Immutable.11.0" />
68 <Reference Include="Microsoft.VisualStudio.Shell.11.0" /> 68 <Reference Include="Microsoft.VisualStudio.OLE.Interop" />
69 <Reference Include="Microsoft.VisualStudio.Shell.Immutable.11.0" /> 69 <Reference Include="Microsoft.VisualStudio.Shell.Interop" />
70 <Reference Include="Microsoft.VisualStudio.OLE.Interop" /> 70 <Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0" />
71 <Reference Include="Microsoft.VisualStudio.Shell.Interop" /> 71 <Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0" />
72 <Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0" /> 72 <Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0" />
73 <Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0" /> 73 <Reference Include="VSLangProj, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
74 <Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0" /> 74 <EmbedInteropTypes>True</EmbedInteropTypes>
75 <Reference Include="VSLangProj, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 75 </Reference>
76 <EmbedInteropTypes>True</EmbedInteropTypes> 76 <Reference Include="VSLangProj2, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
77 </Reference> 77 <EmbedInteropTypes>True</EmbedInteropTypes>
78 <Reference Include="VSLangProj2, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 78 </Reference>
79 <EmbedInteropTypes>True</EmbedInteropTypes> 79 <Reference Include="VSLangProj80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
80 </Reference> 80 <EmbedInteropTypes>True</EmbedInteropTypes>
81 <Reference Include="VSLangProj80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 81 </Reference>
82 <EmbedInteropTypes>True</EmbedInteropTypes> 82 </ItemGroup>
83 </Reference> 83 <ItemGroup>
84 </ItemGroup> 84 <Compile Include="AssemblyInfo.cs">
85 <ItemGroup> 85 <SubType>Code</SubType>
86 <Compile Include="AssemblyInfo.cs"> 86 </Compile>
87 <SubType>Code</SubType> 87 <Compile Include="Connect.cs">
88 </Compile> 88 <SubType>Code</SubType>
89 <Compile Include="Connect.cs"> 89 </Compile>
90 <SubType>Code</SubType> 90 <Compile Include="Properties\Resources.Designer.cs">
91 </Compile> 91 <AutoGen>True</AutoGen>
92 <Compile Include="Properties\Resources.Designer.cs"> 92 <DesignTime>True</DesignTime>
93 <AutoGen>True</AutoGen> 93 <DependentUpon>Resources.resx</DependentUpon>
94 <DesignTime>True</DesignTime> 94 </Compile>
95 <DependentUpon>Resources.resx</DependentUpon> 95 <Compile Include="WebServiceResult.cs">
96 </Compile> 96 <SubType>UserControl</SubType>
97 <Compile Include="WebServiceResult.cs"> 97 </Compile>
98 <SubType>UserControl</SubType> 98 <Compile Include="WebServiceResult.Designer.cs">
99 </Compile> 99 <DependentUpon>WebServiceResult.cs</DependentUpon>
100 <Compile Include="WebServiceResult.Designer.cs"> 100 </Compile>
101 <DependentUpon>WebServiceResult.cs</DependentUpon> 101 <Compile Include="WebTestDetail.cs" />
102 </Compile> 102 <Compile Include="XmlTreeView.cs" />
103 <Compile Include="WebTestDetail.cs" /> 103 </ItemGroup>
104 <Compile Include="XmlTreeView.cs" /> 104 <ItemGroup>
105 </ItemGroup> 105 <COMReference Include="EnvDTE">
106 <ItemGroup> 106 <Guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</Guid>
107 <COMReference Include="EnvDTE"> 107 <VersionMajor>8</VersionMajor>
108 <Guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</Guid> 108 <VersionMinor>0</VersionMinor>
109 <VersionMajor>8</VersionMajor> 109 <Lcid>0</Lcid>
110 <VersionMinor>0</VersionMinor> 110 <WrapperTool>primary</WrapperTool>
111 <Lcid>0</Lcid> 111 <Isolated>False</Isolated>
112 <WrapperTool>primary</WrapperTool> 112 <EmbedInteropTypes>False</EmbedInteropTypes>
113 <Isolated>False</Isolated> 113 </COMReference>
114 <EmbedInteropTypes>False</EmbedInteropTypes> 114 <COMReference Include="EnvDTE100">
115 </COMReference> 115 <Guid>{26AD1324-4B7C-44BC-84F8-B86AED45729F}</Guid>
116 <COMReference Include="EnvDTE100"> 116 <VersionMajor>10</VersionMajor>
117 <Guid>{26AD1324-4B7C-44BC-84F8-B86AED45729F}</Guid> 117 <VersionMinor>0</VersionMinor>
118 <VersionMajor>10</VersionMajor> 118 <Lcid>0</Lcid>
119 <VersionMinor>0</VersionMinor> 119 <WrapperTool>primary</WrapperTool>
120 <Lcid>0</Lcid> 120 <Isolated>False</Isolated>
121 <WrapperTool>primary</WrapperTool> 121 <EmbedInteropTypes>False</EmbedInteropTypes>
122 <Isolated>False</Isolated> 122 </COMReference>
123 <EmbedInteropTypes>False</EmbedInteropTypes> 123 <COMReference Include="EnvDTE80">
124 </COMReference> 124 <Guid>{1A31287A-4D7D-413E-8E32-3B374931BD89}</Guid>
125 <COMReference Include="EnvDTE80"> 125 <VersionMajor>8</VersionMajor>
126 <Guid>{1A31287A-4D7D-413E-8E32-3B374931BD89}</Guid> 126 <VersionMinor>0</VersionMinor>
127 <VersionMajor>8</VersionMajor> 127 <Lcid>0</Lcid>
128 <VersionMinor>0</VersionMinor> 128 <WrapperTool>primary</WrapperTool>
129 <Lcid>0</Lcid> 129 <Isolated>False</Isolated>
130 <WrapperTool>primary</WrapperTool> 130 <EmbedInteropTypes>False</EmbedInteropTypes>
131 <Isolated>False</Isolated> 131 </COMReference>
132 <EmbedInteropTypes>False</EmbedInteropTypes> 132 <COMReference Include="EnvDTE90">
133 </COMReference> 133 <Guid>{2CE2370E-D744-4936-A090-3FFFE667B0E1}</Guid>
134 <COMReference Include="EnvDTE90"> 134 <VersionMajor>9</VersionMajor>
135 <Guid>{2CE2370E-D744-4936-A090-3FFFE667B0E1}</Guid> 135 <VersionMinor>0</VersionMinor>
136 <VersionMajor>9</VersionMajor> 136 <Lcid>0</Lcid>
137 <VersionMinor>0</VersionMinor> 137 <WrapperTool>primary</WrapperTool>
138 <Lcid>0</Lcid> 138 <Isolated>False</Isolated>
139 <WrapperTool>primary</WrapperTool> 139 <EmbedInteropTypes>False</EmbedInteropTypes>
140 <Isolated>False</Isolated> 140 </COMReference>
141 <EmbedInteropTypes>False</EmbedInteropTypes> 141 <COMReference Include="Microsoft.VisualStudio.CommandBars">
142 </COMReference> 142 <Guid>{1CBA492E-7263-47BB-87FE-639000619B15}</Guid>
143 <COMReference Include="Microsoft.VisualStudio.CommandBars"> 143 <VersionMajor>8</VersionMajor>
144 <Guid>{1CBA492E-7263-47BB-87FE-639000619B15}</Guid> 144 <VersionMinor>0</VersionMinor>
145 <VersionMajor>8</VersionMajor> 145 <Lcid>0</Lcid>
146 <VersionMinor>0</VersionMinor> 146 <WrapperTool>primary</WrapperTool>
147 <Lcid>0</Lcid> 147 <Isolated>False</Isolated>
148 <WrapperTool>primary</WrapperTool> 148 <EmbedInteropTypes>False</EmbedInteropTypes>
149 <Isolated>False</Isolated> 149 </COMReference>
150 <EmbedInteropTypes>False</EmbedInteropTypes> 150 <COMReference Include="stdole">
151 </COMReference> 151 <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
152 <COMReference Include="stdole"> 152 <VersionMajor>2</VersionMajor>
153 <Guid>{00020430-0000-0000-C000-000000000046}</Guid> 153 <VersionMinor>0</VersionMinor>
154 <VersionMajor>2</VersionMajor> 154 <Lcid>0</Lcid>
155 <VersionMinor>0</VersionMinor> 155 <WrapperTool>primary</WrapperTool>
156 <Lcid>0</Lcid> 156 <Isolated>False</Isolated>
157 <WrapperTool>primary</WrapperTool> 157 <EmbedInteropTypes>False</EmbedInteropTypes>
158 <Isolated>False</Isolated> 158 </COMReference>
159 <EmbedInteropTypes>False</EmbedInteropTypes> 159 </ItemGroup>
160 </COMReference> 160 <ItemGroup>
161 </ItemGroup> 161 <Content Include="WebServicePluginForWebTestResultTab.AddIn">
162 <ItemGroup> 162 <SubType>Designer</SubType>
163 <Content Include="WebServicePluginForWebTestResultTab.AddIn"> 163 </Content>
164 <SubType>Designer</SubType> 164 </ItemGroup>
165 </Content> 165 <ItemGroup>
166 </ItemGroup> 166 <EmbeddedResource Include="Properties\Resources.resx">
167 <ItemGroup> 167 <Generator>ResXFileCodeGenerator</Generator>
168 <EmbeddedResource Include="Properties\Resources.resx"> 168 <LastGenOutput>Resources.Designer.cs</LastGenOutput>
169 <Generator>ResXFileCodeGenerator</Generator> 169 </EmbeddedResource>
170 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 170 <EmbeddedResource Include="WebServiceResult.resx">
171 </EmbeddedResource> 171 <DependentUpon>WebServiceResult.cs</DependentUpon>
172 <EmbeddedResource Include="WebServiceResult.resx"> 172 </EmbeddedResource>
173 <DependentUpon>WebServiceResult.cs</DependentUpon> 173 </ItemGroup>
174 </EmbeddedResource> 174 <ItemGroup>
175 </ItemGroup> 175 <ProjectReference Include="..\WebTestWebServiceRuntime\WebServicePluginForWebTestRuntime.csproj">
176 <ItemGroup> 176 <Project>{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}</Project>
177 <ProjectReference Include="..\WebTestWebServiceRuntime\WebServicePluginForWebTestRuntime.csproj"> 177 <Name>WebServicePluginForWebTestRuntime</Name>
178 <Project>{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}</Project> 178 <Private>False</Private>
179 <Name>WebServicePluginForWebTestRuntime</Name> 179 </ProjectReference>
180 <Private>False</Private> 180 </ItemGroup>
181 </ProjectReference> 181 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
182 </ItemGroup> 182 <PropertyGroup>
183 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> 183 <PreBuildEvent>
184 <PropertyGroup> 184 </PreBuildEvent>
185 <PreBuildEvent> 185 <PostBuildEvent>
186 </PreBuildEvent> 186 </PostBuildEvent>
187 <PostBuildEvent> 187 </PropertyGroup>
188 </PostBuildEvent> 188 <ProjectExtensions />
189 </PropertyGroup> 189 <Target Name="AfterBuild">
190 <ProjectExtensions /> 190 <PropertyGroup>
191 <Target Name="AfterBuild"> 191 <DllName>$(AssemblyName).dll</DllName>
192 <PropertyGroup> 192 <PdbName>$(AssemblyName).pdb</PdbName>
193 <DllName>$(AssemblyName).dll</DllName> 193 <DocFileName>$(AssemblyName).xml</DocFileName>
194 <PdbName>$(AssemblyName).pdb</PdbName> 194 </PropertyGroup>
195 <DocFileName>$(AssemblyName).xml</DocFileName> 195 <Delete Condition="Exists('$(DeploymentDirectory)$(DllName)')" Files="$(DeploymentDirectory)$(DllName)">
196 </PropertyGroup> 196 </Delete>
197 <Delete Condition="Exists('$(DeploymentDirectory)$(DllName)')" Files="$(DeploymentDirectory)$(DllName)"> 197 <Delete Condition="Exists('$(DeploymentDirectory)$(PdbName)')" Files="$(DeploymentDirectory)$(PdbName)">
198 </Delete> 198 </Delete>
199 <Delete Condition="Exists('$(DeploymentDirectory)$(PdbName)')" Files="$(DeploymentDirectory)$(PdbName)"> 199 <Delete Condition="Exists('$(DeploymentDirectory)$(DocFileName)')" Files="$(DeploymentDirectory)$(DocFileName)">
200 </Delete> 200 </Delete>
201 <Delete Condition="Exists('$(DeploymentDirectory)$(DocFileName)')" Files="$(DeploymentDirectory)$(DocFileName)"> 201 <Copy Condition="Exists('$(OutputPath)$(DllName)')" SourceFiles="$(OutputPath)$(DllName)" DestinationFolder="$(DeploymentDirectory)">
202 </Delete> 202 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
203 <Copy Condition="Exists('$(OutputPath)$(DllName)')" SourceFiles="$(OutputPath)$(DllName)" DestinationFolder="$(DeploymentDirectory)"> 203 </Copy>
204 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> 204 <Copy Condition="Exists('$(OutputPath)$(PdbName)')" SourceFiles="$(OutputPath)$(PdbName)" DestinationFolder="$(DeploymentDirectory)">
205 </Copy> 205 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
206 <Copy Condition="Exists('$(OutputPath)$(PdbName)')" SourceFiles="$(OutputPath)$(PdbName)" DestinationFolder="$(DeploymentDirectory)"> 206 </Copy>
207 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> 207 <Copy Condition="Exists('$(OutputPath)$(DocFileName)')" SourceFiles="$(OutputPath)$(DocFileName)" DestinationFolder="$(DeploymentDirectory)">
208 </Copy> 208 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
209 <Copy Condition="Exists('$(OutputPath)$(DocFileName)')" SourceFiles="$(OutputPath)$(DocFileName)" DestinationFolder="$(DeploymentDirectory)"> 209 </Copy>
210 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> 210 </Target>
211 </Copy>
212 </Target>
213 </Project> 211 </Project>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -86,25 +86,28 @@ namespace WebTest.WebService.Plugin.ResultTab ...@@ -86,25 +86,28 @@ namespace WebTest.WebService.Plugin.ResultTab
86 { 86 {
87 try 87 try
88 { 88 {
89 this.dom = dom; 89 this.dom = dom;
90 XmlNode xNode = dom.DocumentElement; 90 if (dom.DocumentElement != null)
91 91 {
92 // Load the XML into the TreeView. 92 XmlNode xNode = dom.DocumentElement;
93 treeView.Nodes.Clear(); 93
94 94 // Load the XML into the TreeView.
95 TreeNode treeNode = new TreeNode(xNode.Name); 95 treeView.Nodes.Clear();
96 treeNode.Tag = xNode; 96
97 if (xNode.HasChildNodes) 97 TreeNode treeNode = new TreeNode(xNode.Name);
98 { 98 treeNode.Tag = xNode;
99 treeNode.Nodes.Add(new TreeNode("dummy")); 99 if (xNode.HasChildNodes)
100 {
101 treeNode.Nodes.Add(new TreeNode("dummy"));
102 }
103 else
104 {
105 treeNode.Text = xNode.InnerXml.Trim();
106 }
107
108 treeView.Nodes.Add(treeNode);
109 treeNode.Collapse();
100 } 110 }
101 else
102 {
103 treeNode.Text = xNode.InnerXml.Trim();
104 }
105
106 treeView.Nodes.Add(treeNode);
107 treeNode.Collapse();
108 } 111 }
109 catch (Exception ex) 112 catch (Exception ex)
110 { 113 {
......
...@@ -50,7 +50,12 @@ namespace WebTest.WebService.Plugin.Runtime ...@@ -50,7 +50,12 @@ namespace WebTest.WebService.Plugin.Runtime
50 { 50 {
51 get { return randomMatch; } 51 get { return randomMatch; }
52 set { randomMatch = value; } 52 set { randomMatch = value; }
53 } 53 }
54
55 [DisplayName("Pass if not found")]
56 [Description("If set to true, this rule will pass the request even if no match is found.")]
57 [DefaultValue(false)]
58 public bool passIfNotFound { get; set; }
54 59
55 /// <summary> 60 /// <summary>
56 /// The Extract method. The parameter e contains the Web test context. 61 /// The Extract method. The parameter e contains the Web test context.
...@@ -62,64 +67,62 @@ namespace WebTest.WebService.Plugin.Runtime ...@@ -62,64 +67,62 @@ namespace WebTest.WebService.Plugin.Runtime
62 try 67 try
63 { 68 {
64 ContentHandler contentHandler = ContentHandlerFactory.GetHandler(e.Response.ContentType); 69 ContentHandler contentHandler = ContentHandlerFactory.GetHandler(e.Response.ContentType);
65 if (contentHandler == null) 70 if (contentHandler != null) {
66 { 71 if (contentHandler.IsBinary)
67 return; 72 {
68 } 73 contentHandler.MessageBytes = e.Response.BodyBytes;
74 }
75 else
76 {
77 contentHandler.MessageString = e.Response.BodyString;
78 }
69 79
70 if (contentHandler.IsBinary) 80 XPathNodeIterator iterator = contentHandler.EvaluateXPath(XPathToSearch);
71 {
72 contentHandler.MessageBytes = e.Response.BodyBytes;
73 }
74 else
75 {
76 contentHandler.MessageString = e.Response.BodyString;
77 }
78 81
79 XPathNodeIterator iterator = contentHandler.EvaluateXPath(XPathToSearch); 82 List<string> values = new List<string>();
80 83
81 List<string> values = new List<string>(); 84 int i = 0;
85 while (iterator.MoveNext())
86 {
87 XPathNavigator nav2 = iterator.Current.Clone();
82 88
83 int i = 0; 89 string value;
84 while (iterator.MoveNext()) 90 if (nav2.NodeType.Equals(XPathNodeType.Element))
85 { 91 {
86 XPathNavigator nav2 = iterator.Current.Clone(); 92 value = nav2.InnerXml;
93 }
94 else
95 {
96 value = nav2.Value;
97 }
87 98
88 string value; 99 values.Add(value);
89 if (nav2.NodeType.Equals(XPathNodeType.Element)) 100 if (!ExtractRandomMatch && (i == Index))
90 { 101 {
91 value = nav2.InnerXml; 102 // add the extracted value to the Web test context
92 } 103 e.WebTest.Context.Add(this.ContextParameterName, value);
93 else 104 e.Success = true;
94 { 105 return;
95 value = nav2.Value; 106 }
107 i++;
96 } 108 }
97 109
98 values.Add(value); 110 if (ExtractRandomMatch && (values.Count > 0))
99 if (!ExtractRandomMatch && (i == Index))
100 { 111 {
101 // add the extracted value to the Web test context 112 Random random = new Random();
102 e.WebTest.Context.Add(this.ContextParameterName, value); 113 e.WebTest.Context.Add(this.ContextParameterName, values[random.Next(values.Count)]);
103 e.Success = true; 114 e.Success = true;
104 return; 115 return;
105 } 116 }
106 i++;
107 }
108
109 if (ExtractRandomMatch && (values.Count > 0))
110 {
111 Random random = new Random();
112 e.WebTest.Context.Add(this.ContextParameterName, values[random.Next(values.Count)]);
113 e.Success = true;
114 return;
115 } 117 }
116 } 118 }
117 catch (Exception ex) 119 catch (Exception ex)
118 { 120 {
119 e.Message = ex.Message; 121 e.Message = ex.Message;
120 } 122 }
121 123
122 e.Success = false; 124 e.Success = passIfNotFound;
125 e.Message += " (XPath not found)";
123 return; 126 return;
124 } 127 }
125 } 128 }
......
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3 3
4 <Product Id="{289E27D1-0F89-4F1A-A2C7-9584091B9950}" Name="Web Test Plugin for Web Service Messages - VS 2012" Language="1033" Version="3.0.0.0" Manufacturer="Microsoft IT" UpgradeCode="{BF388820-5266-41AF-BFFE-DC183C37D624}"> 4 <Product Id="{382AA10B-843C-474A-B662-C051AD2B160B}" Name="Web Test Plugin for Web Service Messages - VS 2013" Language="1033" Version="3.3.0.0" Manufacturer="LIGHTS IN LINE AB" UpgradeCode="{BF388820-5266-41AF-BFFE-DC183C37D624}">
5 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> 5 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
6 <Media Id="1" Cabinet="WebServicePlugins1.cab" EmbedCab="yes" /> 6 <Media Id="1" Cabinet="WebServicePlugins1.cab" EmbedCab="yes" />
7 7
8 <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 8 <MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
9 9
10 <Feature Id="ProductFeature" Title="Web Test Plugin for Web Service Messages" Level="1"> 10 <Feature Id="ProductFeature" Title="Web Test Plugin for Web Service Messages" Level="1">
11 <ComponentRef Id="WebTestMessageEditor" /> 11 <ComponentRef Id="WebTestMessageEditor" />
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
13 <ComponentRef Id="WebTestRuntime" /> 13 <ComponentRef Id="WebTestRuntime" />
14 </Feature> 14 </Feature>
15 15
16 <Property Id="VS2012INSTALLFOLDER" Secure="yes"> 16 <Property Id="VS2013INSTALLFOLDER" Secure="yes">
17 <RegistrySearch Id="VS2012InstallationFolderRegistrySearchId" Type="raw" 17 <RegistrySearch Id="VS2013InstallationFolderRegistrySearchId" Type="raw"
18 Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\11.0" Name="InstallDir"></RegistrySearch> 18 Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\12.0" Name="InstallDir"></RegistrySearch>
19 </Property> 19 </Property>
20 20
21 <Condition Message="Visual Studio 2012 not found."> 21 <Condition Message="Visual Studio 2013 not found.">
22 Installed OR VS2012INSTALLFOLDER 22 Installed OR VS2013INSTALLFOLDER
23 </Condition> 23 </Condition>
24 </Product> 24 </Product>
25 25
26 <Fragment> 26 <Fragment>
27 <Directory Id="TARGETDIR" Name="SourceDir"> 27 <Directory Id="TARGETDIR" Name="SourceDir">
28 <Directory Id="VS2012INSTALLFOLDER"> 28 <Directory Id="VS2013INSTALLFOLDER">
29 <Directory Id="PrivateAssemblies" Name="PrivateAssemblies"> 29 <Directory Id="PrivateAssemblies" Name="PrivateAssemblies">
30 <Directory Id="WebTestPlugins" Name="WebTestPlugins"> 30 <Directory Id="WebTestPlugins" Name="WebTestPlugins">
31 <Component Id="WebTestMessageEditor" Guid="{17E95CD2-6B83-46C9-AEE5-019853FF62EC}"> 31 <Component Id="WebTestMessageEditor" Guid="{17E95CD2-6B83-46C9-AEE5-019853FF62EC}">
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
43 <Directory Id="AppDataFolder"> 43 <Directory Id="AppDataFolder">
44 <Directory Id="MSAppDataDir" Name="Microsoft"> 44 <Directory Id="MSAppDataDir" Name="Microsoft">
45 <Directory Id="VSAppDataDir" Name="VisualStudio"> 45 <Directory Id="VSAppDataDir" Name="VisualStudio">
46 <Directory Id="VSAppDataVersionDir" Name="11.0"> 46 <Directory Id="VSAppDataVersionDir" Name="12.0">
47 <Directory Id="VSAddins" Name="Addins"> 47 <Directory Id="VSAddins" Name="Addins">
48 <Component Id="WebTestResultTab" Guid="{27569640-6946-4E4F-8E55-109E99A79DB9}"> 48 <Component Id="WebTestResultTab" Guid="{27569640-6946-4E4F-8E55-109E99A79DB9}">
49 <RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Microsoft\WebServicePlugin" Name="Installed" Type="integer" Value="1" Action="write" /> 49 <RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Microsoft\WebServicePlugin" Name="Installed" Type="integer" Value="1" Action="write" />
......