User    Pass    























Quick Start



Using LiquidTest with MSBuild

MSBuild is the build system for Visual Studio. All Visual Studio solution and project files are MSBuild compatible XML files. You can use MSBuild to build and execute LiquidTest projects by either directly referencing a LiquidTest project file (.csproj file), or you can write a custom MSBuild script yourself. This document is about creating a custom build script, very similar to our NAnt example

Setting up NUnit

In addition to MSBuild you will need NUnit. Just ensure the NUnit console test runner nunit-console-x86.exe is in your PATH system environment variable

Directory Structure

  • /lib/ contains LiquidTest and other 3rd party assemblies, as well as the liquidtest.properties file
  • /src/ contains the unit tests
  • /bin/ is where the output is placed as well as NUnit Test Results.

liquidtest.properties file

You should place store your license details in this file, as well as any other configuration options. For full information on options available, visit the liquidtest.properties documentation

MSBuild sample script

The discussion of MSBuild tasks and other elements is beyond the scope of this document, but the full documentation for MSBuild is available on-line

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
        <FilesToDelete Include="$(BuildDirectory)\*.*" />
        <FilesToCopy Include="$(LibDirectory)\*.dll" />
        <FilesToCopy Include="$(LibDirectory)\*.xml" />
        <FilesToCopy Include="$(LibDirectory)\*.properties" />
        <LibPaths Include="$(LibDirectory)" />
    <Target Name="clean">
        <Delete Files="@(FilesToDelete)" />
        <RemoveDir Directories="$(BuildDirectory)" />
        <MakeDir Directories="$(BuildDirectory)" />
        <Copy SourceFiles="@(FilesToCopy)" DestinationFolder="$(BuildDirectory)" />
        <Sources Include="$(SourceDirectory)\**\*.cs" />
        <References Include="System.dll" />
        <References Include="NUnit.Core.dll" />
        <References Include="NUnit.Framework.dll" />
        <References Include="LiquidTest.Net.dll" />
        <References Include="LiquidTestNUnitAddin.dll" />
    <Target Name="build-tests" DependsOnTargets="clean">
        <Csc TargetType="library" OutputAssembly="$(BuildDirectory)\$(OutputAssembly)" Sources="@(Sources)" References="@(References)" AdditionalLibPaths="@(LibPaths)"/>
    <Target Name="test" DependsOnTargets="build-tests">
        <Exec Command="nunit-console-x86.exe $(OutputAssembly) /xml=$(OutputReport)" ContinueOnError="true" WorkingDirectory="$(BuildDirectory)" />


To invoke an execution of your LiquidTest tests, execute the following command

msbuild liquidtest.msbuild /t:test

where “liquidtest.msbuild” referes to the name of your MSBuild xml file, /t:test invokes the MSBuild target named “test”

If you get an error about msbuild not being recognised as a command, simply execute the Visual Studio vcvars.bat file:

call "c:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
  • Bookmark "Liquidtest and msbuild" at del.icio.us
  • Bookmark "Liquidtest and msbuild" at Digg
  • Bookmark "Liquidtest and msbuild" at Furl
  • Bookmark "Liquidtest and msbuild" at Reddit
  • Bookmark "Liquidtest and msbuild" at Google
  • Bookmark "Liquidtest and msbuild" at StumbleUpon
  • Bookmark "Liquidtest and msbuild" at Newsvine
  • Bookmark "Liquidtest and msbuild" at DZone

   News / Events


 > LiquidTest EOL Announcement - Info
 > LiquidTest Release 3.0! - Available
 > Visual Studio Plugin Released! - Release
 > Cruise Control .NET Integration - Info
 > Automate your Dev/Test Process - Webinar
 > Is manual testing crippling your project? - Blog
 > Testing complex Ajax content - Blog
   Recently Added Content  
 > Run LiquidTest's on Selenium RC/Server - Info
 > Setting up LiquidTest with Maven - Blog
 > Officially Supported Ajax Frameworks - Info
 > Atlassian Bamboo Integration - Tech
 > Setting up LiquidTest with SVN and Hudson - Blog
 > Creating Data-Driven Functional Tests - Blog
 > Reducing Test Maintenance - Blog

 © JadeLiquid, LiquidTest and WebRenderer are trademarks of JadeLiquid, all rights reserved.  Privacy Policy  |  Disclaimer


Dev Guide









Contact Us