Loading ...
Sorry, an error occurred while loading the content.
 

Re: [XP] Unit Testing Queries and Stored Procedures

Expand Messages
  • D. André Dhondt
    For those .NET developers out there, I just bumped into this on Charlie Poole s blog--there are a few NUnit add-ins to help with testing data-intensive unit or
    Message 1 of 7 , May 13, 2008
      For those .NET developers out there, I just bumped into this on Charlie
      Poole's blog--there are a few NUnit add-ins to help with testing
      data-intensive unit or integration code (from
      http://nunit.com/index.php?p=addins ):


      IterativeTest <http://nunit.com/index.php?p=iterativeTest> Data-driven
      tests can be marked with the [IterativeTest] attribute in order to
      programmatically create a list of parameter values to be passed into a test.
      RowTest <http://nunit.com/index.php?p=rowtest> RowTest Extension is an
      NUnit Addin that allows you to write RowTests for NUnit. RowTests can be
      used for simple Data-Driven Tests where the test data is provided by [Row]
      attributes. XtUnit <http://nunit.com/index.php?p=xtunit> XtUnit uses
      interception to provide runtime abilities of rolling back any changes that
      were made to the database during Data related unit tests. It also includes a
      base class that allows you to add attributes that trigger your own addins
      within NUnit.

      On Fri, May 9, 2008 at 8:42 PM, J. B. Rainsberger <jbrains762@...>
      wrote:

      > On May 9, 2008, at 14:11 , D. André Dhondt wrote:
      > >
      > > Having been a former member of that team, I don't think Chris is
      > > asking for
      > > help on other parts of the system... he's got those parts under
      > > control. I
      > > think the issue is that TDD doesn't really translate well for a
      > > language or
      > > behavior that is non-deterministic. I'm not sure if "non-
      > > deterministic" is
      > > the right phrase for what I'm trying to say, but taking SQL as an
      > > example of
      > > a high-level language that expresses intent without describing the how
      > > (e.g., with "inner join", "top 10 percent", where we don't have to
      > > do the
      > > row-by-row comparisons), what can we do to verify the behavior?
      > >
      > SQL is still "just" a query language. When you design a query, you
      > have in mind which rows in which tables you want to retrieve, so to
      > check that, put data in the tables, run the query, then verify which
      > rows you get back. How you get the bits to move from where to where is
      > just a question of which tools are available.
      >
      > I don't know how else to do it.
      > ----
      > J. B. (Joe) Rainsberger :: http://www.jbrains.ca
      > Your guide to software craftsmanship
      > JUnit Recipes: Practical Methods for Programmer Testing
      > 2005 Gordon Pask Award for contributions to Agile Software Practice
      >
      >
      >



      --
      D. André Dhondt
      mobile: 267-283-8270
      home: 267-286-6875

      If you're a software developer in the area, join Agile Philly (
      http://groups.yahoo.com/group/agilephilly/)!


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.