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'.

>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.

<> FitNesse general page
<> 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

"The Direct3D Graphics Pipeline" free book <>
     The Computer Graphics Museum <>
         The Terminals Wiki <>
  Legalize Adulthood! (my blog) <>

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at