Question

I am trying to use the Database unit tests in Visual Studio 2010. I created a test where I am using checksum to validate the result set in one of my tables. If I tested on the data it works fine until I delete the rows and reload the same data. I am not including any field that could change (identities, derived dates, etc) which would obviously change the checksum output.

Is there something I need to do so I can implement this? It would be really nice ot have it validate the 20+ rows in the table using the checksum.

OS: windows 7 64bit

Was it helpful?

Solution

Here is how I got around this....instead of using the Checksum test type I used scalar and rolled my own checksum logic on my rows.

  • In the query that is used for the validation I added a checksum column for the row where I am doing a checksum on all of the columns I want to validate.
  • I then sum up these checksums.

Now when I run the test and reload the data it is correctly evaluating the data. If anyone has another option for utilizng the out of the box checksum I would appreciate it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top