Boost logo

Boost Users :

Subject: Re: [Boost-users] Does Boost.Test cover 'golden file approach'?
From: Richard (legalize+jeeves_at_[hidden])
Date: 2013-04-05 14:50:25


[Please do not mail me a copy of your followup]

boost-users_at_[hidden] spake the secret code
<CALYKT1jTzs-d55ZgVT4c3vmsA=YFkRBX5UdQqrpc13TM1AK3DA_at_[hidden]> thusly:

>I know almost nothing about 'golden file approach'.
>
>http://weblogs.java.net/blog/alexeyp/archive/2007/02/testing_command.html

>From the blog it seems that this is simply using a command-line
approach to gather output from a test into a file and marking the
output as "golden". Then subsequent test runs compare the output of
the test to the "golden" file and mark it as a failure if the actual
output differs from the contents of the file.

While this is a reasonable approach for integration testing, or
functional testing, I don't consider it a reasonable approach for unit
testing. All that file I/O is going to add considerable overhead to a
unit test and make it take too long to run. Good unit tests are very,
very, very fast. For instance, 100ms would be considered too long for
any individual unit test.

>I want to know if Boost.Test cover this kind of testing.

Boost.Test is a unit testing framework and is intended for very small
scope testing. There's nothing preventing you from using Boost.Test
as a functional/integration/acceptance testing framework, but it's
tool set is not designed to support this kind of testing directly.

I would recommend using the Fit/FitNesse acceptance testing framework
via CSlim.

<http://fitnesse.org> FitNesse general page
<http://www.fitnesse.org/PlugIns> CSlim links

There is a good book on Fit/FitNesse that explains acceptance testing
"Fit for Developing Software: Framework for Integrated Tests"
by Rick Mugridge and Ward Cunningham
<http://tinyurl.com/c8qtblc>

-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net