none
SQL Server Unit Tests RRS feed

Answers

  • Blog on the topic: "Database unit testing is used for feature testing of your individual modules (stored procedures, triggers or user defined functions) that is to say your module performs as expected.  Apart from that, it is also used to ensure that subsequent changes to the module does not break any functionality.

    At first glace, it looks like this would add overhead to create vs. doing adhoc testing, but Visual Studio lets you automatically generate T-SQL code stubs to test the database object which you can customize as per your need.

    Visual Studio provides Database Unit Test Designer which you can write/define T-SQL scripts (also insert SQL assertion in this code) that calls your module and then evaluates the execution result against the different test conditions which indicates your modules execution success or failure."

    LINK: SQL Server Unit Testing with Visual Studio 2010

    >Please pardon my ignorance as I am coming back to SQL Server after a brief gap.

    You may have to brush up with T-SQL prior to using a sophisticated tool like this:

    http://www.sqlusa.com/bestpractices/



    Kalman Toth Database & OLAP Architect SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012



    • Marked as answer by recherche Sunday, May 4, 2014 1:15 PM
    Saturday, May 3, 2014 9:30 PM
    Moderator

All replies

  • Blog on the topic: "Database unit testing is used for feature testing of your individual modules (stored procedures, triggers or user defined functions) that is to say your module performs as expected.  Apart from that, it is also used to ensure that subsequent changes to the module does not break any functionality.

    At first glace, it looks like this would add overhead to create vs. doing adhoc testing, but Visual Studio lets you automatically generate T-SQL code stubs to test the database object which you can customize as per your need.

    Visual Studio provides Database Unit Test Designer which you can write/define T-SQL scripts (also insert SQL assertion in this code) that calls your module and then evaluates the execution result against the different test conditions which indicates your modules execution success or failure."

    LINK: SQL Server Unit Testing with Visual Studio 2010

    >Please pardon my ignorance as I am coming back to SQL Server after a brief gap.

    You may have to brush up with T-SQL prior to using a sophisticated tool like this:

    http://www.sqlusa.com/bestpractices/



    Kalman Toth Database & OLAP Architect SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012



    • Marked as answer by recherche Sunday, May 4, 2014 1:15 PM
    Saturday, May 3, 2014 9:30 PM
    Moderator
  • Check if this article may be of some help

    tSQLt Unit Testing


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog


    My TechNet articles

    Sunday, May 4, 2014 4:57 AM
    Moderator