Click here to Skip to main content
15,891,902 members
Articles / Web Development / ASP.NET

Using Workflow Foundation and Visual Studio 2008 for Testing Automation

Rate me:
Please Sign up or sign in to vote.
4.90/5 (26 votes)
6 May 2008CPOL10 min read 88.5K   844   80  
How to employ Windows Workflow Foundation for testing processes. Let's design tests on a visual diagram and automate its execution!
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{203E288E-A506-46B2-8CF8-532E26B7B4C4}</ProjectGuid>
    <OutputType>Library</OutputType>
    <RootNamespace>TestflowFramework</RootNamespace>
    <AssemblyName>TestflowFramework</AssemblyName>
    <ProjectTypeGuids>{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <WarningLevel>4</WarningLevel>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>.\bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <UseVSHostingProcess>false</UseVSHostingProcess>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <DebugSymbols>false</DebugSymbols>
    <Optimize>true</Optimize>
    <OutputPath>.\bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <UseVSHostingProcess>false</UseVSHostingProcess>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Workflow.Activities">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Workflow.ComponentModel">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Workflow.Runtime">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Design" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Drawing.Design" />
    <Reference Include="System.Transactions" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Web" />
    <Reference Include="System.Web.Services" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.WorkflowServices">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.ServiceModel">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Activities\ClickButtonActivity.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="Activities\ClickButtonActivity.Designer.cs">
      <DependentUpon>ClickButtonActivity.cs</DependentUpon>
    </Compile>
    <Compile Include="Activities\CloseFormActivity.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="Activities\CloseFormActivity.Designer.cs">
      <DependentUpon>CloseFormActivity.cs</DependentUpon>
    </Compile>
    <Compile Include="Activities\ReadProperty.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="Activities\ReadProperty.Designer.cs">
      <DependentUpon>ReadProperty.cs</DependentUpon>
    </Compile>
    <Compile Include="Design\ClickButtonActivityDesigner.cs" />
    <Compile Include="Design\CloseFormActivityDesigner.cs" />
    <Compile Include="Design\ReadPropertyDesigner.cs" />
    <Compile Include="Design\WindowsControlActivityDesigner.cs" />
    <Compile Include="Design\InputTextActivityDesigner.cs" />
    <Compile Include="Activities\FormScope.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="Activities\FormScope.Designer.cs">
      <DependentUpon>FormScope.cs</DependentUpon>
    </Compile>
    <Compile Include="Design\FormScopeDesigner.cs" />
    <Compile Include="Activities\InputTextActivity.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="Activities\InputTextActivity.Designer.cs">
      <DependentUpon>InputTextActivity.cs</DependentUpon>
    </Compile>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.cs</LastGenOutput>
    </None>
    <Compile Include="Properties\Settings.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
    </Compile>
    <Compile Include="TestflowHost.cs" />
    <Compile Include="TestflowLogger.cs" />
    <Compile Include="WindowsApplicationService.cs" />
    <Compile Include="Activities\WindowsControlActivity.cs">
      <SubType>Component</SubType>
    </Compile>
    <AppDesigner Include="Properties\" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Activities\Resources\ClickButton.png" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Activities\Resources\CloseForm.png" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Activities\Resources\InputText.png" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets" />
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions