Re: Unit testing question and stored procedures

2017-04-26 Thread Greg Keogh
, that’s how we do it. Some people use transactions to do a similar >>>> thing but you can’t test transactional code by doing that. >>>> >>>> >>>> >>>> Regards, >>>> >>>> >>>> >>>> Greg &

Re: Unit testing question and stored procedures

2017-04-26 Thread Tony Wright
; >>> 1300SQLSQL (1300 775 775) office | +61 419201410 <+61%20419%20201%20410> >>> mobile│ +61 3 8676 4913 <+61%203%208676%204913> fax >>> >>> SQL Down Under | Web: www.sqldownunder.com |http://greglow.me >>> >>> >>> >&g

Re: Unit testing question and stored procedures

2017-04-26 Thread Nathan Schultz
fax >> >> SQL Down Under | Web: www.sqldownunder.com |http://greglow.me >> >> >> >> *From:* ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-bounces@ozdot >> net.com] *On Behalf Of *Tony Wright >> *Sent:* Wednesday, 26 April 2017 3:08 PM >> *To:*

Re: Unit testing question and stored procedures

2017-04-25 Thread Greg Keogh
.com |http://greglow.me > > > > *From:* ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-bounces@ > ozdotnet.com] *On Behalf Of *Tony Wright > *Sent:* Wednesday, 26 April 2017 3:08 PM > *To:* ozDotNet <ozdotnet@ozdotnet.com> > *Subject:* Re: Unit testing question and store

RE: Unit testing question and stored procedures

2017-04-25 Thread 罗格雷格博士
ttp://www.sqldownunder.com/> |http://greglow.me<http://greglow.me/> From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Tony Wright Sent: Wednesday, 26 April 2017 3:08 PM To: ozDotNet <ozdotnet@ozdotnet.com> Subject: Re: Unit testing question and stored pro

Re: Unit testing question and stored procedures

2017-04-25 Thread Tony Wright
So let me understand this. I believe what you are doing is having a database snapshot (or testing database) that you can continuously revert to its initial state, then you run the stored proc via nunit, then in the init for the next test, revert back to the initial state and run that test, etc. I

RE: Unit testing question and stored procedures

2017-04-25 Thread 罗格雷格博士
I should have added that the dac framework stuff had testing but has now removed it. Some use TSQLUnit but I’ve not found it any more useful and NUnit fits well with other testing. Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL

RE: Unit testing question and stored procedures

2017-04-25 Thread 罗格雷格博士
Hi Tony, I’d still just use something like NUnit, along with all the other tests in your .NET code. Just put a wrapper calling them. Makes it easy to integrate with other tests. One thing that I often do as well, is to have a wrapper that uses database snapshots, to get the test DB back into