CSLA Tests

CSLA Tests

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


statcomp posted on Friday, May 07, 2010

I've heard good things about CSLA so I finally downloaded the framework (3.8.3 and then 3.8.1) and ran its tests. And well, I got 38 tests failed. Some of them seem to be tests intentionally failed. May I ask why?

RockfordLhotka replied on Friday, May 07, 2010

Tests may fail in your environment due to configuration differences (path to the database, etc), whether you have COM+ enabled on your workstation and so forth.

I'm pretty sure there actually were some failing tests in 3.8.1, but I think the 3.8.3 tests all pass.

Also, if you are running the Silverlight tests, you must run in the TESTING profile (not Release or Debug) or you'll get a lot of exceptions you have to F5 through. This is due to the way the Silverlight runtime handles certain exception scenarios, and the Testing profile includes extra behaviors to work around that issue.

statcomp replied on Saturday, May 08, 2010

Thanks for your prompt reply. The fact that all tests should pass gives me some confidence. So it's good for me to run the tests after all as the failed tests meant  my environment setup was not right.  That's why I love a project providing unit test (I call it requirement specification checker). BTW, Can you direct me to any instruction showing how to setup environment for the tests? I tried to find one in the folders extracted in vain. Thanks again

RockfordLhotka replied on Monday, May 10, 2010

Some of it might be just file path issues to the database file(s). The instructions for setting up 3.6 should help address that:

http://www.lhotka.net/files/csla36/cslabuild.pdf

There are also some known timing issues with some of the tests in 3.8, which I think have all been resolved in 4 now. Things where running a test in isolation works, but running it as part of a complete run doesn't always work due to thread sync isuses and things of that nature. Switching from nunit to mstest with CSLA 4 forced me to fix some of those, and created a bunch of others that needed fixing because mstest apparently uses a different isolation model than nunit.

At some point, and I don't remember when, I removed (or at least marked as ignored) the tests requiring Enteprise Services. This is because most people do dev work on Win7 or Vista or XP - none of which have COM+ turned on by default.

Copyright (c) Marimer LLC