Configure SQL Test with Teamcity integration

Easy unit testing for databases in SQL Server Management Studio

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Michelle Taylor, David Priddle

Configure SQL Test with Teamcity integration

Postby nanonerd » Mon Jan 13, 2014 6:04 pm

Hi,

I am using SQL Test to create some unit tests in SQL Server. And I integrated with Teamcity so that on a build, it auto runs the tSQLt tests.

The issue is that we plan to create hundreds of unit tests for all our store procs. And we don't want to run all of the unit tests each time we check in code and whereby Teamcity runs a build + runs the unit tests.

What I am wondering is if there is a way to configure the integration build to only run unit tests for new tests that are checked in.

Or is the practical solution to check in without Teamcity auto running the tSQLt unit tests? Thereby, just manually run the new test cases on the DEV server (after check in)? An extension of this is to run a batch nightly to run ALL the unit tests.
nanonerd
 
Posts: 2
Joined: Mon Jan 13, 2014 5:38 pm

Postby Brian Donahue » Wed Jan 15, 2014 11:14 am

Hi,

I believe one of our guys have addressed this question on Stack:
http://stackoverflow.com/questions/2110 ... ntegration

I hope the answer is helpful.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby David Atkinson » Wed Jan 15, 2014 11:25 am

Our TeamCity plugin is currently limited to a tSQLt.RunAll under the hood, so if you want to run only a specific class for now you'll need to create your own custom steps. Dave Green's article explains how you might go about settings this up.

http://d-a-green.blogspot.co.uk/2012/07 ... t-red.html
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Stack post is mine ... ;-)

Postby nanonerd » Wed Jan 15, 2014 7:59 pm

@BDonahue - thanks for the ref. But that's actually my stack post and it was somewhat helpful ... ;-)
nanonerd
 
Posts: 2
Joined: Mon Jan 13, 2014 5:38 pm


Return to SQL Test

Who is online

Users browsing this forum: No registered users and 0 guests