views:

104

answers:

1

I have noticed that if I have a set of regression tests and decide to change a property on one of my objects (DTO) from int to decimal for example - i make all the other changes and the tests pass like normal. But if this project is under source control (VSS specifically) this small change will cause something strange to happen...

Similar to this question

http://stackoverflow.com/questions/400304/testing-in-visual-studio-succeeds-individually-fails-in-a-set

But a little different. I can make this change, and try to run my tests and any test that has an assert around this new data type will fail, but if I then click "debug checked tests" and it then runs through the previously failed tests - they pass. No changes to the test code /etc

Does anyone know why this might be happening? I hate to work outside of source control but if my tests are not reliable ... why have them at all in this case ... and I live for testing code :P

+1  A: 

Given the age of the question, I doubt it's still an issue for you, but I wonder if you have a bin or obj folders under source control or an assembly that is in them?

If they are then when you compile the app (before MSTest runs) the source controlled assemblies are going to be in read-only mode and won't get overridden by the compiler and thus your tests will be against out of date binaries.

Richard Banks
this is still an issue for me, I got around it (kinda) by instead clicking the solution files list (to show all tests for the sln) and doing a "debug" through each first. Then after this was complete i could run from the usual MS Test w/ accurate results but I appreciate your comment as this is most likely the root cause of the problem!
Toran Billups