April 7, 2003 at 9:04 am
We have recently gone to XP (eXtreme Programming) here. One of the basic tenets of XP is writing unit tests before you start programming. I have unit tested for years, but have used tools such as Query Analyzer to do it.
The difference now is that the unit tests are stored off. They can be run stand-alone, or together as a set.
Has anyone come across a useful tool? Or should we write our own tests with T-SQL? Has anyone gone down this road yet?
Steve
Steve Miller
April 7, 2003 at 12:00 pm
I think they would still be .sql files, but saved as such and stored somewhere. You could chain them in one .sql with GOs to separate the batches or even a .cmd to chain multiple .sql files together.
Steve Jones
April 7, 2003 at 12:37 pm
Dont know that you have to test the procs separately, you could test as part of the code that calls it, should be pretty granular anyway. Have you looked at Nunit for running your tests?
Andy
April 7, 2003 at 2:00 pm
We have decided on NUnit for C++ or C#, I forget which.
While researching this today, I found utPLSQL, an open source project for unit testing Oracle's PS/SQL. Feuerstein's approach with that is very much like the approach I was thinking about already. PL/SQL isn't all that different to T-SQL, and I'm leaning to porting that over, if it's not too much trouble, and nothing else better comes up. It doesn't look like there will be.
http://oracle.oreilly.com/utplsql/
http://utplsql.sourceforge.net/
Steve
Steve Miller
April 7, 2003 at 2:59 pm
I'd like to see it if you get the port done, might make a good article. Im a fan of XP, trying to get it adopted at work, slow going.
Andy
April 7, 2003 at 4:01 pm
Yeah, it takes awhile to get the courage to switch. It helps that part of the department in another locale has already made the switch, and they have all turned into avid supporters.
You remembered I do some writing, eh?...Or maybe you were thinking of writing it up yourself? I've already thought of turning it into an article. But I want to make sure we go that way, first.
Steve
Steve Miller
April 7, 2003 at 4:14 pm
If you do the port, you write the article! I knew you had a band ....
Andy
April 7, 2003 at 4:17 pm
>> I knew you had a band ....
Yeah, sure. I give out autographs every other Thursday between 1:00 and 1:03
Steve
Steve Miller
January 16, 2004 at 4:20 pm
I know this is a very old thread, but we ended up going with tsqlunit, an open-source project:
http://tsqlunit.sourceforge.net/index.html
Steve Miller
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply