On Fri, 2009-02-27 at 20:02 +0200, Andrus wrote:
> Loading DbLinq_StudioExpress.sln in VCSE gives only one warning.

The problem isn't from loading DbLinq_StudioExpress.sln, nor from
building DbLinq_StudioExpress.sln.  (In fact, DbLinq_StudioExpress.sln
doesn't contain the DbLinqTest project.)  This particular problem isn't
from building via DbLinq.sln either.

The problem comes from running the generated unit tests within NUnit.

There are two problems.

Problem 1: If I load DbLinq.sln within Visual Studio Express, I get 7
warning messages about unusable projects.  DbLinqTest.csproj is one of
them.  Thus, DbLinqTest is unusable to VSE users.

Solution 1: DbLinqTest.sln fails to load because of the following
element within the DbLinqTest.csproj file:

        
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Any idea what that does?

If I apply the attached DbLinqTest.csproj.diff patch to
DbLinqTest.csproj, the project is usable from within VSE.

So now I can build DbLinqTest from within the normal DbLinq.sln file.
Yay.

Problem 2: I get errors when running the DbLinqTest unit tests within
NUnit 2.4.8.

Perhaps this is where I'm going wrong.

After I build the DbLinq, DbMetal, and DbLinqTest projects within the
solution, I navigate to the build folder within Explorer, right-click
DbLinqTest.dll, and select Run Tests.  This loads DbLinqTest.dll within
NUnit 2.4.8.

Next I click the Run button within NUnit.

Result: 21 of 38 tests fail.

They fail because of the aforementioned assembly binding problem: the
DbMetal assembly cannot be found when running the unit tests within
NUnit 2.4.8.

Solution 2: If I simply copy DbMetal.exe to DbMetal.dll within the
directory containing DbLinqTest.dll, then the tests pass within NUnit.

Thus, to paraphrase  the original question: How do you actually execute
your unit tests?

If you need any more detail about the above steps, please ask and I'll
try to be more descriptive.  At present, I'm unable to run the unit
tests without a manual step (copying DbMetal.exe to DbMetal.dll), and it
seems that this step shouldn't be necessary.

Thanks,
 - Jon


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" 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/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Index: DbLinqTest.csproj
===================================================================
--- DbLinqTest.csproj	(revision 971)
+++ DbLinqTest.csproj	(working copy)
@@ -27,14 +27,16 @@
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
+    <OutputPath>..\..\build\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
-    <Reference Include="Microsoft.VisualStudio.TeamSystem.Data.UnitTesting, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\lib\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll</HintPath>
+    </Reference>
     <Reference Include="MySql.Data, Version=5.0.8.1, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\lib\MySql.Data.dll</HintPath>

Reply via email to