<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>the tar pit &#187; soapui</title>
	<atom:link href="http://blog.goneopen.com/tag/soapui/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.goneopen.com</link>
	<description>Thrashing around in the stickiness of software</description>
	<lastBuildDate>Mon, 09 Jan 2012 23:35:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>MsBuild execution of SoapUI testrunner</title>
		<link>http://blog.goneopen.com/2010/01/msbuild-execution-of-soapui-testrunner/</link>
		<comments>http://blog.goneopen.com/2010/01/msbuild-execution-of-soapui-testrunner/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 01:35:13 +0000</pubDate>
		<dc:creator>todd</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[msbuild]]></category>
		<category><![CDATA[soapui]]></category>
		<category><![CDATA[UnitTesting]]></category>

		<guid isPermaLink="false">http://blog.goneopen.com/?p=103</guid>
		<description><![CDATA[I have just been writing an msbuild runner to wrap testrunner for soapUI. Here it is. There are a couple of techniques to note: stacking the args for the commandline in an ItemGroup (see thanks below) don&#8217;t forget to Html Escape quots when invoking command line ie &#38;amp;quot I also dependency check for each And [...]]]></description>
			<content:encoded><![CDATA[<p>I have just been writing an msbuild runner to wrap testrunner for soapUI. Here it is. There are a couple of techniques to note:</p>


<ul>
<li>stacking the args for the commandline in an <code>ItemGroup</code> (see thanks below)</li>
<li>don&#8217;t forget to Html Escape quots when invoking command line ie <code>&amp;amp;quot</code></li>
<li>I also dependency check for each</li>
<li>And the usual that the default target is Help and it tells about the targets and dependencies</li>
</ul>





<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;Project DefaultTargets=&quot;HelpTest&quot;  ToolsVersion=&quot;3.5&quot; xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;&gt;

  &lt;PropertyGroup&gt;
    &lt;SoapUiProject Condition=&quot;'$(TestProject)'==''&quot;&gt;agent-soapui-project.xml&lt;/SoapUiProject&gt;
    &lt;SoapUITestResultsFolder Condition=&quot;'$(SoapUITestResultsFolder)'==''&quot;&gt;$(MSBuildProjectDirectory)&lt;/SoapUITestResultsFolder&gt;
  &lt;/PropertyGroup&gt;

  &lt;ItemGroup&gt;
    &lt;Args Include=&quot;-a&quot;/&gt;
    &lt;Args Include=&quot;-e$(Endpoint)&quot; Condition=&quot;'$(Endpoint)'!=''&quot;/&gt;
    &lt;Args Include=&quot;-s$(TestSuite)&quot; Condition=&quot;'$(TestSuite)'!=''&quot;/&gt;
    &lt;Args Include=&quot;-c$(TestCase)&quot; Condition=&quot;'$(TestCase)'!=''&quot;/&gt;
    &lt;Args Include=&quot;-f$(SoapUITestResultsFolder)&quot; Condition=&quot;'$(SoapUITestResultsFolder)'!=''&quot;/&gt;
  &lt;/ItemGroup&gt;

  &lt;PropertyGroup&gt;
    &lt;SoapUiPath&gt;$(ProgramFiles)\eviware\soapUI-3.0.1\bin&lt;/SoapUiPath&gt;
    &lt;JAVA_HOME Condition=&quot;'$(JAVA_HOME)'==''&quot;&gt;$(SoapUiPath)\..\jre&lt;/JAVA_HOME&gt;
    &lt;TestProject&gt;$(MSBuildProjectDirectory)\src\AcceptanceTest\$(SoapUiProject)&lt;/TestProject&gt;
    &lt;SoapUiRunner&gt;&amp;quot;$(SoapUiPath)\testrunner.bat&amp;quot; $(TestProject) @(Args,' ')&lt;/SoapUiRunner&gt;
  &lt;/PropertyGroup&gt;

  &lt;Target Name=&quot;TestAll&quot; DependsOnTargets=&quot;AcceptanceTests&quot;/&gt;

  &lt;Target Name=&quot;CheckDependencies&quot;&gt;
    &lt;Error Text=&quot;SoapUI testrunner is not installed at: $(SoapUiPath)&quot; Condition=&quot;!(Exists('$(SoapUiPath)'))&quot;/&gt;
     &lt;Error Text=&quot;JAVA_HOME environment variable not set correctly to point to an JRE&quot; Condition=&quot;!Exists('$(JAVA_HOME)')&quot;/&gt;
  &lt;/Target&gt;
  
  &lt;Target Name=&quot;AcceptanceTests&quot; DependsOnTargets=&quot;CheckDependencies&quot;&gt;
    &lt;Message Text=&quot;Building Test Command: $(SoapUiRunner)&quot;/&gt;
    &lt;Exec Command=&quot;$(SoapUiRunner)&quot;/&gt;
  &lt;/Target&gt;

  &lt;Target Name=&quot;HelpTest&quot;&gt;
    &lt;Message Text=&quot;
    
    msbuild /t:TestAll
    
    Variables that can be overridden:
      SoapUiProject=soapui-project.xml
      SoapUITestResultsFolder=$(MSBuildProjectDirectory)
      Endpoint=http://12.0.0.7:8090/SERVICE
      TestSuite=WorkSuite
      TestCase=UpdateCase

    Targets:
     - TestAll
     - AcceptanceTests
	
    Dependencies: 
    - soapUI must be installed to $(SoapUiPath)
    - JAVA_HOME - currently set to: $(JAVA_HOME)
             
             &quot; /&gt;
  &lt;/Target&gt;

&lt;/Project&gt;
</pre>



<h2>Reference:<h2>

The technique for stacking args in the ItemGroup is fro:<br />
<ul>
	<li>http://weblogs.asp.net/lorenh/archive/2008/12/11/msbuild-trick-for-making-lt-exec-gt-calls-more-maintainable.aspx</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blog.goneopen.com/2010/01/msbuild-execution-of-soapui-testrunner/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

