Does Boost.Test cover 'golden file approach'?
Hello, I know almost nothing about 'golden file approach'. http://weblogs.java.net/blog/alexeyp/archive/2007/02/testing_command.html
From this blog, you can find the term 'golden file approach'.
I want to know if Boost.Test cover this kind of testing. Can I implement 'golden file approach' with Boost.Test? If so please provide me more information about it. Thank you very much. ---------------------------------------- Journeyer J. Joh o o s a p r o g r a m m e r a t g m a i l d o t c o m ----------------------------------------
[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code
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
Hello Richard, I am reading of the book, "Fit for Developing Software: Framework for Integrated Tests". Thank you for providing me a good information!! Best regards ---------------------------------------- Journeyer J. Joh o o s a p r o g r a m m e r a t g m a i l d o t c o m ----------------------------------------
[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code
I am reading of the book, "Fit for Developing Software: Framework for Integrated Tests".
I've read the book and used Fit/FitNesse, albeit in a limited deployment. There is a very active community mailing list for Fit/FitNesse where you can reach people who have much more expertise if you need it: http://groups.yahoo.com/group/fitnesse -- "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
Hello Richard, Thank you for the useful information. Though our company decided not to use Fitnesse this time, this is useful information for our later use and other people's. Thank you! ---------------------------------------- Journeyer J. Joh o o s a p r o g r a m m e r a t g m a i l d o t c o m ----------------------------------------
Journeyer J. Joh
Hello,
I know almost nothing about 'golden file approach'.
http://weblogs.java.net/blog/alexeyp/archive/2007/02/testing_command.html
From this blog, you can find the term 'golden file approach'.
I want to know if Boost.Test cover this kind of testing.
Yes. output_test_stream is intended for this kind of pattern matching tests. How you going to collect the output is another question. Gennadiy
participants (3)
-
Gennadiy Rozental
-
Journeyer J. Joh
-
legalize+jeeves@mail.xmission.com