Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-02-03 16:32:45


At 08:00 PM 1/27/00 +0000, jorg.schaible_at_[hidden] wrote:

>Hi there,
>
>attached to this mail there is a ported version (from Java to C++)
of the core
>system of the JUnit 3.1 test suite of Kent Beck and Erich Gamma. The
classes
>allow you to setup easy module tests for your classes and integrate
this test
>applciations in an automated test procedure. The JUnit suite
normally has also a
>GUI version, but since C++ has no standard it is not part of the
port. To
>integrate future versions of JUnit I try to stay very close the the
original
>Java source although I changed the concept of the TestRunner
slightly to
>seperate data and test output and to gain make support from the exit
code of a
>test application. Also I dropped some Java only features.
>
>I am aware that from Michael Feathers exists another port of JUnit,
but
>- the version I previously had did not fulfill the Boost standards
(e.g. using
>namespace std in the headers)
>- I had to have a portable version
>- I wanted to have a JUnit port added to Boost to have some kind of
standard
>- wanted to build automated tests and was not interested in a GUI
>- I needed it now (most common reason <g>)
>
>Additionally I know also DejaGNU, but I found it very nasty to
provide Windows
>development seats with the necessary environment and train the
people with that
>complete package.
>
>Concerning the proposal to Boost I am interested in following
answers:
>- The original source seperates the classes into different files.
Currently most
>boost libraries use just one single header in the boost directory.
Shoud I keep
>this single header (yes, the inlines are too big) or separate this
classes also?
>- Should I move the classes in an additional namespace boost::test?
>
>Awaiting your comments ....

Jörg,

In addition to the files you included I also skim read portions of
http://members.pingnet.ch/gamma/junit.htm to get an idea of what
JUnit is all about. Here are some comments:

The idea is interesting, but...

Because the code is based on someone else's Java code, you should
probably get their permission (even though there are no copyright
messages in their code.) My understanding is that a program
rewritten from one programming language to another is still
considered a derived work, at least in the US legal system.

I also worry that testunit just doesn't feel like modern C++. It
seems more the way people used to do things before templates came
along, when they were trying to use C++ as if it were Smalltalk.
That isn't always a bad thing, but does raise question of what a more
spirit-of-C++ design would look like.

The scope of the package is also a concern. It might be better to
start with something smaller and simpler, and let it evolve as real
needs appear.

Although it may be an issue of naming rather than functionality, it
seems to be a bit shortsighted to focus on solely on unit testing.
Where does that leave system level and other forms of testing?

Documentation, including samples and tutorial material would seem to
be as important as the actual testing code. Many programmers have no
experience with testing packages, so there is much more of an
education component than with most of the boost libraries.

There really is a need for some kind of small, easy-to-use testing
framework, so the idea is worth discussion.

What do others think?

--Beman
  


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk