SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Unit Testing and Code Generation


Unit Testing and Code Generation

Author
Message
Grant Fritchey
Grant Fritchey
SSC-Dedicated
SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)

Group: General Forum Members
Points: 38983 Visits: 32616

I have to agree. The database development team that I belong to has been trying to work out these kinds of methods, but the nature of databases and the dirth of tools has made it rather difficult. We're just starting to look at implementing the Visual Studio instead of TSQLUnit as an aid to those methods.

The one issue that we've run into repeatedly is the amount of time it takes us to make database refactors as opposed to the amount of time a code refactoring takes. We need to get the developers to allow us more time or we have to find methods of speeding that process up.

BTW, the Visual Studio Team Edition for Database Developers actually does most of what our CodeSmith templates did and it's integrated with the development environment, so... so much for all that work.



----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Scott Ambler
Scott Ambler
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 1

There really is a lack of tools, but the vendors are starting to move forward finally. I think with MS taking the lead we're going to see the other DB tool vendors wake up and realize that their toolsets don't really reflect modern development practices. There has been virtually no thought leadership coming out of the data management community for years now, many of them still haven't come up to speed on evolutionary if not agile development, and they're struggling to deal with the new ways which development teams are working. Worse yet, some of them are still pushing the outdated, and largely disproved, serial and/or command-and-control approach to development. It's pretty sad.

Anyway, if you want to help things change in the data community, please start pointing people to www.agiledata.org. I think it will give them something to think about.

- Scott


Undebtedly
Undebtedly
SSC-Enthusiastic
SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)

Group: General Forum Members
Points: 184 Visits: 13
> We built a query that compares two sets of data by simply doing a count of the table and a count of the union. If they're different, it fails the test. Simplistic and limited it may be, but it gets the job done. We had tried exporting data to XML & doing all kinds of other comparisons, but this simple approach seemed to work much better than the fancier ones.

I did that at first, but found that unit tests failed more frequently than taking a known bit of data that hasn't changed in a long while, and using that instead.



Steve Miller
Undebtedly
Undebtedly
SSC-Enthusiastic
SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)

Group: General Forum Members
Points: 184 Visits: 13
> Anyway, if you want to help things change in the data community, please start pointing people to www.agiledata.org. I think it will give them something to think about.

I've been pointing them there for a while now. :-) Thanks for creating the web site.



Steve Miller
Undebtedly
Undebtedly
SSC-Enthusiastic
SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)

Group: General Forum Members
Points: 184 Visits: 13
> BTW, the Visual Studio Team Edition for Database Developers actually does most of what our CodeSmith templates did and it's integrated with the development environment, so... so much for all that work.

I'll admit my ignorance publically now. (My excuse is that I've been overseas for the past year, and haven't been keeping up to date. That's my story and I'm sticking to it. ;-) What's this VS Edition for Database Developers?



Steve Miller
Grant Fritchey
Grant Fritchey
SSC-Dedicated
SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)

Group: General Forum Members
Points: 38983 Visits: 32616

It's an add-on to Visual Studio. It's specifically targeted at database development. It manages all your database objects locally through scripts that can be checked into source control. It has a full unit test engine. It has a build & deployment mechanism that can be automated along with the TFS (Team Foundation Server) build mechanisms. It has exactly one, at this point, refactoring mechanism built in. Here's the web site:

http://msdn.microsoft.com/vstudio/teamsystem/dbpro/

We've been evaluating it. It looks likely that we'll be adopting it and it's associated processes, even though it's in CTP, as our database development tool.



----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Grant Fritchey
Grant Fritchey
SSC-Dedicated
SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)

Group: General Forum Members
Points: 38983 Visits: 32616
You are the #1 resource on this stuff. I send anyone who'll listen over to your web site.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Undebtedly
Undebtedly
SSC-Enthusiastic
SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)

Group: General Forum Members
Points: 184 Visits: 13
I got a bunch of notifications on this thread a while ago. If I missed replying to anyone, my apologies. I'm trying to dig out after moving back Stateside.



Steve Miller
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search