Errors running the cslatests with NUnit

Errors running the cslatests with NUnit

Old forum URL: forums.lhotka.net/forums/t/6730.aspx


jpose posted on Thursday, April 02, 2009

Is anybody else having problems sucussfully running the NUint tests in cslatest.sln

I was using nunit 2.4.8 but switched to 2.4.4 because the readme stated a dependency on 2.4.4

 

I am running on Vista SP1. It was suggested that I try running NUnit as Administrator but that seems to have no effect.

 

 

Cslatest.sln unit test failures

The results seem to be inconsistant and I am wondering if the isssue is Csla, NUnit or the tests themselves. I am most concerned about Serialization Test since we are not using ObjectFactory yet.

 

Serialization Tests

When I run the complete test suite I get CommandOverDataPortal  test to fail. When I run just the SerializationTests the first time the test succeed but if I run Serialization Tests a second time 

TestIndexAfterSerialization fails with OutOfMemoryException.

============

Csla.Test.Serialization.SerializationTests.CommandOverDataPortal :   Expected string length 23 but was 16. Strings differ at index 16.
  Expected: "test data server server"
  But was:  "test data server"
  ---------------------------^

============

Csla.Test.Serialization.SerializationTests.TestIndexAfterSerialization : System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown.

============

 

Object factory Failed Tests

When running the whole test suite I get the following 2 errors

============

Csla.Test.ObjectFactory.ObjectFactoryTests.Create :   Location should match

  Expected: Server

  But was:  Client

============

 

Csla.Test.ObjectFactory.ObjectFactoryTests.CreateMissing : Csla.DataPortalException : DataPortal.Create failed ()

 ----> System.NotImplementedException : Create not implemented

============

 

When running just ObjectFactory tests I get the following 2 errors

============

Csla.Test.ObjectFactory.ObjectFactoryTests.UpdateEnterpriseServices :   Transactional type should match
  Expected: EnterpriseServices
  But was:  Manual

============

Csla.Test.ObjectFactory.ObjectFactoryTests.UpdateEnterpriseServices :   Transactional type should match
  Expected: EnterpriseServices
  But was:  Manual


 

 

RockfordLhotka replied on Saturday, April 04, 2009

I'm pretty sure that some of the tests are accidentally interdependent. In other words, failure of a test may cause subsequent tests to have incorrect results. For example, in the case of the transactional test I think the ES fail causes a TS fail.

Not that CSLA fails - the test fails - which is a very different thing.

These tests have been written by people of varying skill over a period of several years. And let's face it, very few of them are "unit" tests. Most of them are integration tests. The end result is that the tests are relatively spotty in some areas, really good in some areas and non-existent in some areas.

If I took a few months off from working on the framework (and from the writing/speaking that funds this whole thing), I'm sure I could rework the tests to be far better. But honestly, that's not going to happen...

On the other hand, if you dig into these issues and find actual CSLA problems, I think everyone here will agree that I tend to address things pretty rapidly. And if you can point to a relatively quick fix to a test, I'm happy to fix tests as well.

Vaxman2 replied on Monday, May 11, 2009

I have the same issues running it on XP with admin rights also..

RockfordLhotka replied on Tuesday, May 12, 2009

I looked into this a little – and there was at least one bug in a test that I fixed for 3.6.3.

 

I am strongly considering dropping the ES tests though. They complicate matters with UAC, and I suspect very few people use ES. On top of which, I haven’t touched the ES code for several years, and don’t anticipate touching it any time in the near future.

 

Rocky

 

 

From: Vaxman2 [mailto:cslanet@lhotka.net]
Sent: Monday, May 11, 2009 9:56 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] Errors running the cslatests with NUnit

 

I have the same issues running it on XP with admin rights also..

Vaxman2 replied on Tuesday, May 12, 2009

I apologize for not seeing your first reply to this thread. :(

Thanks for the reply!

Copyright (c) Marimer LLC