[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: automatical testing



I absolutely agree that we should be able to automatically test. The preprocessor has a lot of tests and when I make a change I just 'make tests' and it tells me "all tests OK" (or not).

According to Extreme Programming, efficient testing is the key to being able to enhance and clean up code. Otherwise you are frightened to change it in case you create a bug.

In fact in XP you are supposed to create the test and then code until it passes. Which I usually do. If the code is hard to test for some reason, you change it so that it is instrumented
for testing. The best example is GUIs, which are notoriously hard to test. So you build it with a non-GUI functional layer, which the GUI calls. The GUI is then just fluff on the top of
the function. And the function can be tested easily. You still have a problem of testing the GUI layer but the problem is at least confined to that layer.

GCC now has a huge set of tests.

With a running compiler it should be easy to devise lots of tests along the lines of :

1. Input file
2. Commands
3. Output files that should not differ from the expected values

Some things like 'accept from date' will need some extra work, but the concept is valid.

Another good thing is to submit bug reports as a test that fails. Then the test gets added to the test suite when the bug is fixed. That ensure you don't have regressions.

You can test boundary conditions, combinations of features, bulk, speed etc. When the time comes we should build up a repository of tests.

Tim Josling

Carsten Siedentop wrote:

> Hallo together,
>
> what are you thinking about the idea, to build a database for all sample programs, from which an automatical regression test could startet. If it works, it could spare a lot of time.
> Carsten


--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.