Commit 6c53cf31 6c53cf3101f508c7e89b1ee139dc158556bf8cea by Christian Gerdes

Initial commit from CodePlex 2017-09-02

0 parents
Showing 33 changed files with 2836 additions and 0 deletions

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebServicePluginForWebTestMessageEditor", "WebTestWebServiceMessageEditor\WebServicePluginForWebTestMessageEditor.csproj", "{23707A49-589B-4A36-BDAA-2896E647D07D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebServicePluginForWebTestResultTab", "WebTestWebServiceResultAddin\WebServicePluginForWebTestResultTab.csproj", "{48B3509E-1FD8-4875-8FC6-137647EB83AA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebServicePluginForWebTestRuntime", "WebTestWebServiceRuntime\WebServicePluginForWebTestRuntime.csproj", "{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "WebServicePluginsSetup", "WebTestWebServiceSetup\WebServicePluginsSetup.wixproj", "{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 4
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs03
SccProjectUniqueName0 = WebTestWebServiceRuntime\\WebServicePluginForWebTestRuntime.csproj
SccProjectName0 = WebTestWebServiceRuntime
SccAuxPath0 = https://tfs.codeplex.com/tfs/tfs03
SccLocalPath0 = WebTestWebServiceRuntime
SccProvider0 = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccProjectUniqueName1 = WebTestWebServiceResultAddin\\WebServicePluginForWebTestResultTab.csproj
SccProjectName1 = WebTestWebServiceResultAddin
SccAuxPath1 = https://tfs.codeplex.com/tfs/tfs03
SccLocalPath1 = WebTestWebServiceResultAddin
SccProvider1 = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccProjectUniqueName2 = WebTestWebServiceMessageEditor\\WebServicePluginForWebTestMessageEditor.csproj
SccProjectName2 = WebTestWebServiceMessageEditor
SccAuxPath2 = https://tfs.codeplex.com/tfs/tfs03
SccLocalPath2 = WebTestWebServiceMessageEditor
SccProvider2 = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccProjectUniqueName3 = WebTestWebServiceSetup\\WebServicePluginsSetup.wixproj
SccProjectName3 = WebTestWebServiceSetup
SccAuxPath3 = https://tfs.codeplex.com/tfs/tfs03
SccLocalPath3 = WebTestWebServiceSetup
SccProvider3 = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{23707A49-589B-4A36-BDAA-2896E647D07D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23707A49-589B-4A36-BDAA-2896E647D07D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23707A49-589B-4A36-BDAA-2896E647D07D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{23707A49-589B-4A36-BDAA-2896E647D07D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{23707A49-589B-4A36-BDAA-2896E647D07D}.Debug|x86.ActiveCfg = Debug|Any CPU
{23707A49-589B-4A36-BDAA-2896E647D07D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23707A49-589B-4A36-BDAA-2896E647D07D}.Release|Any CPU.Build.0 = Release|Any CPU
{23707A49-589B-4A36-BDAA-2896E647D07D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{23707A49-589B-4A36-BDAA-2896E647D07D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{23707A49-589B-4A36-BDAA-2896E647D07D}.Release|x86.ActiveCfg = Release|Any CPU
{48B3509E-1FD8-4875-8FC6-137647EB83AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48B3509E-1FD8-4875-8FC6-137647EB83AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48B3509E-1FD8-4875-8FC6-137647EB83AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{48B3509E-1FD8-4875-8FC6-137647EB83AA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{48B3509E-1FD8-4875-8FC6-137647EB83AA}.Debug|x86.ActiveCfg = Debug|Any CPU
{48B3509E-1FD8-4875-8FC6-137647EB83AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48B3509E-1FD8-4875-8FC6-137647EB83AA}.Release|Any CPU.Build.0 = Release|Any CPU
{48B3509E-1FD8-4875-8FC6-137647EB83AA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{48B3509E-1FD8-4875-8FC6-137647EB83AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{48B3509E-1FD8-4875-8FC6-137647EB83AA}.Release|x86.ActiveCfg = Release|Any CPU
{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}.Debug|x86.ActiveCfg = Debug|Any CPU
{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}.Release|Any CPU.Build.0 = Release|Any CPU
{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}.Release|x86.ActiveCfg = Release|Any CPU
{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}.Debug|Any CPU.ActiveCfg = Debug|x86
{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}.Debug|Mixed Platforms.Build.0 = Debug|x86
{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}.Debug|x86.ActiveCfg = Debug|x86
{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}.Debug|x86.Build.0 = Debug|x86
{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}.Release|Any CPU.ActiveCfg = Release|x86
{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}.Release|Mixed Platforms.ActiveCfg = Release|x86
{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}.Release|Mixed Platforms.Build.0 = Release|x86
{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}.Release|x86.ActiveCfg = Release|x86
{73ACCDA5-47C1-40C9-B63E-AFF657E046E4}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
//*************************************************************************************************
// MessageEditor.Designer.cs
// Owner: Mahipal Kante
//
// UI of Editor for Web Service Request Body
// The Web Service response can be plain XML or 'application/soap+msbin1'
// (binary - used by Silverlight application with WCF RIA) or JSON
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
namespace WebTest.WebService.Plugin.MessageEditors
{
partial class MessageEditor
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.requestTextBox = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.treeViewRequest = new System.Windows.Forms.TreeView();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.panel1 = new System.Windows.Forms.Panel();
this.requestXMLEditor = new System.Windows.Forms.LinkLabel();
this.tableLayoutPanel1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// requestTextBox
//
this.requestTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.requestTextBox.Location = new System.Drawing.Point(3, 3);
this.requestTextBox.Multiline = true;
this.requestTextBox.Name = "requestTextBox";
this.requestTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.requestTextBox.Size = new System.Drawing.Size(326, 166);
this.requestTextBox.TabIndex = 0;
this.requestTextBox.WordWrap = false;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.tabControl1, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(346, 229);
this.tableLayoutPanel1.TabIndex = 1;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(3, 28);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(340, 198);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.treeViewRequest);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(332, 172);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "TreeView";
this.tabPage1.UseVisualStyleBackColor = true;
//
// treeViewRequest
//
this.treeViewRequest.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeViewRequest.LabelEdit = true;
this.treeViewRequest.Location = new System.Drawing.Point(3, 3);
this.treeViewRequest.Name = "treeViewRequest";
this.treeViewRequest.Size = new System.Drawing.Size(326, 166);
this.treeViewRequest.TabIndex = 0;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.requestTextBox);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(332, 172);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Text View";
this.tabPage2.UseVisualStyleBackColor = true;
//
// panel1
//
this.panel1.Controls.Add(this.requestXMLEditor);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(340, 19);
this.panel1.TabIndex = 1;
//
// requestXMLEditor
//
this.requestXMLEditor.AutoSize = true;
this.requestXMLEditor.Location = new System.Drawing.Point(4, 4);
this.requestXMLEditor.Name = "requestXMLEditor";
this.requestXMLEditor.Size = new System.Drawing.Size(96, 13);
this.requestXMLEditor.TabIndex = 0;
this.requestXMLEditor.TabStop = true;
this.requestXMLEditor.Text = "View in XML Editor";
this.requestXMLEditor.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.requestXMLEditor_LinkClicked);
//
// UserControl1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "UserControl1";
this.Size = new System.Drawing.Size(346, 229);
this.tableLayoutPanel1.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TextBox requestTextBox;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TreeView treeViewRequest;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.LinkLabel requestXMLEditor;
}
}
//*************************************************************************************************
// MessageEditor.cs
// Owner: Mahipal Kante
//
// UI of Editor for Web Service Request Body
// The Web Service response can be plain XML or 'application/soap+msbin1'
// (binary - used by Silverlight application with WCF RIA) or JSON
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using WebTest.WebService.Plugin.ResultTab;
using WebTest.WebService.Plugin.Runtime;
namespace WebTest.WebService.Plugin.MessageEditors
{
internal partial class MessageEditor : UserControl
{
/// <summary>
///
/// </summary>
/// <param name="contentHandler">Handler for given content type</param>
public MessageEditor(ContentHandler contentHandler)
{
InitializeComponent();
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.TabChanged);
this.xmlTreeView = new XmlTreeView(this.treeViewRequest);
this.contentHandler = contentHandler;
this.xmlTreeView.ShowXML(contentHandler.XmlDocument);
this.requestTextBox.Text = contentHandler.XmlString;
ContextMenu treeContextMenu = new ContextMenu();
this.treeParameterizeMenuItem = new MenuItem("Parameterize");
treeContextMenu.MenuItems.Add(treeParameterizeMenuItem);
this.treeViewRequest.ContextMenu = treeContextMenu;
this.treeParameterizeMenuItem.MenuItems.Clear();
this.treeParameterizeMenuItem.MenuItems.Add(new MenuItem("Type Parameter", AddParameter));
Connect connect = Connect.GetInstance();
if (connect != null)
{
this.webTestDetail = connect.GetActiveWebTest();
}
requestXMLEditor.Visible = (this.webTestDetail != null);
if (this.webTestDetail != null)
{
List<string> parameters = this.webTestDetail.GetParameterList();
foreach (string parameter in parameters)
{
this.treeParameterizeMenuItem.MenuItems.Add(new MenuItem(parameter, AddParameter));
}
}
}
/// <summary>
/// Makes sure both tabs are synced with the current changes that are done in Text Box
/// </summary>
public void UpdateContent()
{
if (this.tabControl1.SelectedTab.Equals(this.tabPage2))
{
this.contentHandler.XmlString = this.requestTextBox.Text;
}
}
private void AddParameter(object sender, EventArgs e)
{
MenuItem menuItem = sender as MenuItem;
if (menuItem == null)
{
return;
}
this.xmlTreeView.AddParameter(menuItem.Text);
}
private void TabChanged(object sender, EventArgs e)
{
if (this.tabControl1.SelectedTab.Equals(this.tabPage1))
{
this.contentHandler.XmlString = this.requestTextBox.Text;
xmlTreeView.ShowXML(this.contentHandler.XmlDocument);
}
else
{
this.requestTextBox.Text = this.contentHandler.XmlString;
}
}
private void requestXMLEditor_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Connect.GetInstance().ShowInXMLEditor("Request Content", this.requestTextBox.Text);
}
private ContentHandler contentHandler;
private WebTestDetail webTestDetail;
private XmlTreeView xmlTreeView;
private MenuItem treeParameterizeMenuItem;
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//*************************************************************************************************
// Msbin1MessageEditor.cs
// Owner: Mahipal Kante
//
// Web Test Plugin for editing 'application/soap+msbin1' content type Web Service Requests
// (used by Silverlight application with WCF RIA)
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using Microsoft.VisualStudio.TestTools.WebTesting;
using WebTest.WebService.Plugin.ResultTab;
using WebTest.WebService.Plugin.Runtime;
namespace WebTest.WebService.Plugin.MessageEditors
{
/// <summary>
/// Editor for MSBin1 content type (WCF messages)
/// </summary>
public class Msbin1MessageEditor : IBinaryHttpBodyEditorPlugin
{
/// <summary>
///
/// </summary>
public Msbin1MessageEditor()
{
}
/// <summary>
/// Determine if this plugin supports a content type.
/// </summary>
/// <param name="contentType">The content type to test.</param>
/// <returns>Returns true if the plugin supports the specified content type.</returns>
public bool SupportsContentType(string contentType)
{
return contentType.ToLower().Contains("msbin1");
}
/// <summary>
/// Create a UserControl to edit the specified bytes. This control will be hosted in the
/// plugin dialog which provides OK and Cancel buttons.
/// </summary>
/// <param name="contentType">The content type of the BinaryHttpBody.</param>
/// <param name="initialValue">
/// The bytes to edit. The bytes are the payload of a BinaryHttpBody.
/// </param>
/// <returns>
/// A UserControl capable of displaying and editing the byte array value of
/// the specified content type.
/// </returns>
public object CreateEditor(string contentType, byte[] initialValue)
{
contentHandler = new Msbin1ContentHandler(contentType.ToLower().Contains("soap"));
contentHandler.MessageBytes = initialValue;
messageEditor = new MessageEditor(contentHandler);
return messageEditor;
}
/// <summary>
/// Gets the edited bytes after the OK button is clicked on the plugin dialog.
/// </summary>
public byte[] GetNewValue()
{
messageEditor.UpdateContent();
return contentHandler.MessageBytes;
}
private MessageEditor messageEditor = null;
private Msbin1ContentHandler contentHandler = null;
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ClassLibrary1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft IT")]
[assembly: AssemblyProduct("ClassLibrary1")]
[assembly: AssemblyCopyright("Copyright © Microsoft IT 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("fe8ec1e0-7f8a-4935-b5f3-00f482453031")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{23707A49-589B-4A36-BDAA-2896E647D07D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebTest.WebService.Plugin.MessageEditors</RootNamespace>
<AssemblyName>WebTest.WebService.Plugin.MessageEditors</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Msbin1MessageEditor.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="MessageEditor.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="MessageEditor.Designer.cs">
<DependentUpon>MessageEditor.cs</DependentUpon>
</Compile>
<Compile Include="WebServicePostRecording.cs" />
<Compile Include="XmlMessageEditor.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MessageEditor.resx">
<DependentUpon>MessageEditor.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WebTestWebServiceResultAddin\WebServicePluginForWebTestResultTab.csproj">
<Project>{48B3509E-1FD8-4875-8FC6-137647EB83AA}</Project>
<Name>WebServicePluginForWebTestResultTab</Name>
</ProjectReference>
<ProjectReference Include="..\WebTestWebServiceRuntime\WebServicePluginForWebTestRuntime.csproj">
<Project>{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}</Project>
<Name>WebServicePluginForWebTestRuntime</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
//*************************************************************************************************
// WebServicePostRecording.cs
// Owner: Mahipal Kante
//
// WebTestRecorderPlugin Implementation:
// Web Test Plugin for adding references to the other Web Service plugins
// (Extraction/Validation rules etc) to the WebTest after completing recording.
// This gets executed if user selects the plugin in the dialog that gets displayed
// before a record session.
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using System.ComponentModel;
using Microsoft.VisualStudio.TestTools.WebTesting;
using System.Diagnostics.CodeAnalysis;
using WebTest.WebService.Plugin.ResultTab;
using WebTest.WebService.Plugin.Runtime;
namespace WebTest.WebService.Plugin.MessageEditors
{
[DisplayName("Plugin for Web Service Messages")]
[Description("XPath extraction/validation rules that extract data from Web Service responses for various content types")]
class WebServicePostRecording : WebTestRecorderPlugin
{
/// <summary>
/// Parameters:
/// sender:
/// The source of the event.
///
/// e:
/// A Microsoft.VisualStudio.TestTools.WebTesting.PostWebTestRecordingEventArgs
/// that contains the event data.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
public override void PostWebTestDynamicParameterDetection(object sender, PostWebTestRecordingEventArgs e)
{
Connect connect = Connect.GetInstance();
if (connect != null)
{
connect.AddWebTestRecording(e.RecordedWebTest);
}
bool pluginFound = false;
foreach (WebTestPluginReference pluginReference1 in e.RecordedWebTest.WebTestPluginReferences)
{
if (pluginReference1.Type.ToString().Equals(typeof(WebServicePlugin).ToString()))
{
pluginFound = true;
break;
}
}
if (!pluginFound)
{
WebTestPluginReference pluginReference = new WebTestPluginReference();
pluginReference.Type = typeof(WebServicePlugin);
e.RecordedWebTest.WebTestPluginReferences.Add(pluginReference);
}
// Mark it as modified
e.RecordedWebTestModified = true;
}
}
}
//*************************************************************************************************
// XmlMessageEditor.cs
// Owner: Mahipal Kante
//
// Web Test Plugin for editing XML string type Web Service Requests
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using Microsoft.VisualStudio.TestTools.WebTesting;
using WebTest.WebService.Plugin.ResultTab;
using WebTest.WebService.Plugin.Runtime;
namespace WebTest.WebService.Plugin.MessageEditors
{
/// <summary>
/// Editor for generic text based hierarchical messages such as XML, JSON etc
/// </summary>
public class XmlMessageEditor : IStringHttpBodyEditorPlugin
{
public XmlMessageEditor()
{
}
/// <summary>
/// Determine if this plugin supports a content type.
/// </summary>
/// <param name="contentType">The content type to test.</param>
/// <returns>Returns true if the plugin supports the specified content type.</returns>
public bool SupportsContentType(string contentType)
{
return (ContentHandlerFactory.GetHandler(contentType) != null);
}
/// <summary>
/// Create a UserControl to edit the specified bytes. This control will be hosted in the
/// plugin dialog which provides OK and Cancel buttons.
/// </summary>
/// <param name="contentType">The content type of the BinaryHttpBody.</param>
/// <param name="initialValue">
/// The bytes to edit. The bytes are the payload of a BinaryHttpBody.
/// </param>
/// <returns>A UserControl capable of displaying and editing the byte array
/// value of the specified content type.
/// </returns>
public object CreateEditor(string contentType, string initialValue)
{
contentHandler = ContentHandlerFactory.GetHandler(contentType);
contentHandler.MessageString = initialValue;
messageEditor = new MessageEditor(contentHandler);
return messageEditor;
}
/// <summary>
/// Gets the edited bytes after the OK button is clicked on the plugin dialog.
/// </summary>
public string GetNewValue()
{
messageEditor.UpdateContent();
return contentHandler.MessageString;
}
private MessageEditor messageEditor;
private ContentHandler contentHandler = null;
}
}
No preview for this file type
No preview for this file type
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebTest.WebService.Plugin.ResultTab.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WebTest.WebService.Plugin.ResultTab.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30424</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{48B3509E-1FD8-4875-8FC6-137647EB83AA}</ProjectGuid>
<OutputType>Library</OutputType>
<StartupObject>
</StartupObject>
<NoStandardLibraries>false</NoStandardLibraries>
<AssemblyName>WebTest.WebService.Plugin.ResultTab</AssemblyName>
<DeploymentDirectory>.\bin\</DeploymentDirectory>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<OutputPath>.\bin\Debug\</OutputPath>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<IncrementalBuild>false</IncrementalBuild>
<DocumentationFile>WebTest.WebService.Plugin.ResultTab.xml</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<Optimize>true</Optimize>
<OutputPath>.\bin\Release\</OutputPath>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<IncrementalBuild>false</IncrementalBuild>
<DocumentationFile>WebTest.WebService.Plugin.ResultTab.xml</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>WebTest.WebService.Plugin.ResultTab</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestFramework" />
<Reference Include="Microsoft.VisualStudio.QualityTools.LoadTestPackage">
<HintPath>C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.LoadTestPackage.dll</HintPath>
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.LoadTestPackage.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.QualityTools.WebTestFramework" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualStudio.Shell.11.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.11.0" />
<Reference Include="Microsoft.VisualStudio.OLE.Interop" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0" />
<Reference Include="VSLangProj, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="VSLangProj2, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="VSLangProj80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Connect.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="WebServiceResult.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="WebServiceResult.Designer.cs">
<DependentUpon>WebServiceResult.cs</DependentUpon>
</Compile>
<Compile Include="WebTestDetail.cs" />
<Compile Include="XmlTreeView.cs" />
</ItemGroup>
<ItemGroup>
<COMReference Include="EnvDTE">
<Guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</Guid>
<VersionMajor>8</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="EnvDTE100">
<Guid>{26AD1324-4B7C-44BC-84F8-B86AED45729F}</Guid>
<VersionMajor>10</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="EnvDTE80">
<Guid>{1A31287A-4D7D-413E-8E32-3B374931BD89}</Guid>
<VersionMajor>8</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="EnvDTE90">
<Guid>{2CE2370E-D744-4936-A090-3FFFE667B0E1}</Guid>
<VersionMajor>9</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.VisualStudio.CommandBars">
<Guid>{1CBA492E-7263-47BB-87FE-639000619B15}</Guid>
<VersionMajor>8</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="stdole">
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<Content Include="WebServicePluginForWebTestResultTab.AddIn">
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="WebServiceResult.resx">
<DependentUpon>WebServiceResult.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WebTestWebServiceRuntime\WebServicePluginForWebTestRuntime.csproj">
<Project>{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}</Project>
<Name>WebServicePluginForWebTestRuntime</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<ProjectExtensions />
<Target Name="AfterBuild">
<PropertyGroup>
<DllName>$(AssemblyName).dll</DllName>
<PdbName>$(AssemblyName).pdb</PdbName>
<DocFileName>$(AssemblyName).xml</DocFileName>
</PropertyGroup>
<Delete Condition="Exists('$(DeploymentDirectory)$(DllName)')" Files="$(DeploymentDirectory)$(DllName)">
</Delete>
<Delete Condition="Exists('$(DeploymentDirectory)$(PdbName)')" Files="$(DeploymentDirectory)$(PdbName)">
</Delete>
<Delete Condition="Exists('$(DeploymentDirectory)$(DocFileName)')" Files="$(DeploymentDirectory)$(DocFileName)">
</Delete>
<Copy Condition="Exists('$(OutputPath)$(DllName)')" SourceFiles="$(OutputPath)$(DllName)" DestinationFolder="$(DeploymentDirectory)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<Copy Condition="Exists('$(OutputPath)$(PdbName)')" SourceFiles="$(OutputPath)$(PdbName)" DestinationFolder="$(DeploymentDirectory)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
<Copy Condition="Exists('$(OutputPath)$(DocFileName)')" SourceFiles="$(OutputPath)$(DocFileName)" DestinationFolder="$(DeploymentDirectory)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//*************************************************************************************************
// WebTestDetail.cs
// Owner: Mahipal Kante
//
// Details of WebTest
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EnvDTE80;
using EnvDTE;
using Microsoft.VisualStudio.TestTools.WebTesting;
namespace WebTest.WebService.Plugin.ResultTab
{
/// <summary>
/// Details of a Declarative WebTest project Item
/// </summary>
public class WebTestDetail
{
/// <summary>
///
/// </summary>
/// <param name="fullPath"></param>
/// <param name="applicationObject"></param>
public WebTestDetail(string fullPath, DTE2 applicationObject)
{
this.FullPath = fullPath;
this._applicationObject = applicationObject;
}
/// <summary>
/// Web Test object
/// </summary>
public DeclarativeWebTest WebTest
{
get
{
if (webTest == null || (new FileInfo(FullPath).LastWriteTime > LastSavedTimeStamp))
{
webTest = DeclarativeWebTestSerializer.Open(FullPath);
LastSavedTimeStamp = new FileInfo(FullPath).LastWriteTime;
}
return webTest;
}
set
{
webTest = value;
LastSavedTimeStamp = new FileInfo(FullPath).LastWriteTime;
}
}
/// <summary>
/// Path to the WebTest file
/// </summary>
public string FullPath
{
get;
set;
}
/// <summary>
/// LastSavedTimeStamp
/// </summary>
public DateTime LastSavedTimeStamp
{
get;
set;
}
/// <summary>
/// ProjectItem of DTE
/// </summary>
public ProjectItem ProjectItem
{
get;
set;
}
/// <summary>
/// If there are pending changes, save first, as we are going to make our
/// changes to the file directly.
/// </summary>
public void PrepareToSave()
{
if (this.ProjectItem != null && this.ProjectItem.Document != null)
{
this.ProjectItem.Document.Close(vsSaveChanges.vsSaveChangesPrompt);
}
}
/// <summary>
/// Save WebTest to file
/// </summary>
public void Save()
{
DeclarativeWebTestSerializer.Save(this.WebTest, this.FullPath);
this.LastSavedTimeStamp = DateTime.Now;
if (this.ProjectItem != null)
{
Window window = this.ProjectItem.Open();
window.Activate();
}
}
/// <summary>
/// Parse parameters from all items of Web Test
/// </summary>
/// <returns></returns>
public List<string> GetParameterList()
{
List<string> list = new List<string>();
DeclarativeWebTest w = WebTest;
for (int i = 1; i <= w.Items.Count; i++)
{
WebTestRequest requestInWebTest = webTest.GetItem(i) as WebTestRequest;
if (requestInWebTest != null)
{
foreach (ExtractionRuleReference reference in requestInWebTest.ExtractionRuleReferences)
{
list.Add(reference.ContextParameterName);
}
}
}
return list;
}
private DTE2 _applicationObject;
private DeclarativeWebTest webTest = null;
}
}
//*************************************************************************************************
// XmlTreeView.cs
// Owner: Mahipal Kante
//
// Wrapper for TreeView that bings XML to TreeView
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
namespace WebTest.WebService.Plugin.ResultTab
{
/// <summary>
/// Wrapper for TreeView to enable XML content view
/// </summary>
public class XmlTreeView
{
private TreeView treeView;
private XmlDocument dom;
/// <summary>
/// Wrapper for TreeView to enable XML content view
/// </summary>
/// <param name="treeView">TreeView where XML content needs to be shown</param>
public XmlTreeView(TreeView treeView)
{
this.treeView = treeView;
treeView.BeforeExpand += new TreeViewCancelEventHandler(TreeExpanded);
treeView.AfterLabelEdit += new NodeLabelEditEventHandler(treeViewRequest_AfterLabelEdit);
}
/// <summary>
/// Show XML in tree
/// </summary>
/// <param name="xmlString"></param>
/// <returns></returns>
public XmlDocument ShowXML(string xmlString)
{
try
{
// Load the XML file.
this.dom = new XmlDocument();
dom.LoadXml(xmlString);
ShowXML(dom);
return dom;
}
catch (Exception)
{
//MessageBox.Show(ex.Message, "Error");
}
return null;
}
/// <summary>
/// Show XML in tree
/// </summary>
/// <param name="reader"></param>
/// <returns></returns>
public XmlDocument ShowXML(XmlReader reader)
{
try
{
// Load the XML file.
this.dom = new XmlDocument();
dom.Load(reader);
ShowXML(dom);
return dom;
}
catch (Exception)
{
//MessageBox.Show(ex.Message, "Error");
}
return null;
}
/// <summary>
/// Show XML in tree
/// </summary>
/// <param name="dom"></param>
public void ShowXML(XmlDocument dom)
{
try
{
this.dom = dom;
XmlNode xNode = dom.DocumentElement;
// Load the XML into the TreeView.
treeView.Nodes.Clear();
TreeNode treeNode = new TreeNode(xNode.Name);
treeNode.Tag = xNode;
if (xNode.HasChildNodes)
{
treeNode.Nodes.Add(new TreeNode("dummy"));
}
else
{
treeNode.Text = xNode.InnerXml.Trim();
}
treeView.Nodes.Add(treeNode);
treeNode.Collapse();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error");
}
}
/// <summary>
/// Indicates whether message has been edited since last update
/// </summary>
public bool MessageEdited
{
get;
set;
}
/// <summary>
/// replaces currently selected XML node's contents with given parameter name
/// </summary>
/// <param name="parameterName">name of the parameter</param>
public void AddParameter(string parameterName)
{
TreeNode treeNode = this.treeView.SelectedNode;
TreeNode parentTreeNode = treeNode.Parent;
if (treeNode != null && parentTreeNode != null)
{
if (parameterName.Equals("Type Parameter"))
{
if (!treeNode.IsEditing)
{
treeNode.BeginEdit();
}
return;
}
ParameterizeNode(treeNode, "{{" + parameterName + "}}");
}
}
private void treeViewRequest_AfterLabelEdit(object sender, System.Windows.Forms.NodeLabelEditEventArgs e)
{
if (e.Label != null)
{
if (e.Label.Length > 0)
{
//Stop editing without canceling the label change.
e.Node.EndEdit(false);
ParameterizeNode(e.Node, e.Label);
}
else
{
// Cancel the label edit action, inform the user, and
// place the node in edit mode again
e.CancelEdit = true;
MessageBox.Show("Invalid input.\nThe label cannot be blank",
"Node Label Edit");
e.Node.BeginEdit();
}
}
}
private void TreeExpanded(object sender, TreeViewCancelEventArgs e)
{
if (e.Node.Nodes.Count == 1 && e.Node.Nodes[0].Text.Equals("dummy"))
{
e.Node.Nodes.Clear();
XmlNode parentNode = e.Node.Tag as XmlNode;
XmlNodeList nodeList = parentNode.ChildNodes;
for (int i = 0; i <= nodeList.Count - 1; i++)
{
XmlNode xNode = parentNode.ChildNodes[i];
TreeNode treeNode = new TreeNode();
treeNode.Tag = xNode;
if (xNode.NodeType.Equals(XmlNodeType.Element))
{
treeNode.Text = xNode.Name;
if (xNode.HasChildNodes)
{
treeNode.Nodes.Add(new TreeNode("dummy"));
}
else
{
treeNode.Nodes.Add(new TreeNode(xNode.Value));
}
}
else
{
treeNode.Text = xNode.Value;
}
e.Node.Nodes.Add(treeNode);
treeNode.Collapse();
}
}
}
private void ParameterizeNode(TreeNode treeNode, string parameter)
{
TreeNode parentTreeNode = treeNode.Parent;
XmlNode xNode = treeNode.Tag as XmlNode;
if (xNode != null)
{
XmlNode parentXNode = parentTreeNode.Tag as XmlNode;
treeNode.Text = parameter;
if (xNode is XmlText)
{
xNode.Value = parameter;
}
else
{
XmlText textNode = dom.CreateTextNode(parameter);
parentXNode.ReplaceChild(textNode, xNode);
treeNode.Tag = textNode;
treeNode.Nodes.Clear();
}
this.MessageEdited = true;
}
}
}
}
//*************************************************************************************************
// ContentHandler.cs
// Owner: Mahipal Kante
//
// Base class for handling a content type
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.IO;
using System.Xml.XPath;
namespace WebTest.WebService.Plugin.Runtime
{
/// <summary>
/// Base class for handling a content type
/// </summary>
public class ContentHandler
{
private string xmlString = string.Empty;
private XmlDocument xmlDocument = null;
/// <summary>
/// Is it a binary format?
/// </summary>
public virtual bool IsBinary
{
get
{
return false;
}
}
/// <summary>
/// Raw binary content
/// </summary>
public virtual Byte[] MessageBytes
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
/// <summary>
/// Raw string content
/// </summary>
public virtual string MessageString
{
get
{
return XmlToString(this.XmlDocument);
}
set
{
this.xmlString = value;
this.xmlDocument = null;
}
}
/// <summary>
/// message converted to XML
/// </summary>
public string XmlString
{
get
{
return XmlToIndentedString(this.XmlDocument);
}
set
{
this.xmlString = value;
this.xmlDocument = null;
}
}
/// <summary>
/// XML Document of the message
/// </summary>
public XmlDocument XmlDocument
{
get
{
if (this.xmlDocument == null)
{
if (string.IsNullOrEmpty(this.xmlString))
{
this.LoadDocument();
}
else
{
try
{
this.xmlDocument = new XmlDocument();
this.xmlDocument.LoadXml(this.xmlString);
}
catch (Exception)
{
// Try setting it as a native format message
this.MessageString = this.xmlString;
this.LoadDocument();
}
}
}
return xmlDocument;
}
set
{
this.xmlDocument = value;
}
}
/// <summary>
/// XPath document of XML
/// </summary>
public virtual XPathDocument XPathDocument
{
get
{
return new XPathDocument(new StringReader(this.xmlString));
}
}
/// <summary>
/// Evaluates XPath
/// </summary>
/// <param name="xPath">xPath expression</param>
/// <returns></returns>
public XPathNodeIterator EvaluateXPath(string xPath)
{
XPathDocument x = this.XPathDocument;
XPathNavigator nav = x.CreateNavigator();
XmlNamespaceManager context = new XmlNamespaceManager(nav.NameTable);
while (nav.MoveToFollowing(XPathNodeType.Element))
{
IDictionary<string, string> whatever = nav.GetNamespacesInScope(XmlNamespaceScope.All);
foreach (KeyValuePair<string, string> key in whatever)
{
context.AddNamespace(key.Key, key.Value);
}
}
// Compile a standard XPath expression
XPathExpression expr;
expr = nav.Compile(xPath);
expr.SetContext(context);
return nav.Select(expr);
}
/// <summary>
/// Override to perform custom load
/// </summary>
protected virtual void LoadDocument()
{
}
/// <summary>
/// Converts XmlDocument to String
/// </summary>
/// <param name="dom"></param>
/// <returns></returns>
public static string XmlToString(XmlDocument dom)
{
string message = string.Empty;
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
using (var stream = new MemoryStream())
{
using (XmlTextWriter writer = new XmlTextWriter(stream, encoding))
{
dom.WriteTo(writer);
}
message = encoding.GetString(stream.ToArray());
}
return message;
}
/// <summary>
/// Converts XmlDocument to String
/// </summary>
/// <param name="dom"></param>
/// <returns></returns>
public static string XmlToIndentedString(XmlDocument dom)
{
string message = string.Empty;
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
using (var stream = new MemoryStream())
{
using (XmlTextWriter writer = new XmlTextWriter(stream, encoding))
{
writer.Formatting = Formatting.Indented;
dom.WriteTo(writer);
}
message = encoding.GetString(stream.ToArray());
}
return message;
}
/// <summary>
/// Parses XML in string form and returns XmlDocument
/// </summary>
/// <param name="xmlString"></param>
/// <returns></returns>
public static XmlDocument StringToXml(string xmlString)
{
XmlDocument dom = new XmlDocument();
dom.LoadXml(xmlString);
return dom;
}
}
}
//*************************************************************************************************
// ContentHandlerFactory.cs
// Owner: Mahipal Kante
//
// Creates appropriate handler for a given content type
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebTest.WebService.Plugin.Runtime
{
/// <summary>
/// Creates appropriate handler for a given content type
/// </summary>
public class ContentHandlerFactory
{
/// <summary>
/// Creates appropriate handler for a given content type
/// </summary>
/// <param name="contentType">content type</param>
/// <returns></returns>
public static ContentHandler GetHandler(string contentType)
{
if (contentType.ToLower().Contains("msbin1"))
{
return new Msbin1ContentHandler(contentType.ToLower().Contains("soap"));
}
else if (contentType.ToLower().Contains("json"))
{
return new JsonContentHandler();
}
else if (contentType.ToLower().Contains("xml"))
{
return new ContentHandler();
}
else
{
return null;
}
}
}
}
//*************************************************************************************************
// JsonContentHandler.cs
// Owner: Mahipal Kante
//
// Encode/decode JSON format for Web Service response. converts JSON into XML back and forth
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Runtime.Serialization.Json;
using System.IO;
using System.Xml.XPath;
namespace WebTest.WebService.Plugin.Runtime
{
public class JsonContentHandler : ContentHandler
{
public override string MessageString
{
get
{
string message = string.Empty;
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
using (var stream = new MemoryStream())
{
using (XmlDictionaryWriter writer = JsonReaderWriterFactory.CreateJsonWriter(stream, encoding))
{
this.XmlDocument.WriteTo(writer);
}
message = encoding.GetString(stream.ToArray());
}
return message;
}
set
{
this.jsonMessage = value;
this.XmlString = string.Empty;
}
}
public override XPathDocument XPathDocument
{
get
{
return new XPathDocument(GetReader());
}
}
protected override void LoadDocument()
{
try
{
this.XmlDocument = new XmlDocument();
this.XmlDocument.Load(GetReader());
}
catch (Exception)
{
// try setting it as an XML
this.XmlString = jsonMessage;
}
}
private XmlDictionaryReader GetReader()
{
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
XmlDictionaryReader jsonReader =
System.Runtime.Serialization.Json.JsonReaderWriterFactory.CreateJsonReader(
encoding.GetBytes(this.jsonMessage),
XmlDictionaryReaderQuotas.Max);
return jsonReader;
}
private string jsonMessage = string.Empty;
}
}
//*************************************************************************************************
// Msbin1ContentHandler.cs
// Owner: Mahipal Kante
//
// Encode/decode MSBin1 binary format for Web Service response
// When the Web Service response is 'application/soap+msbin1 or application/msbin1'
// (binary - used by Silverlight application with WCF RIA)
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.ServiceModel.Channels;
using System.IO;
namespace WebTest.WebService.Plugin.Runtime
{
public class Msbin1ContentHandler : ContentHandler
{
private static readonly BufferManager _bufferManager = BufferManager.CreateBufferManager(int.MaxValue, int.MaxValue);
public Msbin1ContentHandler(bool isSoapMessage)
{
soapMessage = isSoapMessage;
}
public override Byte[] MessageBytes
{
get
{
MemoryStream memStream = new MemoryStream();
if (soapMessage)
{
// Encrypt result back into binary data
XmlWriter meWrite = XmlWriter.Create(memStream);
meWrite.WriteRaw(this.MessageString);
meWrite.Flush();
memStream.Position = 0;
XmlReader meRead = XmlReader.Create(memStream);
Message newMessage = Message.CreateMessage(meRead, int.MaxValue, originalMessage.Version);
var bindingElement = new BinaryMessageEncodingBindingElement();
var factory = bindingElement.CreateMessageEncoderFactory();
using (MemoryStream memoryStream = new MemoryStream())
{
factory.Encoder.WriteMessage(newMessage, memoryStream);
return memoryStream.ToArray();
}
}
else
{
XmlDictionaryWriter meWrite = XmlDictionaryWriter.CreateBinaryWriter(memStream);
XmlDocument document = StringToXml(this.MessageString);
document.Save(meWrite);
return memStream.ToArray();
}
}
set
{
this.messageBytes = value;
// Decrypt body bytes to string
if (soapMessage)
{
var bindingElement = new BinaryMessageEncodingBindingElement();
var factory = bindingElement.CreateMessageEncoderFactory();
originalMessage = factory.Encoder.ReadMessage(new ArraySegment<byte>(messageBytes), _bufferManager);
this.MessageString = originalMessage.ToString();
}
else
{
XmlDictionaryReader reader = XmlDictionaryReader.CreateBinaryReader(messageBytes, XmlDictionaryReaderQuotas.Max);
XmlDocument document = new XmlDocument();
document.Load(reader);
this.MessageString = XmlToString(document);
}
}
}
public override bool IsBinary
{
get
{
return true;
}
}
private byte[] messageBytes = null;
private Message originalMessage = null;
private bool soapMessage = false;
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("WebTestSilverLightPlugin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft IT")]
[assembly: AssemblyProduct("WebTestSilverLightPlugin")]
[assembly: AssemblyCopyright("Copyright © Microsoft IT 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("88c51893-3ea0-4a7b-8942-cf06ba21bf79")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//*************************************************************************************************
// WebServicePlugin.cs
// Owner: Mahipal Kante
//
// This Web Test plugin performs Data Binding on binary format for Web Service response
// When the Web Service response is 'application/soap+msbin1'
// (binary - used by Silverlight application with WCF RIA)
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using Microsoft.VisualStudio.TestTools.WebTesting;
using System.Diagnostics.CodeAnalysis;
namespace WebTest.WebService.Plugin.Runtime
{
public class WebServicePlugin : WebTestPlugin
{
/// Summary:
/// When overridden in a derived class, represents the method that will handle
/// the event associated with the completion of a Web page.
///
/// Parameters:
/// sender:
/// The source of the event.
///
/// e:
/// A PostPageEventArgs that contains the event data.
///
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
public override void PostPage(object sender, PostPageEventArgs e)
{
}
//
// Summary:
// When overridden in a derived class, represents the method that will handle
// the event associated with the completion of an HTTP request.
//
// Parameters:
// sender:
// The source of the event.
//
// e:
// A PostRequestEventArgs that contains the event data.
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
public override void PostRequest(object sender, PostRequestEventArgs e)
{
}
//
// Summary:
// When overridden in a derived class, represents the method that will handle
// the event associated with the completion of a transaction that is defined
// in the Web test.
//
// Parameters:
// sender:
// The source of the event.
//
// e:
// A PostTransactionEventArgs that contains the event data.
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
public override void PostTransaction(object sender, PostTransactionEventArgs e)
{
}
//
// Summary:
// When overridden in a derived class, represents the method that will handle
// the event associated with the end of a Web test.
//
// Parameters:
// sender:
// The source of the event.
//
// e:
// A Microsoft.VisualStudio.TestTools.WebTesting.PostWebTestEventArgs that contains
// the event data.
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
public override void PostWebTest(object sender, PostWebTestEventArgs e)
{
}
//
// Summary:
// When overridden in a derived class, represents the method that will handle
// the event associated with the start of a Web page.
//
// Parameters:
// sender:
// The source of the event.
//
// e:
// A PrePageEventArgs that contains the event data.
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
public override void PrePage(object sender, PrePageEventArgs e)
{
}
//
// Summary:
// When overridden in a derived class, represents the method that will handle
// the event associated with the start of an HTTP request.
//
// Parameters:
// sender:
// The source of the event.
//
// e:
// A PreRequestEventArgs that contains the event data.
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
public override void PreRequest(object sender, PreRequestEventArgs e)
{
}
/// <summary>
/// This method performs Data Binding on MSBin1 binray format for Web Service response
/// When the Web Service response is 'application/soap+msbin1'
// (binary - used by Silverlight application with WCF RIA)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
public override void PreRequestDataBinding(object sender, PreRequestDataBindingEventArgs e)
{
BinaryHttpBody binaryHttpBody = e.Request.Body as BinaryHttpBody;
if (binaryHttpBody == null || string.IsNullOrEmpty(binaryHttpBody.ContentType))
{
return;
}
if (!binaryHttpBody.ContentType.Contains("msbin1"))
{
return;
}
ContentHandler contentHandler = ContentHandlerFactory.GetHandler(binaryHttpBody.ContentType);
if (contentHandler != null)
{
contentHandler.MessageBytes = binaryHttpBody.Data;
string text = contentHandler.MessageString;
// do Data Binding on the string version of binary data
string newText = DataBindingHelper.UpdateBindingSites(e.WebTest.Context, text);
contentHandler.MessageString = newText;
// set the new binary data into http body
binaryHttpBody.Data = contentHandler.MessageBytes;
}
}
//
// Summary:
// When overridden in a derived class, represents the method that will handle
// the event associated with the start of a transaction that is defined in the
// Web test.
//
// Parameters:
// sender:
// The source of the event.
//
// e:
// A PreTransactionEventArgs that contains the event data.
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
public override void PreTransaction(object sender, PreTransactionEventArgs e)
{
}
//
// Summary:
// When overridden in a derived class, represents the method that will handle
// the event associated with the start of a Web test.
//
// Parameters:
// sender:
// The source of the event.
//
// e:
// A Microsoft.VisualStudio.TestTools.WebTesting.PostWebTestEventArgs that contains
// the event data.
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F9E36CFA-A657-4DD4-BD17-BA3D91EB469F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebTest.WebService.Plugin.Runtime</RootNamespace>
<AssemblyName>WebTest.WebService.Plugin.Runtime</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="JsonContentHandler.cs" />
<Compile Include="ContentHandler.cs" />
<Compile Include="ContentHandlerFactory.cs" />
<Compile Include="DataBindingHelper.cs" />
<Compile Include="Msbin1ContentHandler.cs" />
<Compile Include="WebServicePlugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="XPathExtractionRule.cs" />
<Compile Include="XPathValidationRule.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
//*************************************************************************************************
// XPathExtractionRule.cs
// Owner: Mahipal Kante
//
// This web test plugin extracts data from a Web Service response using XPath expression.
// The Web Service response can be plain XML or 'application/soap+msbin1'
// (binary - used by Silverlight application with WCF RIA) or JSON
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Microsoft.VisualStudio.TestTools.WebTesting;
using System.Xml.XPath;
using System.Xml;
using System.IO;
namespace WebTest.WebService.Plugin.Runtime
{
[DisplayName("XPathExtractionRule")]
[Description("Extracts a value using XPath expression")]
public class XPathExtractionRule : ExtractionRule
{
// The name of the desired input field
private string xPathValue;
[DisplayName("XPathToSearch")]
[Description("Extracts a value using XPath expression")]
public string XPathToSearch
{
get { return xPathValue; }
set { xPathValue = value; }
}
// To set a default value use:[DefaultValue(<value>)]
private int indexValue;
[Description("Indicates which occurrence of the string to extract. This is zero-based index.")]
public int Index
{
get { return indexValue; }
set { indexValue = value; }
}
private bool randomMatch;
[DisplayName("ExtractRandomMatch")]
[Description("If true, all matches are found and one of the matches is randomly returned.")]
public bool ExtractRandomMatch
{
get { return randomMatch; }
set { randomMatch = value; }
}
/// <summary>
/// The Extract method. The parameter e contains the Web test context.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public override void Extract(object sender, ExtractionEventArgs e)
{
try
{
ContentHandler contentHandler = ContentHandlerFactory.GetHandler(e.Response.ContentType);
if (contentHandler == null)
{
return;
}
if (contentHandler.IsBinary)
{
contentHandler.MessageBytes = e.Response.BodyBytes;
}
else
{
contentHandler.MessageString = e.Response.BodyString;
}
XPathNodeIterator iterator = contentHandler.EvaluateXPath(XPathToSearch);
List<string> values = new List<string>();
int i = 0;
while (iterator.MoveNext())
{
XPathNavigator nav2 = iterator.Current.Clone();
string value;
if (nav2.NodeType.Equals(XPathNodeType.Element))
{
value = nav2.InnerXml;
}
else
{
value = nav2.Value;
}
values.Add(value);
if (!ExtractRandomMatch && (i == Index))
{
// add the extracted value to the Web test context
e.WebTest.Context.Add(this.ContextParameterName, value);
e.Success = true;
return;
}
i++;
}
if (ExtractRandomMatch && (values.Count > 0))
{
Random random = new Random();
e.WebTest.Context.Add(this.ContextParameterName, values[random.Next(values.Count)]);
e.Success = true;
return;
}
}
catch (Exception ex)
{
e.Message = ex.Message;
}
e.Success = false;
return;
}
}
}
//*************************************************************************************************
// XPathValidationRule.cs
// Owner: Mahipal Kante
//
// This web test plugin validates a Web Service response using XPath expression.
// The Web Service response can be plain XML or 'application/soap+msbin1'
// (binary - used by Silverlight application with WCF RIA) or JSON
//
// Copyright(c) Microsoft Corporation, 2010
//*************************************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Microsoft.VisualStudio.TestTools.WebTesting;
using System.Xml.XPath;
using System.IO;
using System.Xml;
namespace WebTest.WebService.Plugin.Runtime
{
[DisplayName("XPathValidationRule")]
[Description("Validates response using XPath expression")]
public class XPathValidationRule : ValidationRule
{
// The name of the desired input field
private string xPathValue;
[DisplayName("XPathToSearch")]
[Description("XPath expression to evaluate")]
public string XPathToSearch
{
get { return xPathValue; }
set { xPathValue = value; }
}
private int indexValue = -1;
[Description("Indicates which occurrence of the XPath result to validate. This is a zero based index. -1 indicates try and match against all of them.")]
public int Index
{
get { return indexValue; }
set { indexValue = value; }
}
private string expectedValue = string.Empty;
[DisplayName("ExpectedValue")]
[Description("The Expected result of XPath evaluation")]
public string ExpectedValue
{
get { return expectedValue; }
set { expectedValue = value; }
}
private bool ignoreCase = true;
[DisplayName("IgnoreCase")]
[Description("Ignores case when comparing the result of XPath with the expected value")]
public bool IgnoreCase
{
get { return ignoreCase; }
set { ignoreCase = value; }
}
/// <summary>
/// The Validation method. The parameter e contains the Web test context.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public override void Validate(object sender, ValidationEventArgs e)
{
try
{
ContentHandler contentHandler = ContentHandlerFactory.GetHandler(e.Response.ContentType);
if (contentHandler == null)
{
return;
}
if (contentHandler.IsBinary)
{
contentHandler.MessageBytes = e.Response.BodyBytes;
}
else
{
contentHandler.MessageString = e.Response.BodyString;
}
XPathNodeIterator iterator = contentHandler.EvaluateXPath(XPathToSearch);
int i = 0;
while (iterator.MoveNext())
{
XPathNavigator nav2 = iterator.Current.Clone();
if ((i == -1) || (i == Index))
{
string value;
if (nav2.NodeType.Equals(XPathNodeType.Element))
{
value = nav2.InnerXml;
}
else
{
value = nav2.Value;
}
if (ignoreCase)
{
e.IsValid = ExpectedValue.Equals(value, StringComparison.OrdinalIgnoreCase);
}
else
{
e.IsValid = ExpectedValue.Equals(value, StringComparison.Ordinal);
}
if (i == Index || e.IsValid)
{
return;
}
}
i++;
}
}
catch (Exception ex)
{
e.Message = ex.Message;
}
e.IsValid = false;
return;
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<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}">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<Media Id="1" Cabinet="WebServicePlugins1.cab" EmbedCab="yes" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<Feature Id="ProductFeature" Title="Web Test Plugin for Web Service Messages" Level="1">
<ComponentRef Id="WebTestMessageEditor" />
<ComponentRef Id="WebTestResultTab" />
<ComponentRef Id="WebTestRuntime" />
</Feature>
<Property Id="VS2012INSTALLFOLDER" Secure="yes">
<RegistrySearch Id="VS2012InstallationFolderRegistrySearchId" Type="raw"
Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\11.0" Name="InstallDir"></RegistrySearch>
</Property>
<Condition Message="Visual Studio 2012 not found.">
Installed OR VS2012INSTALLFOLDER
</Condition>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="VS2012INSTALLFOLDER">
<Directory Id="PrivateAssemblies" Name="PrivateAssemblies">
<Directory Id="WebTestPlugins" Name="WebTestPlugins">
<Component Id="WebTestMessageEditor" Guid="{17E95CD2-6B83-46C9-AEE5-019853FF62EC}">
<File Source="$(var.WebServicePluginForWebTestMessageEditor.TargetPath)" Vital="yes" DiskId="1"/>
</Component>
</Directory>
</Directory>
<Directory Id="PublicAssemblies" Name="PublicAssemblies">
<Component Id="WebTestRuntime" Guid="{854C9BA4-3E3E-4D0A-9DB1-DFF8140E834C}">
<File Source="$(var.WebServicePluginForWebTestRuntime.TargetPath)" Vital="yes" DiskId="1"/>
</Component>
</Directory>
</Directory>
<Directory Id="AppDataFolder">
<Directory Id="MSAppDataDir" Name="Microsoft">
<Directory Id="VSAppDataDir" Name="VisualStudio">
<Directory Id="VSAppDataVersionDir" Name="11.0">
<Directory Id="VSAddins" Name="Addins">
<Component Id="WebTestResultTab" Guid="{27569640-6946-4E4F-8E55-109E99A79DB9}">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Microsoft\WebServicePlugin" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="$(var.WebServicePluginForWebTestResultTab.TargetPath)" Vital="yes" DiskId="1"/>
<File Source="$(var.WebServicePluginForWebTestResultTab.ProjectDir)WebServicePluginForWebTestResultTab.Addin" Vital="yes" DiskId="1"/>
<RemoveFolder Id="RemoveMSAppDataDir" Directory="MSAppDataDir" On="uninstall"/>
<RemoveFolder Id="RemoveVSAppDataDir" Directory="VSAppDataDir" On="uninstall"/>
<RemoveFolder Id="RemoveVSAppDataVersionDir" Directory="VSAppDataVersionDir" On="uninstall"/>
<RemoveFolder Id="RemoveVSAddins" Directory="VSAddins" On="uninstall"/>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Fragment>
</Wix>
\ No newline at end of file
Install Wix Toolset to load installer project
http://wix.codeplex.com/
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.6</ProductVersion>
<ProjectGuid>73accda5-47c1-40c9-b63e-aff657e046e4</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Setup</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<Name>WebServicePluginsSetup</Name>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WebTestWebServiceMessageEditor\WebServicePluginForWebTestMessageEditor.csproj">
<Name>WebServicePluginForWebTestMessageEditor</Name>
<Project>{23707a49-589b-4a36-bdaa-2896e647d07d}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
<ProjectReference Include="..\WebTestWebServiceResultAddin\WebServicePluginForWebTestResultTab.csproj">
<Name>WebServicePluginForWebTestResultTab</Name>
<Project>{48b3509e-1fd8-4875-8fc6-137647eb83aa}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
<ProjectReference Include="..\WebTestWebServiceRuntime\WebServicePluginForWebTestRuntime.csproj">
<Name>WebServicePluginForWebTestRuntime</Name>
<Project>{f9e36cfa-a657-4dd4-bd17-ba3d91eb469f}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file