Eric Hodel
10/1/2007 8:58:00 PM
On Oct 1, 2007, at 05:11 , Martin Martinos wrote:
> Eric Hodel wrote:
>> On Sep 30, 2007, at 14:44 , Martin Martinos wrote:
>>
>>> I have a rake task that lunches all my unit tests. The execution of
>>> those tests may take over 20 mins. I would like to have two rake
>>> task,
>>> one that executes a set of quick tests and one that executes all the
>>> tests that will be executed in a nightly build.
>>
>> If your tests take twenty minutes, they aren't unit tests. Unit
>> tests are fast because they only test a unit.
>>
>> What is it that makes them take 20 minutes or more?
> In fact I use unit testing to test a Ruby wapper over a C++ tool that
> that takes a long time to execute. In fact it is not for testing
> the C++
> app but to test the wrapper.
>
> I also use it to test our VC++ build and packaging system. Even if I
> made small unit test, the whole process takes up to 13 mins.
If you only want to test the wrapper you should stub out the C++
app's behaviors and use those stubs instead of the real thing. You
don't specify if this is a command-line wrapper or a ruby extension,
the former will be mork work than the latter :/
For a full integration test you can use the same tests with the real
app (which will take the full amount of time).
--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars