BugEye Unit Testing Framework
Home
Download
User Guide
Specifications
SourceForge

BugEye 1.0 User Guide

Setup Instructions

For C# in Visual Studio 2005

  1. Open the .csproj file in Notepad.

  2. Find the line with the following text:

    <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  3. Before the Import element, insert the following text:

    <ItemGroup>
      <BugEyeTestSuite Include="DummyTestSuite.bugeye" />
    </ItemGroup>
  4. After the Import element, insert the following text:

    <UsingTask AssemblyFile="$(SolutionDir)\Libraries\BugEye.Framework.dll"
        TaskName="BugEye.Framework.MSBuildTasks.BugEye" />
    <Target Name="PreBuildEvent">
      <BugEye Xslt="$(SolutionDir)\Libraries\BugEyeSuite.cs.xslt"
          Inputs="@(BugEyeTestSuite)"
          Outputs="@(BugEyeTestSuite->'$(BaseIntermediateOutputPath)\%(Filename).cs')">
        <Output TaskParameter="Outputs" ItemName="Compile" />
      </BugEye>
    </Target>

    Replace the Libraries folder with the folder path that contains the BugEye.Framework.dll and BugEyeSuite.cs.xslt files.

  5. Save the file and open the solution in Visual Studio 2005.

  6. Add your .bugeye file to the project and set the Build Action property to BugEyeTestSuite.

  7. Right-click on DummyTestSuite.bugeye and choose Exclude From Project in the popup menu.

For Java in Ant

  1. Within a target in an Ant build file, add the following text:

    <xslt style="${lib}/BugEyeSuite.java.xslt" force="true"
        basedir="${src}" destdir="${temp}" extension=".java">
      <include name="**/*.bugeye"/>
    </xslt>

    Where ${lib} is the folder that contains the BugEyeFramework.java.xslt file, ${src} is the folder with the source .bugeye files, and ${temp} is the destination folder for the generated .java files.

For JavaScript in Ant

  1. Within a target in an Ant build file, add the following text:

    <copy file="${lib}/BugEyeFramework.js" todir="${dest}" overwrite="true"/>
    <xslt style="${lib}/BugEyeSuite.js.xslt" force="true"
        basedir="${src}" destdir="${dest}" extension=".html">
      <include name="**/*.bugeye.xml"/>
    </xslt>

    Where ${lib} is the folder that contains the BugEyeFramework.js and BugEyeSuite.js.xslt files, ${src} is the folder with the source .bugeye.xml files, and ${dest} is the destination folder for the generated .html files.

    Any included .js files must also be copied to the ${dest} folder.

  2. Include ${dest} in the srcdir parameter of the javac task.

  3. Below the javac task, or in a separate target, add the following text:

    <java classname="test.Test1" classpath="${classpath}" fork="true">
      <arg path="${out}/Test1.report.xml"/>
    </java>
    <xslt style="${lib}/BugEyeReport.xslt" force="true"
      in="${out}/Test1.report.xml" out="${out}/Test1.report.html"/>

For JavaScript in Firefox or IE

  1. Drag and drop the .bugeye.xml onto the browser window.