Strage behaviour in Database Unit Tests in VS 2010
-
Friday, May 25, 2012 9:56 AM
Hi!
I am working with database projects in Visual Studio 2010 and I am using unit tests to test stored procedures and functions within these database projects. Usually everything works fine but sometimes I get a very strange behaviour. Given the following test:
DECLARE @RC AS FLOAT, @pName AS NVARCHAR (4000), @pYear AS INT, @pFilterId AS INT SELECT @RC = NULL, @pName = 'SomeName', @pYear = 2012, @pFilterId = 1; -- FGE: Cleanup Data and refresh Data EXEC [Tools].[CleanupModel]; EXEC [Transformation].[FillData]; SELECT @RC = [Dimensions].[GetResult](@pName, @pJahr, @pFilterId); SELECT @RC AS RC;As Test condition I declared a scalar value and inserted 38609501,4 as expected value (this is the value that is returned by the stored function for the given parameters). The test fails with this interesting error message:
It is German but nevertheless I have marked the interesting part: real value is 38609501,4 expected value is 38609501,4 ???
Other tests that are composed the same way work as expected.
Has anybody encountered this situation too or has anybody a clue what the real problem is?
Thank you very much and have a nice day
Frank
- Moved by Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator Monday, May 28, 2012 7:32 AM Move to the correct forum. (From:Visual Studio Unit Testing)
All Replies
-
Monday, May 28, 2012 7:31 AMModerator
Hi Frank,
I am moving your thread into the Visual Studio Database Development Tools (Formerly "Database Edition Forum") Forum for dedicated support. Thanks for your understanding.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
-
Tuesday, May 29, 2012 9:08 AMModerator
Hello Frank,
In order to help you with your issue I need to first reproduce it on my machine. So could you please share one simple solution which constains the database unit test to me to reproduce it? You can share it via Sky-Drive or send it to me directly via email: v-vison at Microsoft dot com.
Thanks.
Vicky Song [MSFT]
MSDN Community Support | Feedback to us

