List:Internals« Previous MessageNext Message »
From:Jay Pipes Date:October 20 2009 1:40pm
Subject:Re: Unit testing
View as plain text  
Tor Didriksen wrote:
> On Tue, 20 Oct 2009 14:54:41 +0200, Kristian Nielsen 
> <knielsen@stripped> wrote:
> 
>> Tor Didriksen <Tor.Didriksen@stripped> writes:
>>
>>> Why don't we start writing unit tests for MySQL code?
>>
>> But you already did?!?
>>
>>     $ ls mysql-5.1.39/unittest/
>>     examples  Makefile  Makefile.am  Makefile.in  mysys  mytap  
>> README.txt  unit.pl
>>
>>> I have been experimenting with the google unit testing framework lately.
>>
>> Please, *please* don't reinvent the wheel. It's bad enough to have two
>> different test frameworks, adding a third would just make matters even 
>> worse.

Kristian, although I typically agree with most everything you say, I'm 
going to disagree on this one point :)

I think having mysqltest for the functional SQL testing is necessary and 
there isn't a comparable framework for that kind of testing "out in the 
open".  On the contrast, there are many quality unit testing libraries 
in the open source space.

I'm an avid GTest user. It's an excellent framework and much more 
feature-rich than mytap.  IMHO, using GTest would be NOT reinventing the 
wheel and would be using quality open source projects/libraries.

>>  - Kristian.
>>
> 
> I just wrote a couple of tests using gtest,
> trying to show that it is a lot more expressive than mytap.
> There are currently *very few* unit tests in the codebase.
> If people think unit tests are a good idea, then maybe
> they will actually start writing them, given a better framework.

++ on many more unit tests, particularly for all the APIs (both external 
and internal to the server).

> I use unit.pl as a test runner, so no re-invention there.

I use Makefile.am ;)

> -- didrik
> 
> 

Thread
Unit testingTor Didriksen20 Oct
  • Re: Unit testingKristian Nielsen20 Oct
    • Re: Unit testingTor Didriksen20 Oct
      • Re: Unit testingJay Pipes20 Oct
        • Re: Unit testingKristian Nielsen20 Oct
          • Re: Unit testingSergei Golubchik20 Oct
      • Re: Unit testingKristian Nielsen20 Oct
        • Re: Unit testingTor Didriksen21 Oct
  • RE: Unit testingVladislav Vaintroub21 Oct
    • Re: Unit testingTor Didriksen22 Oct