views:

117

answers:

2

I was wondering if there are any tools similar to Pex that analyze T-SQL stored procedures and functions (instead of managed code) in order to generate meaningful and interesting input values for parameterized unit tests.

+2  A: 

AFAIK, no. I've never come across one and another look around has failed to throw one up (I did come across this article on the subject).

The only semi-relevent tools I can suggest are:
TSQLUnit - testing framework for TSQL
Red Gate's Data Generator - for automated test data generation

Or, just writing tests in NUnit. You could create a basic data access layer in (e.g.) .NET, each method wrapping a call to a different sproc with the same parameters to pass through. You could then use a tool like Pex on that data access layer - a sort of proxy approach.

AdaTheDev
The article looked promissing at first, but in the end it did not really answer my question. It looks like "AFAIK, **no**" is the answer. +1 for that. I'm going to leave the question open for a couple more days to see if anybody else tips in.
Alfred Myers
OK no worries. I'd be surprised if there was such a tool for SQL Server - unit testing at the database level doesn't get as much exposure/attention as testing at the layer up (e.g. .NET). Though I would be interested to hear any other suggestions!
AdaTheDev
A: 

In addition to the tools mentioned by @AdaTheDev, have you looked at DbUnit.NET?

Mitch Wheat
From what I read over there it does not do what I need. Thanks anyway.
Alfred Myers