Hi,
I am new to MbUnit and trying to configure it with my nant build
script.

Although I am Successfully able to publish my application. But the
problem comes when I add the MbUnit Configuration in my nant build
file.

Right now the tools I am using are as follows

     1. CruiseControol.net 1.3
      2. Nant 0.85 and
      3. Mbunit  2.41.232

 Below is my ccnet.config file which i  think is ok


    <cruisecontrol>
          <project name="NantApp" queue="Q0" queuePriority="1">
                <workingDirectory>E:\projects\NantAppPublish\Working</
workingDirectory>
                <artifactDirectory>E:\projects\NantAppPublish
\Artifacts</artifactDirectory>
                <category>Nant</category>
                <webURL>http://localhost:8080/NantApp/</webURL>
                <modificationDelaySeconds>2</modificationDelaySeconds>
                <triggers />
                <state type="state" directory="E:\projects
\NantAppPublish\State" />
                <sourcecontrol type="vss" autoGetSource="true"
applyLabel="true">
                    <executable>C:\Program Files\Microsoft Visual
Studio\VSS\win32\SS.EXE</executable>
                    <project>$/NantApp/</project>
                    <username>admin</username>
                    <password></password>
                    <ssdir>E:\vss\NantApp\</ssdir>
                    <workingDirectory>E:\projects\NantAppPublish
\Working</workingDirectory>
                    <culture>en-US</culture>
                    <cleanCopy>false</cleanCopy>
                </sourcecontrol>
                <labeller type="dateLabeller"/>
                <tasks>
                      <nant>
                                <executable>e:\projects\nant85\bin
\nant.exe</executable>
                                <baseDirectory>E:\projects\NantApp</
baseDirectory>
                                <nologo>false</nologo>
                                <buildFile>C:\Documents and Settings
\nvijay-in\My Documents\Visual Studio 2005\Projects\NantApp
\project.build</buildFile>
                                <logger>NAnt.Core.XmlLogger</logger>
                                <targetList>
                                  <target>build</target>
                                </targetList>
                                <buildTimeoutSeconds>1200</
buildTimeoutSeconds>
                      </nant>
                </tasks>
                <publishers>
                      <xmllogger logDir="E:\projects\NantAppPublish
\Log" />
                </publishers>
                <externalLinks />
          </project>
    </cruisecontrol>


Now my nant build script is as follows


    <?xml version="1.0"?>
        <project name="NantApp" default="build" basedir=".">
              <description>Builds the NantApp project</description>
              <property name="debug" value="true" overwrite="false"/>
              <property name="dotnet"  value="c:/windows/Microsoft.NET/
Framework/v2.0.50727" overwrite="false"/>
              <property name="target" value="E:/Projects/
NantAppPublish/Artifacts"  overwrite="false" />
              <target name="clean" description="Remove all generated
files">
                     <delete dir="${target}" />
              </target>
              <target name="build" description="compiles the source
code">
                  <delete dir="${target}" />
                  <exec basedir="."
                               program="${dotnet}/
aspnet_compiler.exe"
                               commandline="-nologo -v NantApp $
{target} -f -u -fixednames"
                               workingdir="."
                               failonerror="true" />
                  <delete>
                        <fileset>
                               <include name="${target}/*.build" />
                               <include name="${target}/*.scc" />
                               <include name="${target}/*.sln" />
                               <include name="${target}/build.*" />
                        </fileset>
                   </delete>
              </target>
        </project>


My T2.dll in the location ( E:\projects\mbunit\T2\T2\bin\Debug
\T2.dll ) holds the test cases for the NantApp project.
Which I want to test through my nant task in cruisecontrol.net but
sadly I didnt get anything so far :(
Ironically this test is running successfully in Mbunit GUI console and
mbunit dos console but not with nant.


So far i tried the following mbunit test blocks with nant but got
nowhere

1.        <target name="tests">
                  <mbunit report-types="html">
                        <assemblies>
                              <includes asis="true" name="E:\projects
\mbunit\T2\T2\bin\Debug\T2.dll" />
                        </assemblies>
                  </mbunit>
            </target>

2.      <target name="test">
                <mbunit report-types="html">
                      <assemblies>
                            <include asis="true" name="E:\projects
\mbunit\T2\T2\bin\Debug\T2.dll" />
                      </assemblies>
                </mbunit>
          </target>

3.        <target name="test" depends="build">
                    <exec basedir="C:\program files\mbunit\"
                                      useruntimeengine="true"
                                      workingdir="E:\projects
\NantAppPublish\Working"
                                      program="mbunit.cons.exe"
                                      commandline="E:\projects\mbunit
\t2\t2\bin\debug\t2.dll
                                                              /
assembly-path:E:\projects\mbunit\T2\T2\bin\Debug\T2.dll /report-
type:Html
                                                              /report-
folder:E:\projects\NantAppPublish\Log
                                                              /report-
name-format:mbunit-{0}{1}-results" />
            </target>

4.        <mbunit>
                <test>
                    <assemblies>
                          <includes asis="true" name="E:\projects
\mbunit\T2\T2\bin\Debug\T2.dll" />
                    </assemblies>
                </test>
            </mbunit>


5.    <target name="test">
              <fileset>
                        <includes asis="true" name="e:\projects\mbunit
\t2\t2\bin\debug\t2.dll" />
              </fileset>
        </target>


6.    <target  name="testing">
              <exec basedir="."
                        program="c:\program files\mbunit
\mbunit.cons.exe"
                       commandline="/assembly-path:E:\projects\mbunit
\T2\T2\bin\Debug\T2.dll /report-type:Html /report-folder:E:\projects
\NantAppPublish\Log /report-name-format:mbunit-{0}{1}-results"
                       failonerror="true" />
      </target>

7.    <target name="tests" depends="build">
                  <exec program="c:\program files\mbunit
\mbunit.cons.exe">
                          <arg value="/assembly-path:E:\projects\mbunit
\T2\T2\bin\Debug\T2.dll" />
                          <arg value="/report-type:Html" />
                          <arg value="/report-folder:E:\projects
\NantAppPublish\Log" />
                          <arg value="/report-name-format:mbunit-{0}
{1}-results" />
                    </exec>
        </target>

8.    <target name="tests" depends="build">
              <mbunit report-types="Html" report-filename-
format="MBUnit-Testing-{0}{1}" report-output-directory="E:\projects
\NantAppPublish\Log">
                 <assemblies>
                        <include asis="true" name="E:\projects\mbunit
\T2\T2\bin\Debug\T2.dll" />
                  </assemblies>
               </mbunit>
        </target>

9.   <target name="test" depends="build" description="Running my test
cases">
            <exec program="c:\program files\mbunit\mbunit.cons.exe">
                          <arg value="E:\projects\mbunit\T2\T2\bin
\Debug\T2.dll" />
                          <arg value="/assembly-path:E:\projects
\NantAppPublish\Artifacts\bin\" />
                          <arg value="/report-type:Html" />
                          <arg value="/report-folder:E:\projects
\NantAppPublish\Log" />
                          <arg value="/report-name-format:mbunit-{0}
{1}-results" />
            </exec>
      </target>

10. I also tried the block which I got from Mbunit GUI Console

       <?xml version="1.0" encoding="utf-16"?>
           <project default="tests">
                <target name="tests">
                    <mbunit report-types="html">
                          <assemblies>
                                <includes asis="true" name="E:\projects
\mbunit\T2\T2\bin\Debug\T2.dll" />
                          </assemblies>
                    </mbunit>
              </target>
          </project>


I will be greatful to you if you provide some solution.
Eagerly Awaiting your reply.

Many Thanks in Advance.

Best Wishes,
Vj

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to